Sichanov

lunch

Sep 23rd, 2021
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. import math
  2.  
  3. film_name = str(input())
  4. episode_time = int(input())
  5. break_time = int(input())
  6.  
  7. time_to_eat = break_time * 1 / 8
  8. time_to_relax = break_time * 1 / 4
  9.  
  10. time_left = break_time - time_to_eat - time_to_relax
  11.  
  12. not_enough_time = math.ceil(abs(episode_time - time_left))
  13.  
  14. if time_left >= episode_time:
  15.     print(f"You have enough time to watch {film_name} and left with {not_enough_time} minutes free time.")
  16. elif episode_time > time_left:
  17.     print(f"You don't have enough time to watch {film_name}, you need {not_enough_time}" f" more minutes.")
Advertisement
Add Comment
Please, Sign In to add comment