Advertisement
Guest User

Untitled

a guest
Nov 6th, 2016
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.18 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. using System.Numerics;
  7.  
  8. namespace test
  9. {
  10.     class Program
  11.     {
  12.         static void Main(string[] args)
  13.         {
  14.             int dayCount = int.Parse(Console.ReadLine());
  15.             var workDays = 365 - dayCount;
  16.             var timeForPlay = (workDays * 63) + (dayCount * 127);
  17.  
  18.             if (30000 > timeForPlay)
  19.             {
  20.                 var difference = 30000 - timeForPlay;
  21.                 var hours = difference / 60;
  22.                 var minutes = difference % 60;
  23.                
  24.                 Console.WriteLine("Tom sleeps well");
  25.                 Console.WriteLine("{0} hours and {1} minutes less for play",hours,minutes);
  26.             }
  27.             else if (timeForPlay > 30000)
  28.             {
  29.                 var difference = timeForPlay - 30000;
  30.                 var hours = difference / 60;
  31.                 var minutes = difference % 60;
  32.  
  33.                 Console.WriteLine("Tom will run away");
  34.                 Console.WriteLine("{0} hours and {1} minutes more for play",hours,minutes);
  35.             }
  36.            
  37.  
  38.         }
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement