Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Sleepy_Tom_Cat
- {
- class Program
- {
- static void Main(string[] args)
- {
- int dayForRest = int.Parse(Console.ReadLine());
- int alltimeGamesEver = 30000;
- int afterWorkGames = 63;
- int restGames = 127;
- int allYearsDays = 365;
- int gamesInRestDays = dayForRest * restGames;
- int gamesInWorkingDays = (allYearsDays - dayForRest) * afterWorkGames;
- int totalTime = gamesInRestDays + gamesInWorkingDays;
- int games = Math.Abs(alltimeGamesEver - totalTime);
- double hours = games / 60;
- double minutes = games % 60;
- if (totalTime > alltimeGamesEver)
- {
- Console.WriteLine("Tom will run away");
- Console.WriteLine($" {hours} hours and {minutes} minutes more for play");
- }
- else if (totalTime < alltimeGamesEver)
- {
- Console.WriteLine("Tom sleeps well");
- Console.WriteLine($"{hours} hours and {minutes} minutes less for play");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement