Ddimov90

sleepy_tom_cat_02_03

Sep 22nd, 2025
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | Source Code | 0 0
  1. rest_days = int(input())
  2.  
  3. working_days = 365 - rest_days
  4.  
  5. play_time = working_days * 63 + rest_days * 127
  6.  
  7. if play_time > 30000:
  8.     hours = (play_time - 30000) // 60
  9.     minutes = (play_time - 30000) % 60
  10.     print("Tom will run away")
  11.     print(f"{hours} hours and {minutes} minutes more for play")
  12. else:
  13.     hours = (30000 - play_time) // 60
  14.     minutes = (30000 - play_time) % 60
  15.     print("Tom sleeps well")
  16.     print(f"{hours} hours and {minutes} minutes less for play")
Advertisement
Add Comment
Please, Sign In to add comment