Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace DNA
- {
- class Programmer
- {
- static void Main()
- {
- string leapOrNot = Console.ReadLine();
- int p = int.Parse(Console.ReadLine());
- int h = int.Parse(Console.ReadLine());
- int weekends = 52;
- int result = 0;
- if ( leapOrNot == "t") // if the year is leap
- {
- p = (p / 2);
- h = h / (1 % 3);
- weekends = ((weekends - h) * 2) / 3;
- result = p + h + weekends + 3;
- Console.WriteLine(result);
- }
- else if ( leapOrNot == "f") // if its not
- {
- p = (p / 2) ;
- h = h / (1 % 3);
- weekends = ((weekends - h) * 2) / 3;
- result = p + h + weekends;
- Console.WriteLine(result);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment