Advertisement
Momtchil

Untitled

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