Sichanov

tom

Jan 21st, 2021
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. off_days = int(input())
  2.  
  3. norm_play = 30000
  4. work = 63
  5. off_work = 127
  6. days_in_year = 365
  7. days_working = days_in_year - off_days
  8. time = days_working * work + off_days * off_work
  9. if time > norm_play:
  10.     hours = ((time) - norm_play) // 60
  11.     minutes = ((time) - norm_play) % 60
  12.  
  13.     print("Tom will run away")
  14.     print(f'{hours} hours and {minutes} minutes more for play')
  15. else:
  16.     hours = (norm_play - (time)) // 60
  17.     minutes = (norm_play - (time)) % 60
  18.     print("Tom sleeps well")
  19.     print(f'{hours} hours and {minutes} minutes less for play')
  20.  
Advertisement
Add Comment
Please, Sign In to add comment