qyliang/CodeNanoFix huggingface dataset:
Buggy code:
A,B,C,D,E=(int(input()) for _ in range(5))
X=[A,B,C,D,E]
time=0
rest=[]
for i in range(5):
    if X[i]%10!=0:
        time+=(X[i]//10+1)*10
    else:
        time+=X[i]
    rest.append(X[i]%10)
if min(rest)==0:
    print(time)
else:
    time+=min(rest)-10
    print(time)

Fixed code:
A,B,C,D,E=(int(input()) for _ in range(5))
X=[A,B,C,D,E]
time=0
rest=[]
for i in range(5):
    if X[i]%10!=0:
        time+=(X[i]//10+1)*10
    else:
        time+=X[i]
    rest.append((10-X[i]%10)%10)
time-=max(rest)
print(time)
Buggy code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

l = sorted([a,b,c,d,e], key=lambda x: x%10, reverse=True)

def tyumon(t, ans):
  ans += t
  if ans % 10 == 0:
    return ans
  else:
    return (ans//10 + 1)*10

ans = 0
for i in range(len(l)-1):
  ans = tyumon(l[i], ans)
print(ans + l[-1])

Fixed code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

l = []
ans = 0
for t in [a,b,c,d,e]:
  if t%10 == 0:
    ans += t
  else:
    l.append(t)

if len(l) < 1:
  print(ans)
elif len(l) == 1:
  print(ans + l[0])
else:
  l = sorted(l, key=lambda x: x%10, reverse=True)

  def tyumon(t, ans):
    ans += t
    if ans % 10 == 0:
      return ans
    else:
      return (ans//10 + 1)*10

  for i in range(len(l)-1):
    ans = tyumon(l[i], ans)
  print(ans + l[-1])
Buggy code:
import itertools

l = [int(input()) for i in range(5)]
l2 = list(itertools.permutations(l))
min = float("INF")
for i in range(120):
    ans = 0
    for j in range(4):
        if l2[i][j] % 10 == 0:
            ans += l2[i][j]
        else:
            ans += (l2[i][j] // 10 + 1) * 10
    ans += l2[i][4]
    if min > ans:
        min = ans
print(ans) 

Fixed code:
import itertools

l = [int(input()) for i in range(5)]
l2 = list(itertools.permutations(l))
min = float("INF")
for i in range(120):
    ans = 0
    for j in range(4):
        if l2[i][j] % 10 == 0:
            ans += l2[i][j]
        else:
            ans += (l2[i][j] // 10 + 1) * 10
    ans += l2[i][4]
    if min > ans:
        min = ans
print(min)
Buggy code:
import math
dish = [int(input()) for _ in range(5)]
sm = 9
smin = 0
for item in dish:
  r = item % 10
  if 1 <= r <= 10:
    if sm > r:
      sm = r
      smin = item
ans = 0    
for cnt, item in enumerate(dish):
  if cnt == smin:
    ans += item
  else:
    ans += math.ceil(item)
print(ans)    

Fixed code:
import math
dish = [int(input()) for _ in range(5)]
sm = 9
smin = 0
for cnt, item in enumerate(dish):
  r = item % 10
  if 1 <= r <= 9:
    if sm > r:
      sm = r
      smin = cnt
ans = 0    
for cnt, item in enumerate(dish):
  if cnt == smin:
    ans += item
  else:
    r = item % 10
    if 1 <= r <= 9:
      ans += item + 10 - r
    else:
      ans += item
print(ans)
Buggy code:
import math
T = [int(input()) for i in range(5)]
print(T)
Rest=[0]*5
for i in range(5):
    if T[i]%10 == 0:
        Rest[i] = 10
    else: Rest[i] = T[i]%10
maxrest = 10-min(Rest)
ans = 0
for i in range(5):
    ans += 10*math.ceil(T[i]/10)
print(ans-maxrest)

Fixed code:
import math
T = [int(input()) for i in range(5)]
Rest=[0]*5
for i in range(5):
    if T[i]%10 == 0:
        Rest[i] = 10
    else: Rest[i] = T[i]%10
maxrest = 10-min(Rest)
ans = 0
for i in range(5):
    ans += 10*math.ceil(T[i]/10)
print(ans-maxrest)
Buggy code:
L = [int(input()) for i in range(5)]

time = 0
flag = 0
Loss = []

for i in range(5):
    if L[i]%10 == 0:
        time+=L[i]
        Loss.append(0)
    else:
        time+=(L[i]-L[i]%10+10)
        Loss.append(10-L[i]%10)

time -= 10-max(Loss)
print(time)

Fixed code:
L = [int(input()) for i in range(5)]

time = 0
flag = 0
Loss = []

for i in range(5):
    if L[i]%10 == 0:
        time+=L[i]
        Loss.append(0)
    else:
        time+=(L[i]-L[i]%10+10)
        Loss.append(10-L[i]%10)

time -= max(Loss)
print(time)
Buggy code:
M = [int(input()) for _ in range(5)]
m = []
T = 0
for i in range(5):
    if M[i] % 10 > 0:
        T += M[i]
        T += 10 - M[i] % 10
        m.append(M[i] % 10)
        T -= min(m)
    else:
        T += M[i]
print(T)

Fixed code:
M = [int(input()) for _ in range(5)]
m = []
T = 0
for i in range(5):
    if M[i] % 10 == 0:
        T += M[i]
    else:
        T += M[i]
        T += 10 - M[i] % 10
        m.append(M[i] % 10)
print(T - (10 - (10 if not m else min(m))))
Buggy code:
list = [int(input()) for n in range(5)]
min = 100
for i in range(5):
  if min > list[i] % 10:
    min = list[i] % 10
    min_arg = i
ans = 0
for i in range(5):
  if ans == 0 and i != min_arg:
    ans += list[i]
    continue
  if i == min_arg:
    continue
  ans = ((ans - (ans % 10) + 10) + list[i])
  print(ans)
ans = ((ans - (ans % 10) + 10) + list[min_arg])
print(ans)

Fixed code:
list = [int(input()) for n in range(5)]
min = 100
min_arg = 0
for i in range(5):
  if min > list[i] % 10 and list[i] % 10 != 0:
    min = list[i] % 10
    min_arg = i
ans = 0
for i in range(5):
  if i == min_arg:
    continue
  ans += list[i]
  if ans % 10 != 0:
    ans = ans - (ans % 10) + 10
ans += list[min_arg]
print(ans)
Buggy code:
import itertools

don = [int(input()) for i in range(5)]

final_time = inf
for v in itertools.permutations(don):
  time = 0
  for j in v:
    while(time % 10 != 0):
      time += 1
    time += j
  final_time = min(final_time, time)
print(final_time)


Fixed code:
import itertools

don = [int(input()) for i in range(5)]

final_time = float('inf')
for v in itertools.permutations(don):
  time = 0
  for j in v:
    while(time % 10 != 0):
      time += 1
    time += j
  final_time = min(final_time, time)
print(final_time)
Buggy code:
# -*- coding: utf-8 -*-
"""
Created on Sat Apr  6 21:54:27 2019

@author: yuta
"""

ABCDE = [int(input()) for i in range(5)]

def main(x):
    rest = list(map(lambda y: 10 - y%10, x))
    for i in range(5):
        if rest[i] == 10:
            rest[i] == 0
    rest_sort = sorted(rest)
    t = sum(x) + sum(rest_sort[0:3])
    print(t)

main(ABCDE)

Fixed code:
# -*- coding: utf-8 -*-
"""
Created on Sat Apr  6 21:54:27 2019

@author: yuta
"""

ABCDE = [int(input()) for i in range(5)]

def main(x):
    rest = list(map(lambda y: 10 - y%10,x))
    for i in range(5):
        if rest[i] == 10:
            rest[i] = 0
    rest_sort = sorted(rest)
    t = sum(x) + sum(rest_sort[0:4])
    print(t)

main(ABCDE)
Buggy code:
A=list(int(input()) for _ in range(5))
B=[]
C=[]
for i in A:
    if i%10!=0:
        B.append(i%10)
        C.append((i//10+1)*10)
    else:
        C.append(i)
if B==True:
    c=10-min(B)
else:
    c=0
print(sum(C)-c)

Fixed code:
A=list(int(input()) for _ in range(5))
B=[]
C=[]
for i in A:
    if i%10!=0:
        B.append(i%10)
        C.append((i//10+1)*10)
    else:
        C.append(i)
if len(B)>0:
    c=10-min(B)
else:
    c=0
print(sum(C)-c)
Buggy code:
dishes = [int(input()) for i in range(5)]

ans = 0
min_digits = 10
digits_idx = 0
for idx, dish in enumerate(dishes):
  ans += dish + 10 - dish%10
  if dish%10 < min_digits:
    digits_idx = idx
  	min_digits = dish%10
ans -= (10 - dishes[digits_idx]%10)
print(ans)


Fixed code:
dishes = [int(input()) for i in range(5)]

ans = 0
min_digits = 10
digits_idx = 0
for idx, dish in enumerate(dishes):
  if dish%10 == 0:
    ans += dish
  else:
    ans += dish + 10 - dish%10
  if dish%10 < min_digits and dish%10 !=0:
    digits_idx = idx
    min_digits = dish%10
if min_digits == 10:
  print(ans)
else:
  ans -= (10 - min_digits)
  print(ans)
Buggy code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

dish = [a,b,c,d,e]
time = [0,0,0,0,0]
reg = 0
mini = 10

for l in range(5):
  num = dish[l]%10
  print(num)
  if num == 0:
    time[l] = dish[l]
  else:
    time[l] = (dish[l]//10+1)*10
    
  if num != 0 and num < mini:
    mini = num
    reg = l
        
if reg ==0:
  print(a+time[1]+time[2]+time[3]+time[4])
elif reg == 1:
  print(time[0]+b+time[2]+time[3]+time[4])
elif reg == 2:
  print(time[0]+time[1]+c+time[3]+time[4])
elif reg == 3:
  print(time[0]+time[1]+time[2]+d+time[4])
elif reg == 4:
  print(time[0]+time[1]+time[2]+time[3]+e)

Fixed code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

dish = [a,b,c,d,e]
time = [0,0,0,0,0]
reg = 0
mini = 10

for l in range(5):
  num = dish[l]%10
  if num == 0:
    time[l] = dish[l]
  else:
    time[l] = int(((dish[l]-dish[l]%10)/10+1)*10)
    
  if num != 0 and num < mini:
    mini = num
    reg = l
        
if reg ==0:
  print(a+time[1]+time[2]+time[3]+time[4])
elif reg == 1:
  print(time[0]+b+time[2]+time[3]+time[4])
elif reg == 2:
  print(time[0]+time[1]+c+time[3]+time[4])
elif reg == 3:
  print(time[0]+time[1]+time[2]+d+time[4])
elif reg == 4:
  print(time[0]+time[1]+time[2]+time[3]+e)
Buggy code:
import numpy as np

dish_min = []
 
for i in range(5):
   dish_min.append(int(input()))
    
p = [i%10 for i in dish_min]
pp = [(i-1)%10 for i in dish_min]
x = np.argmin(pp)

for i in range(5):
  if i != x and p[i]:
  	dish_min[i] += (10 - p[i])
print(dish_min)
print(sum(dish_min))

Fixed code:
import numpy as np

dish_min = []
 
for i in range(5):
   dish_min.append(int(input()))
    
p = [i%10 for i in dish_min]
pp = [(i-1)%10 for i in dish_min]
x = np.argmin(pp)

for i in range(5):
  if i != x and p[i]:
  	dish_min[i] += (10 - p[i])

print(sum(dish_min))
Buggy code:
nums=[int(input()) for i in range(5)]

key=[]
sums=0

for num in nums:
  key.append(num%10)

flag=True

for i in range(len(nums)):
  if nums[i]==nums[key.index(min(key))] and flag:
    flag=False
    continue
  sums+=((10-key[i])+nums[i])
  
print(sums+nums[key.index(min(key))])

Fixed code:
nums=[int(input()) for i in range(5)]

key=[]
sums=0

for num in nums:
  if num%10==0:
    key.append(10)
  else:
    key.append(num%10)

flag=True

for i in range(len(nums)):
  if nums[i]==nums[key.index(min(key))] and flag:
    flag=False
    continue
  sums+=((10-key[i])+nums[i])
  
print(sums+nums[key.index(min(key))])
Buggy code:
# -*- coding: utf-8 -*-

import math

a, b, c, d, e = int(input()), int(input()), int(input()), int(input()), int(input())

ans = math.ceil(a / 10)
ans += math.ceil(b / 10)
ans += math.ceil(c / 10)
ans += math.ceil(d / 10)
ans += math.ceil(e / 10)
ans *= 10
ans += min(a % 10, b % 10, c % 10, d % 10, e % 10) - 10

print(ans)


Fixed code:
# -*- coding: utf-8 -*-

import math

a, b, c, d, e = int(input()), int(input()), int(input()), int(input()), int(input())

ans = math.ceil(a / 10)
ans += math.ceil(b / 10)
ans += math.ceil(c / 10)
ans += math.ceil(d / 10)
ans += math.ceil(e / 10)
ans *= 10
ans += min((a-1) % 10, (b-1) % 10, (c-1) % 10, (d-1) % 10, (e-1) % 10) - 10 + 1

print(ans)
Buggy code:
T = [int(input()) for _ in range(5)]
T.sort(key=lambda x:x % 10 if x % 10 != 0 else 10)

ans = 0
ans += T[0]
for i in range(1,4):
  ans += T[i] + (10 - T[i] % 10)
print(ans)


Fixed code:
T = [int(input()) for _ in range(5)]
T.sort(key=lambda x:x % 10 if x % 10 != 0 else 10)

ans = 0
ans += T[0]
for i in range(1,5):
  ans += T[i]
  if T[i] % 10 != 0:
    ans += 10 - T[i] % 10
print(ans)
Buggy code:
time = [int(input()) for i in range(5)]
result = 0
a = []

for i in range(5):
    if time[i] % 10 == 0:
        result += time[i]
        print(result)
    else:
        result += ((time[i] // 10)+1)*10
        a.append(time[i] % 10)
        print(result)
print(result - (10 - min(a)))


Fixed code:
time = [int(input()) for i in range(5)]
result = 0
a = [10]

for i in range(5):
    if time[i] % 10 == 0:
        result += time[i]
    else:
        result += ((time[i] // 10)+1)*10
        a.append(time[i] % 10)
print(result - (10 - min(a)))
Buggy code:
l = [input() for i in range(5)]

a = 10
y = 0
for i in range(5):
  s = int(l[i]) % 10
  if a > s & s != 0:
    a = s
    y = i

sum = 0
for i in range(5):
  if y == i:
    sum += int(l[y])
  else:
    sum += int(l[i])
    sum += (10 - (int(l[i])%10))
print(sum)

Fixed code:
l = [input() for i in range(5)]

a = 10
y = 0
for i in range(5):
  s = int(l[i]) % 10
  if a > s & s != 0:
    a = s
    y = i
    
sum = 0
for i in range(5):
  if y == i:
    sum += int(l[y])
  else:
    sum += int(l[i])
    if int(l[i])%10 != 0:
      sum += (10 - (int(l[i])%10))
print(sum)
Buggy code:
inp = []
for i in range(5):
    inp.append(int(input()))
inp2 = sorted(inp, key=lambda x: x%10)
inp3 = [d for d in inp2 if d%10 != 0]
last = inp3[0]
inp2.remove(last)
print(inp,inp2,inp3,last)

r = 0
for c,z in enumerate(inp2):
    if z%10 == 0:
        r += z
    else:
        r += z//10 * 10 + 10
    print(z,r)
res = r + last
print(res)

Fixed code:
inp = []
for i in range(5):
    inp.append(int(input()))
inp2 = sorted(inp, key=lambda x: x%10)
inp3 = [d for d in inp2 if d%10 != 0]
if inp3 != []:

    last = inp3[0]
    inp2.remove(last)
else:
    last = 0

r = 0
for c,z in enumerate(inp2):
    if z%10 == 0:
        r += z
    else:
        r += z//10 * 10 + 10
res = r + last
print(res)
Buggy code:
import math
L = [int(input()) for _ in range(5)]
Lm = []
for i in range(len(L)):
    if i%10 == 0:
        Lm.append(0)
    else:
        Lm.append(10-i%10)
print(sum([10*math.ceil(i/10) for i in L])-max(Lm))





Fixed code:
import math
L = [int(input()) for _ in range(5)]
Lm = []
for i in L:
    if i%10 == 0:
        Lm.append(0)
    else:
        Lm.append(10-i%10)
print(sum([10*math.ceil(i/10) for i in L])-max(Lm))
Buggy code:
myArray = list()
for n in range(5):
    myArray.append(int(input()))
Jouyo  = 9

for i,j in enumerate(myArray):
    if 0 < j % 10 <= Jouyo:
        Jouyo = j % 10
        jouyoi = i
jouyoi = 0
times = 0
for i,j in enumerate(myArray):
    if i != jouyoi:
        if j % 10 != 0:
            times += ((j // 10) + 1) * 10
        else:
            times += j
    else:
        times += j
print(times)

Fixed code:
myArray = list()
for n in range(5):
    myArray.append(int(input()))
Jouyo  = 9
jouyoi = 0

for i,j in enumerate(myArray):
    if 0 < j % 10 <= Jouyo:
        Jouyo = j % 10
        jouyoi = i
times = 0
for i,j in enumerate(myArray):
    if i != jouyoi:
        if j % 10 != 0:
            times += ((j // 10) + 1) * 10
        else:
            times += j
    else:
        times += j
print(times)
Buggy code:
a = [int(input()) for _ in range(5)]
b = [(10-(i%10)) for i in a]
c = max(b)
print(sum([((j + 9)//10) * 10 for j in a]) - c)

Fixed code:
a = [int(input()) for _ in range(5)]
b = [(10-(i%10))%10 for i in a]
c = max(b)
print(sum([((j + 9)//10) * 10 for j in a]) - c)
Buggy code:
from math import ceil
a = [int(input()) for _ in range(5)]
b = [ceil(i / 10) * 10 for i in a]
print(min([sum([a[i]] + [b[j] for j in range if i != j]) for i in range(5)]))

Fixed code:
from math import ceil
a = [int(input()) for _ in range(5)]
b = [ceil(i / 10) * 10 for i in a]
print(min([sum([a[i]] + [b[j] for j in range(5) if i != j]) for i in range(5)]))
Buggy code:
l = [int(input()) for _ in range(5)]
r = [10 if i % 10 == 0 else i %  10 for i in l]
m = [i  if i % 10 == 0 else i // 10 * 10 + 10 for i in l]
print(sum(l) + min(r) - 10)

Fixed code:
l = [int(input()) for _ in range(5)]
r = [10 if i % 10 == 0 else i %  10 for i in l]
m = [i  if i % 10 == 0 else i // 10 * 10 + 10 for i in l]
print(sum(m) + min(r) - 10)
Buggy code:
from functools import reduce
l = [int(input()) for _ in range(5)]
r = [10 if i % 10 == 0 else i %  10 for i in l]
m = [i  if i % 10 == 0 else i // 10 * 10 + 10 for i in l]
print(sum(l) + min(r) - 10)

Fixed code:
from functools import reduce
l = [int(input()) for _ in range(5)]
r = [10 if i % 10 == 0 else i %  10 for i in l]
m = [i  if i % 10 == 0 else i // 10 * 10 + 10 for i in l]
print(sum(m) + min(r) - 10)
Buggy code:
from functools import reduce
l = [int(input()) for _ in range(5)]
r = min([i % 10 for i in l if i % 10 != 0])
l = [i // 10 * 10 + 10 for i in l]
print(reduce(lambda a, b: a + b, l) + r - 10)


Fixed code:
from functools import reduce
l = [int(input()) for _ in range(5)]
r = [i % 10 for i in l if i % 10 != 0]
l = [i if i % 10 == 0 else i // 10 * 10 + 10 for i in l]
print(reduce(lambda a, b: a + b, l) + (min(r) - 10 if r else 0))
Buggy code:
time = [int(input()) for _ in range(5)]

import math
ans = 0
minmod = 10
for i in range(n):
  if time[i]%10!=0:
    minmod = min(minmod,time[i]%10)
  else:
    minmod = min(minmod,10)
  ans += math.ceil(time[i]/10)*10

ans -= (10-minmod)
print(ans)


Fixed code:
time = [int(input()) for _ in range(5)]

import math
ans = 0
minmod = 10
for i in range(5):
  if time[i]%10!=0:
    minmod = min(minmod,time[i]%10)
  else:
    minmod = min(minmod,10)
  ans += math.ceil(time[i]/10)*10

ans -= (10-minmod)
print(ans)
Buggy code:
*t, = map(int, open(0).read().split())
try:
    m = 10 - min([i%10 for i in t if i%10])
except Value Error:
    m = 0
print(sum([-(-j // 10) for j in t])*10 - m)

Fixed code:
*t, = map(int, open(0).read().split())
try:
    m = 10 - min([i%10 for i in t if i%10])
except ValueError:
    m = 0
print(sum([-(-j // 10) for j in t])*10 - m)
Buggy code:
import math
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
li = [A, B, C, D, E]
print(li)
temp = 9
idx = -1
for i in range(len(li)):
    if 0 != li[i] % 10 and temp >= li[i] % 10:
        temp = li[i] % 10
        idx = i

result = 0
for i in range(len(li)):
    if idx == i:
        result += li[i]
    else:
        result += math.ceil(li[i] / 10) * 10
print(result)


Fixed code:
import math
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
li = [A, B, C, D, E]
temp = 9
idx = -1
for i in range(len(li)):
    if 0 != li[i] % 10 and temp >= li[i] % 10:
        temp = li[i] % 10
        idx = i

result = 0
for i in range(len(li)):
    if idx == i:
        result += li[i]
    else:
        result += math.ceil(li[i] / 10) * 10
print(result)
Buggy code:
a = [int(input()) for i in range(5)]
m=0
n=0
for i in a:
  if i%10 == 0:
    t = 0
  else:
    t = i-i*10
  n += i+t
  m = max(m,t)
print(n-m)

Fixed code:
a = [int(input()) for i in range(5)]
m = 0
n = 0
for i in a:
  if i%10 != 0:
    t = 10 - i%10
  else:
    t = 0
  n += i + t
  m = max(m,t)
print(n-m)
Buggy code:
import math
s = []
l = []

for i in range(5):
    d = int(input())
    t = math.ceil(d/10)
    s.append(t)
    l.append(t-d/10)
    
print(int(sum(s) - max(l))*10 )

Fixed code:
import math
s = []
l = []

for i in range(5):
    d = int(input())
    t = math.ceil(d / 10)
    s.append(t)
    l.append(t-d/10)
    
print(int((sum(s) - max(l))*10))
Buggy code:
a=list(int(input()) for i in range(5))

b=[-(-a[i]//10)*10 for i in range(5)]
c=[a[i]%10 for i in range(5) if a[i]%10 != 0]
print(b)

print(sum(b) + min(c) -10)


Fixed code:
a=list(int(input()) for i in range(5))

b=[-(-a[i]//10)*10 for i in range(5)]
c=[a[i]%10 for i in range(5) if a[i]%10 != 0]

if c != []:
    print(sum(b) + min(c) -10)
else:
    print(sum(b))
Buggy code:
xs = [int(input()) for i in range(5)]
ps = []
for x in xs:
	ps.append(((x-1)%10+1, x))
ps.sort()
ans = 0
ans += ps[0][1]
for i in range(1, 5):
	print(ps[i])
	ans += (ps[i][1] + 9) // 10 * 10
print(ans)


Fixed code:
xs = [int(input()) for i in range(5)]
ps = []
for x in xs:
	ps.append(((x-1)%10+1, x))
ps.sort()
ans = 0
ans += ps[0][1]
for i in range(1, 5):
	ans += (ps[i][1] + 9) // 10 * 10
print(ans)
Buggy code:
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')

L = list(map(int, read().decode("utf-8").split()))

last_ = L[0] % 10
last_index = 0
for i, t in enumerate(L):
    if 0 < t % 10 < last_:
        last_ = t % 10
        last_index = i

ans = 0
for i, t in enumerate(L):
    if i != last_index:
        ans += t
        if t % 10:
            ans += 10 - (t % 10)
        print(ans)
print(last_index)
ans += L[last_index]
print(ans)

Fixed code:
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')

L = list(map(int, read().decode("utf-8").split()))

last_ = L[0] % 10
last_index = 0
for i, t in enumerate(L):
    if 0 < t % 10 < last_:
        last_ = t % 10
        last_index = i

ans = 0
for i, t in enumerate(L):
    if i != last_index:
        ans += t
        if t % 10:
            ans += 10 - (t % 10)
ans += L[last_index]
print(ans)
Buggy code:
import sys

dishes = [int(line.strip()) for line in sys.stdin]
min1 = None
for d in dishes:
  if 0 < d%10 < min1:
    min1 = d%10
if not min1:
  min1 = 0
    
dishes = [((d+9)//10)*10 for d in dishes]
print(sum(dishes)-(10-min1))


Fixed code:
import sys

dishes = [int(line.strip()) for line in sys.stdin]
min1 = 10
for d in dishes:
  if 0 < d%10 < min1:
    min1 = d%10
if min1 == 0:
  min1 = 10
dishes = [((d+9)//10)*10 for d in dishes]
print(sum(dishes)-(10-min1))
Buggy code:
import itertools

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

input = [a, b, c, d, e]

dec = [n % 10 for n in input]
pair = zip(dec, input)
min_val = 999
for num in dec:
  if num != 0 and min_val > num:
    min_val = num

sum = 0
min_flag = False
for d, n in pair:
  if not min_flag and (d == min_val or d == 0):
    min_flag = True
    sum += n
  else:
    sum += (n + (10 - d))
      
print(sum)        

Fixed code:
import itertools

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

input = [a, b, c, d, e]

dec = [n % 10 for n in input]
pair = zip(dec, input)
min_val = 999
for num in dec:
  if num != 0 and min_val > num:
    min_val = num

sum = 0
min_flag = False
for d, n in pair:
  if not min_flag and d == min_val:
    min_flag = True
    sum += n
  elif d == 0:
    sum += n
  else:
    sum += (n + (10 - d))
      
print(sum)
Buggy code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

last = 9
if a % 10 != 0:
  last = a
elif (b % 10 != 0 and last % 10 > b % 10):
  last = b
elif (c % 10 != 0 and last % 10 > c % 10):
  last = c
elif (d % 10 != 0 and last % 10 > d % 10):
  last = d
elif (e % 10 != 0 and last % 10 > e % 10):
  last = e
else:
  last = a
  
print(-(-a // 10) * 10 - (-b // 10) * 10 -(-c // 10) * 10 - (-d // 10) * 10 -(-e // 10) * 10 + last + (-last // 10) * 10)

Fixed code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

last = 9
if a % 10 != 0:
  last = a
if (b % 10 != 0 and last % 10 > b % 10):
  last = b
if (c % 10 != 0 and last % 10 > c % 10):
  last = c
if (d % 10 != 0 and last % 10 > d % 10):
  last = d
if (e % 10 != 0 and last % 10 > e % 10):
  last = e
if (a % 10 == 0 and b % 10 == 0 and c % 10 == 0 and d % 10 == 0 and e % 10 == 0):
  last = a
  
print(-(-a // 10) * 10 - (-b // 10) * 10 -(-c // 10) * 10 - (-d // 10) * 10 -(-e // 10) * 10 + last + (-last // 10) * 10)
Buggy code:
def main():
    dish = [int(input()) for i in range(5)]
    dish_10 = [ [dish[i]%10, dish[i]] for i in range(5)]
    dish_10.sort()
    ans = 0
    for i in range(1,5):
        ans += ceiling_10(dish_10[i][1])
    ans += dish_10[0][1]
    print(ans)

def ceiling_10(i):
    if (i%10 == 0):
        return i
    else:
        return (i//10+1)*10
main()


Fixed code:
def main():
    dish = [int(input()) for i in range(5)]
    dish_10 = [ [dish[i]%10, dish[i]] for i in range(5)]
    for i in range(len(dish_10)):
    	if (dish_10[i][0]==0):
    		dish_10[i][0] = 10
    dish_10.sort()
    ans = 0
    for i in range(1,5):
        ans += ceiling_10(dish_10[i][1])
    ans += dish_10[0][1]
    print(ans)
 
def ceiling_10(i):
    if (i%10 == 0):
        return i
    else:
        return (i//10+1)*10
main()