Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Sleepy_Tom
- {
- class Program
- {
- static void Main(string[] args)
- {
- int nonWorkingDays = int.Parse(Console.ReadLine());
- int workingDays = 365 - nonWorkingDays;
- int totalPlayTime = workingDays * 63 + nonWorkingDays * 127;
- int gapBetweenRestAndPlay = Math.Abs(30000 - totalPlayTime);
- int hoursGap = gapBetweenRestAndPlay / 60;
- int minutesGap = gapBetweenRestAndPlay % 60;
- if (totalPlayTime > 30000)
- {
- Console.WriteLine("Tom will run away");
- Console.WriteLine("{0} hours and {1} minutes more for play", hoursGap, minutesGap);
- }
- else
- {
- Console.WriteLine("Tom sleeps well");
- Console.WriteLine("{0} hours and {1} minutes less for play", hoursGap, minutesGap);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment