Advertisement
KrasenPenev

Tom the Cat

Jan 21st, 2020
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 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 Sleepy_Tom_Cat
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int relaxDay = int.Parse(Console.ReadLine());
  14.  
  15. int workDayForYear = 365 - relaxDay;
  16.  
  17. int realTimeForPlay = workDayForYear * 63 + relaxDay * 127;
  18.  
  19. if (30000>realTimeForPlay)
  20. {
  21. int differnceInNorm = 30000 - realTimeForPlay;
  22.  
  23. double hours = differnceInNorm / 60;
  24. double minets = differnceInNorm % 2;
  25.  
  26. Console.WriteLine($"Tom sleeps well");
  27. Console.WriteLine($"{hours} hours and {minets} minutes less for play");
  28. }
  29. else
  30. {
  31.  
  32. }
  33.  
  34.  
  35. }
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement