Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Sleepy_Tom_Cat
- {
- class Program
- {
- public static void Main()
- {
- int DaysOff = int.Parse(Console.ReadLine());
- int limit = 30000;
- int workDays = 365 - DaysOff;
- int playTime = workDays * 63 + DaysOff * 127;
- int mins = Math.Abs(limit - playTime) % 60;
- int hours = Math.Abs(limit - playTime) / 60;
- if (playTime>=limit)
- {
- Console.WriteLine("Tom will run away");
- Console.WriteLine("{0} hours and {1} minutes more for play", hours, mins);
- }
- else
- {
- Console.WriteLine("Tom sleeps well");
- Console.WriteLine("{0} hours and {1} minutes less for play", hours, mins);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement