Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace SleepyTomCat
- {
- class Program
- {
- static void Main(string[] args)
- {
- int day = int.Parse(Console.ReadLine());
- int work = (365 - day) * 63;
- int holiday = day * 127;
- int sum = work + holiday;
- int minutes = 0;
- if (sum >= 30000)
- {
- minutes = sum - 30000;
- Console.WriteLine("Tom will run away");
- if (minutes % 60 < 10)
- {
- Console.WriteLine($"{minutes/60} hours and 0{minutes % 60} minutes more for play");
- }
- else
- {
- Console.WriteLine($"{minutes/60} hours and {minutes % 60} minutes more for play");
- }
- }
- else if (sum < 30000)
- {
- minutes = 30000 - sum;
- Console.WriteLine("Tom sleeps well");
- if (minutes % 60 < 10 && minutes == 0)
- {
- Console.WriteLine($"{minutes/60} hours and 0{minutes % 60:00} minutes less for play");
- }
- else
- {
- Console.WriteLine($"{minutes/60} hours and {minutes % 60} minutes less for play");
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment