Advertisement
pacho_the_python

Untitled

Sep 22nd, 2021
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.57 KB | None | 0 0
  1. from math import floor, ceil
  2.  
  3. serial_name = input()
  4. episode_duration = int(input())
  5. lunch_time = int(input())
  6.  
  7. eat_time = lunch_time * 1 / 8
  8. rest_time = lunch_time * 1 / 4
  9.  
  10. time_left = lunch_time - eat_time - rest_time
  11.  
  12. if time_left >= episode_duration:
  13.     free_min = time_left - episode_duration
  14.     print(f"You have enough time to watch {serial_name} and left with {floor(free_min)} minutes free time.")
  15. else:
  16.     needed_min = episode_duration - time_left
  17.     print(f"You don't have enough time to watch {serial_name}, you need {ceil(needed_min)} more minutes.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement