Advertisement
drunin89

KotkaTOM

Nov 6th, 2016
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.95 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace kotkaTom
  8. {
  9.     class kotkaTom
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             var dni = int.Parse(Console.ReadLine());
  14.             var rabotni = 365 - dni;
  15.             var min1 = dni * 127;
  16.             var min2 = rabotni * 63;
  17.             var total = min1 + min2;
  18.             var h = (30000-total) / 60;
  19.             var m = (30000-total) % 60;
  20.             if (total <= 30000)
  21.             {
  22.                 Console.WriteLine("Tom sleeps well");
  23.                 Console.WriteLine("{0} hours and {1} minutes less for play", Math.Abs(h), Math.Abs(m));
  24.             }
  25.             else
  26.             {
  27.                 Console.WriteLine("Tom will run away");
  28.                 Console.WriteLine("{0} hours and {1} minutes more for play", Math.Abs(h), Math.Abs(m));
  29.             }
  30.  
  31.  
  32.  
  33.         }
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement