Advertisement
zarkoto223

lunch_break

Nov 12th, 2022
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.62 KB | None | 0 0
  1. from math import ceil
  2.  
  3. serial_name = input()
  4. length_episode = int(input())
  5. rest_time_length = int(input())
  6.  
  7. lunch_time = rest_time_length / 8
  8. rest_time_for_chilling = rest_time_length / 4
  9.  
  10. # po vreme na pochivkata
  11. in_rest_time = rest_time_length - (lunch_time + rest_time_for_chilling)
  12.  
  13.  
  14. if in_rest_time >= length_episode:
  15.     print(f"You have enough time to watch {str(serial_name)} and left with {ceil(in_rest_time-length_episode)} "
  16.         f"minutes free time.")
  17. else:
  18.  
  19.     print(f"You don't have enough time to watch {str(serial_name)}, you need {ceil(length_episode-in_rest_time)}"
  20.           f" more minutes.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement