Advertisement
anton_d

02.sleepy_cat

Jan 18th, 2022 (edited)
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.49 KB | None | 0 0
  1. days_off = int(input())
  2.  
  3. working_days = (365 - days_off) * 63
  4.  
  5. days_off *= 127
  6.  
  7. sleeping_time = 30000
  8.  
  9. play_time = working_days + days_off
  10.  
  11. H = (sleeping_time - play_time) // 60
  12. M = (sleeping_time - play_time) % 60
  13.  
  14. if sleeping_time >= play_time:
  15.     print(f'Tom sleeps well\n{H} hours and {M} minutes less for play')
  16. else:
  17.     H = (play_time - sleeping_time) // 60
  18.     M = (play_time - sleeping_time) % 60
  19.     print(f'Tom will run away\n{H} hours and {M} minutes more for play')
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement