Sichanov

tom

Apr 20th, 2021
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.71 KB | None | 0 0
  1. days_off = int(input())
  2. norm_play_tom = 30000
  3. work_day = 365 - days_off
  4. play_with_tom_work_day_years = work_day * 63
  5. play_with_tom_day_off_years = days_off * 127
  6. play_with_tom_all_of_years = play_with_tom_work_day_years + play_with_tom_day_off_years
  7. remaining_time = abs(norm_play_tom - play_with_tom_all_of_years)
  8. remaining_time_hours = remaining_time // 60
  9. remaining_time_minutes = remaining_time % 60
  10.  
  11.  
  12.  
  13. if play_with_tom_all_of_years > norm_play_tom:
  14.     print("Tom will run away")
  15.     print(f"{remaining_time_hours} hours and {remaining_time_minutes} minutes more for play")
  16.  
  17. else:
  18.     print("Tom sleeps well")
  19.     print(f"{remaining_time_hours} hours and {remaining_time_minutes} minutes less for play")
Advertisement
Add Comment
Please, Sign In to add comment