Advertisement
exDotaPro

15_june_2019_2_lunch_break

Jan 21st, 2020
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.53 KB | None | 0 0
  1. import math
  2.  
  3. series_title = input()
  4. episode_duration = int(input())
  5. break_duration = int(input())
  6.  
  7. lunch_duration = break_duration / 8
  8. rest_duration = break_duration / 4
  9. time_left = break_duration - (lunch_duration + rest_duration)
  10.  
  11. diff = math.ceil(abs(time_left - episode_duration))
  12.  
  13. if time_left >= episode_duration:
  14.     print(f'You have enough time to watch {series_title} and left with {diff} minutes free time.')
  15. else:
  16.     print(f'You don\'t have enough time to watch {series_title}, you need {diff} more minutes.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement