08. Lunch Break
Здравейте,
решавам задача номер 8 от Conditional Statements - Exercise(упражнения):
Линк към условието:
https://softuni.bg/trainings/resources/officedocument/65089/проверки-упражнение-programming-basics-with-python-october-2021/3512
Това е моето решение:
import math tvseries = input() length_episode = int(input()) length_break = int(input()) lunch = length_break / 8 time_break = length_break / 4 left_over = length_break - lunch - time_break result = abs(left_over) result = math.ceil(result) if result >= 60: result = result - 60 else: result = result needed = length_episode - abs(left_over) needed = abs(needed) needed = math.ceil(needed) if needed >= 60: needed = needed - 60 else: needed = needed if left_over >= length_episode: print(f'You have enough time to watch {tvseries} and left with {result} minutes free time.') else: print(f"You don't have enough time to watch {tvseries}, you need {needed} more minutes.")
2-те проверки си минават без проблем, но Judge изкарва 4 от 8 верни, точки 50/100
Линк към задачата:
https://judge.softuni.org/Contests/Compete/Index/2414#7
Благодаря предварително
ето го моето решение
бачка