Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Program
- {
- static void Main()
- {
- string leap = Console.ReadLine();
- uint holidays = uint.Parse(Console.ReadLine());
- uint hometownWeekends = uint.Parse(Console.ReadLine());
- uint year = 52;
- double playHoliday = holidays / 2;
- double normalWeekends = ((year - hometownWeekends)/3);
- double normalWeekendsResult = normalWeekends * 2;
- double result = normalWeekendsResult + playHoliday + hometownWeekends;
- if (leap == "t")
- {
- Console.WriteLine(Math.Round(result) + 3);
- }
- else
- {
- Console.WriteLine(Math.Round(result, MidpointRounding.AwayFromZero));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement