Buggy python submission (verdict: Runtime Error):
a = [int(input()) for i in range(5)]
r = 10
last = 10000
for i in range(5):
    if a[i] % 10 != 0 and a[i] % 10 < r:
        last = i
        r = int(a[i] % 10)

if last == 10000:
    for i in range(5):
        time = time + a[i]

else:
    b = [int((a[i] + 9) / 10) * 10 for i in range(5)] 
    time = 0
    for i in range(5):
        if i != last:
            time = time + b[i]
    
    time = time + a[last]
    print(time)

Fixed submission:
a = [int(input()) for i in range(5)]
r = 10
last = 0
for i in range(5):
    if a[i] % 10 != 0 and a[i] % 10 < r:
        last = i
        r = int(a[i] % 10)


b = [int((a[i] + 9) / 10) * 10 for i in range(5)] 
time = 0
for i in range(5):
    if i != last:
        time = time + b[i]
    
time = time + a[last]
print(time)

Buggy python submission (verdict: Runtime Error):
a = [int(input()) for i in range(5)]
r = 10
last = 10000
for i in range(5):
    #if a[i] % 10 == 0:
    #    fix = i
    if a[i] % 10 != 0 and a[i] % 10 < r:
        last = i
        r = int(a[i] % 10)

if last == 10000:
    for i in range(5):
        time = time + a[i]

else:
    b = [int((a[i] + 9) / 10) * 10 for i in range(5)] 
    time = 0
    for i in range(5):
        if i != last:
            time = time + b[i]
    
    time = time + a[last]
    print(time)

Fixed submission:
a = [int(input()) for i in range(5)]
r = 10
last = 0
for i in range(5):
    if a[i] % 10 != 0 and a[i] % 10 < r:
        last = i
        r = int(a[i] % 10)


b = [int((a[i] + 9) / 10) * 10 for i in range(5)] 
time = 0
for i in range(5):
    if i != last:
        time = time + b[i]
    
time = time + a[last]
print(time)

Buggy python submission (verdict: Runtime Error):
a = [int(input()) for i in range(5)]
r = 10
last = 10000
for i in range(5):
    #if a[i] % 10 == 0:
    #    fix = i
    if a[i] % 10 != 0 and a[i] % 10 < r:
        last = i
        r = int(a[i] % 10)

if last == 10000:
    for i in range(5):
        time = time + a[i]
    print(time)

else:
    b = []
    for i in range(5):
        if i != last:
            b.append(a[i])
    
    b = [int((b[i] + 9) / 10) * 10 for i in range(4)] 

    time = 0
    for i in range(4):
        time = time + b[i]
    
    time = time + a[last]
    print(time)

Fixed submission:
a = [int(input()) for i in range(5)]
r = 10
last = 0
for i in range(5):
    if a[i] % 10 != 0 and a[i] % 10 < r:
        last = i
        r = int(a[i] % 10)


b = [int((a[i] + 9) / 10) * 10 for i in range(5)] 
time = 0
for i in range(5):
    if i != last:
        time = time + b[i]
    
time = time + a[last]
print(time)

Buggy python submission (verdict: Runtime Error):
a = [int(input()) for i in range(5)]
r = 10
fix = 10000
for i in range(5):
    if a[i] % 10 == 0:
        fix = i
    elif a[i] % 10 < r:
        last = i
        r = int(a[i] % 10)

if fix == 10000:
    b = []
    for i in range(5):
        if i != last:
            b.append(a[i])
    
    b = [int((b[i] + 9) / 10) * 10 for i in range(4)] 

    time = 0
    for i in range(4):
        time = time + b[i]
    
    time = time + a[last]


else:
    b = []
    for i in range(5):
        if i != fix and i != last:
            b.append(a[i])

    b = [int((b[i] + 9) / 10) * 10 for i in range(3)]

    time = 0
    for i in range(3):
        time = time + b[i]

    time = time + a[fix] + a[last]

print(time)

Fixed submission:
a = [int(input()) for i in range(5)]
r = 10
last = 0
for i in range(5):
    if a[i] % 10 != 0 and a[i] % 10 < r:
        last = i
        r = int(a[i] % 10)


b = [int((a[i] + 9) / 10) * 10 for i in range(5)] 
time = 0
for i in range(5):
    if i != last:
        time = time + b[i]
    
time = time + a[last]
print(time)