Задача Honey (Exercise: Stacks, Queues, Tuples and Sets)
Здравейте, не мога да разбера защо получавам 85 точки на Honey (Exercise: Stacks, Queues, Tuples and Sets):
https://softuni.bg/trainings/resources/officedocument/78482/stacks-queues-tuples-and-sets-exercise-python-advanced-january-2023/3963
Ако някой може да ми прати входните дани или да подскаже къде е грешката, ще съм мн благодарен.
from collections import deque
bees = deque([int(num) for num in input().split()])
nectar = deque([int(num) for num in input().split()])
actions = deque(input().split())
result = 0
commands = {
"*": lambda x, y: x * y,
"/": lambda x, y: x / y,
"+": lambda x, y: x + y,
"-": lambda x, y: x - y
}
while bees and nectar:
current_bee = bees.popleft()
current_nectar = nectar.pop()
if current_nectar < current_bee:
bees.appendleft(current_bee)
continue
#adding the exeption because of division by 0
if current_nectar == 0:
current_nectar = 1
command = actions.popleft()
result += abs(commands[command](current_bee, current_nectar))
print(f"Total honey made: {int(result)}")
if bees:
print(f"Bees left: {', '.join(str(num) for num in bees)}")
if nectar:
print(f"Nectar left: {', '.join(str(num) for num in nectar)}")