Advertisement
YavorJS

Sleepy_cat_Tom

Jun 1st, 2016
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 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_cat_Tom
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13.  
  14. int holidays = int.Parse(Console.ReadLine());
  15. int workdays = 365 - holidays;
  16. int timeToPlay = workdays * 63 +holidays*127;
  17. int normToPlay = 30000;
  18. int normDiff = Math.Abs(normToPlay - timeToPlay);
  19. int hourDiff = normDiff / 60;
  20. int minDiff = normDiff % 60;
  21. //Console.WriteLine(timeToPlay);
  22.  
  23. if (timeToPlay>normToPlay)
  24. {
  25. Console.WriteLine("Tom will run away");
  26. Console.WriteLine("{0} hours and {1} minutes more for play", hourDiff, minDiff);
  27. }
  28. else if (timeToPlay < normToPlay)
  29. {
  30. Console.WriteLine("Tom sleeps well");
  31. Console.WriteLine("{0} hours and {1} minutes less for play", hourDiff, minDiff);
  32. }
  33.  
  34. }
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement