Advertisement
Guest User

Untitled

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