Advertisement
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 _02.ПоспаливатаКоткаТом
- {
- class Program
- {
- static void Main(string[] args)
- {
- int holidays = int.Parse(Console.ReadLine());
- int days = 30000;
- int workingDays = (365 - holidays) * 63;
- int gamePlay = ((workingDays) + (holidays * 127));
- if (days>= gamePlay)
- {
- int diff = days - gamePlay;
- int hours = (diff / 60);
- int minutes = diff % 60;
- Console.WriteLine("Tom sleeps well");
- Console.WriteLine("{0} hours and {1} minutes less for play",hours,minutes);
- }
- else
- {
- int diff = gamePlay-days ;
- int hours = (diff / 60);
- int minutes = diff % 60;
- Console.WriteLine("Tom will run away");
- Console.WriteLine("{0} hours and {1} minutes more for play",hours,minutes);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement