Advertisement
VickSuna

Untitled

Feb 19th, 2020
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _332_Sleepy_Tom_Cat
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int pochivniDni = int.Parse(Console.ReadLine());
  10. int rabotniDni = 365 - pochivniDni;
  11. int vremeZaIgra = ((pochivniDni * 127) + (rabotniDni * 63));
  12. if (vremeZaIgra > 30000)
  13. {
  14. int ChasovePoveche = (vremeZaIgra - 30000) / 60;
  15. int MinutiPoveche = (vremeZaIgra - 30000) % 60;
  16. Console.WriteLine("Tom will run away");
  17. Console.WriteLine($"{ChasovePoveche} hours and {MinutiPoveche} minutes more for play");
  18. }
  19. else if (vremeZaIgra < 30000)
  20. {
  21. int ChasovePoveche = (30000 - vremeZaIgra) / 60;
  22. int MinutiPoveche = (30000 - vremeZaIgra) % 60;
  23. Console.WriteLine("Tom sleeps well");
  24. Console.WriteLine($"{ChasovePoveche} hours and {MinutiPoveche} minutes less for play");
  25. }
  26.  
  27. }
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement