Advertisement
ivantanchev

cat_sleepy

Mar 9th, 2022
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.54 KB | None | 0 0
  1. off_days = int(input())
  2. days_in_year = 365
  3. work_days_playtime = 63
  4. day_off_playtime = 127
  5. needed_playtime = 30000
  6.  
  7. work_days = days_in_year - off_days
  8. accual_playtime = work_days * work_days_playtime + off_days * day_off_playtime
  9. diff = abs(needed_playtime-accual_playtime)
  10. hours = diff // 60
  11. min = diff % 60
  12.  
  13. if accual_playtime > needed_playtime:
  14.     print(f"Tom will run away")
  15.     print(f"{hours} hours and {min} minutes more for play")
  16. else:
  17.     print(f"Tom sleeps well ")
  18.     print(f"{hours} hours and {min} minutes less for play")
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement