Advertisement
Spocoman

08. Lunch Break

Dec 16th, 2021 (edited)
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.45 KB | None | 0 0
  1. import math
  2.  
  3. serial_name = input()
  4. serial_time = int(input())
  5. break_time = int(input())
  6.  
  7. needed_time = break_time / 8.0 + break_time / 4.0 + serial_time
  8.  
  9. if needed_time <= break_time:
  10.     print(f'You have enough time to watch {serial_name} and left with {break_time - math.floor(needed_time)} minutes free time.')
  11. else:
  12.     print(f'You don\'t have enough time to watch {serial_name}, you need {math.ceil(needed_time) - break_time} more minutes.')
  13.  
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement