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 ConsoleApplication7
- {
- class Program
- {
- static void Main(string[] args)
- {
- int breakDays = int.Parse(Console.ReadLine());
- int norma = 30000;
- int workDays = 365 - breakDays;
- int timeIgra = workDays * 63 + breakDays * 127;
- int mins = Math.Abs(norma - timeIgra) % 60;
- int hours = Math.Abs(norma - timeIgra) / 60;
- if (timeIgra>=norma)
- {
- 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