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