ramsess90

Untitled

Feb 2nd, 2017
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.69 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Поспаливата_котка_Том
  4. {
  5.     class Program
  6.     {
  7.         static void Main ( string[] args )
  8.         {
  9.             int P_dni = int.Parse(Console.ReadLine());
  10.             TimeSpan razlika_chas = new TimeSpan(0, (30000 - ((P_dni * 127) + ((365 - P_dni) * 63))), 0);
  11.             if (razlika_chas.Ticks > 0)
  12.                 Console.WriteLine($"Tom will run away\n{(int)(razlika_chas.TotalHours)} hours and {razlika_chas.Minutes} minutes more for play");
  13.             else
  14.                 Console.WriteLine($"Tom sleeps well\n{Math.Abs((int)(razlika_chas.TotalHours))} hours and {Math.Abs(razlika_chas.Minutes)} minutes less for play");
  15.         }
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment