Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int numberOfRestDays = int.Parse(Console.ReadLine());
- int workingDays = 365 - numberOfRestDays;
- int TotalPlayingTimeInMinutes = (workingDays * 63) + (numberOfRestDays * 127);
- int restPlayingTime = 30000 - TotalPlayingTimeInMinutes;
- int restPlayingTimeHours = Math.Abs(restPlayingTime / 60);
- int restPlayingTimeMinutes = Math.Abs(restPlayingTime % 60);
- if (TotalPlayingTimeInMinutes <= 30000)
- {
- Console.WriteLine("Tom sleeps well");
- Console.WriteLine($"{restPlayingTimeHours} hours and {restPlayingTimeMinutes} minutes less for play");
- }
- else
- {
- Console.WriteLine("Tom will run away");
- Console.WriteLine($"{restPlayingTimeHours} hours and {restPlayingTimeMinutes} minutes more for play");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement