Buggy python submission (verdict: Runtime Error):
# B - Five Dishes
import math

n = []
for _ in range(5):
    n.append(int(input()))

mini = 10
for y, x in enumerate(n):
    rest = x % 10 
    if rest != 0:
        if rest < mini:
            mini = rest
            mini_num = y 
            
time = n.pop(mini_num)
for x in n:
    if x % 10 != 0:
        item = math.ceil(x/10)*10
        time += item
    elif x%10 == 0:
        time += x
    
print(time)

Fixed submission:
# B - Five Dishes

n = []
for _ in range(5):
    n.append(int(input()))

time = 0
mini = 10
for x in n:
    rest = x%10
    if rest != 0:
        mini = min(rest, mini)
    while x%10 != 0:
        x += 1
    time += x
print(time-10+mini)

Buggy python submission (verdict: Runtime Error):
# B - Five Dishes

n = []
for _ in range(5):
    n.append(int(input()))

mini = 10
for y, x in enumerate(n):
    rest = x % 10 
    if rest != 0:
        if rest < mini:
            mini = rest
            mini_num = y 
            
time = n.pop(mini_num)
for x in n:
    if x % 10 != 0:
        item = math.ceil(x/10)*10
        time += item
    elif x%10 == 0:
        item = x
        time += item
    
print(time)

Fixed submission:
# B - Five Dishes

n = []
for _ in range(5):
    n.append(int(input()))

time = 0
mini = 10
for x in n:
    rest = x%10
    if rest != 0:
        mini = min(rest, mini)
    while x%10 != 0:
        x += 1
    time += x
print(time-10+mini)

Buggy python submission (verdict: Runtime Error):
# B - Five Dishes

n = []
for _ in range(5):
    n.append(int(input()))

mini = 10
for y, x in enumerate(n):
    rest = x % 10 
    if rest != 0:
        if rest < mini:
            mini = rest
            mini_num = y 
            
time = n.pop(mini_num)
for x in n:
    if x % 10 != 0:
        item = math.ceil(x/10)*10
        time += item
    else:
        item = x
        time += item
    
print(time)

Fixed submission:
# B - Five Dishes

n = []
for _ in range(5):
    n.append(int(input()))

time = 0
mini = 10
for x in n:
    rest = x%10
    if rest != 0:
        mini = min(rest, mini)
    while x%10 != 0:
        x += 1
    time += x
print(time-10+mini)

Buggy python submission (verdict: Runtime Error):
# B - Five Dishes

n = []
for _ in range(5):
    n.append(int(input()))

mini = 10
for y, x in enumerate(n):
    rest = x % 10 
    if rest != 0:
        if rest < mini:
            mini = rest
            mini_num = y 
            
time = n.pop(mini_num)
for x in n:
    if x % 10 != 0:
        item = x + (10-x%10)
        time += item
    else:
        item = x
        time += item
    
print(time)

Fixed submission:
# B - Five Dishes

n = []
for _ in range(5):
    n.append(int(input()))

time = 0
mini = 10
for x in n:
    rest = x%10
    if rest != 0:
        mini = min(rest, mini)
    while x%10 != 0:
        x += 1
    time += x
print(time-10+mini)

Buggy python submission (verdict: Runtime Error):
# B - Five Dishes

n = []
# n = [29, 20, 7, 35, 120]
for _ in range(5):
    n.append(int(input()))

mini = 10
for y, x in enumerate(n):
    rest = x % 10 
    if rest != 0:
        if rest < mini:
            mini = rest
            mini_num = y 
            
# print(mini)
# print(mini_num)

# print(n.pop(mini_num))

time = n.pop(mini_num)
print(n)
for x in n:
    if x % 10 != 0:
        item = x + (10-x%10)
        time += item
    else:
        item = x
        time += item
#     print('item:', item)
#     print(time)
    
print(time)

Fixed submission:
# B - Five Dishes

n = []
for _ in range(5):
    n.append(int(input()))

time = 0
mini = 10
for x in n:
    rest = x%10
    if rest != 0:
        mini = min(rest, mini)
    while x%10 != 0:
        x += 1
    time += x
print(time-10+mini)