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 tupa_kotka
- {
- class Program
- {
- static void Main(string[] args)
- {
- int holidays = int.Parse(Console.ReadLine());
- int workDays = 365 - holidays;
- int totalGameTime = (holidays * 127) + (workDays * 63);
- if (30000 < totalGameTime)
- {
- Console.WriteLine("Tom will run away");
- var hours = Math.Abs((30000 - totalGameTime) / 60);
- var minutes = Math.Abs((30000 - totalGameTime) % 60);
- Console.WriteLine("{0} hours and {1} minutes more for play", hours, minutes);
- }
- else
- {
- Console.WriteLine("Tom sleeps well");
- var hours = Math.Abs((totalGameTime - 30000) / 60);
- var minutes = Math.Abs((totalGameTime - 30000) % 60);
- Console.WriteLine("{0} hours and {1} minutes less for play", hours, minutes);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment