desislava777

Sleepy Tom Cat

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