qyliang/CodeNanoFix huggingface dataset:
Buggy code:
lis = []
cnt = 0
for i in range(5):
    val = 0
    a = int(input())
    while a % 10 != 0:
        a += 1
        val += 1
    lis.append(a)
    if val > cnt:
        cnt = val
print(cnt)
ans = sum(lis)
print(ans - cnt)

Fixed code:
lis = []
cnt = 0
for i in range(5):
    val = 0
    a = int(input())
    while a % 10 != 0:
        a += 1
        val += 1
    lis.append(a)
    if val > cnt:
        cnt = val
#print(cnt)
ans = sum(lis)
print(ans - cnt)
Buggy code:
a=[]
for i in range(0,5):
  a.append(int(input()))
s=0
import math
for i in a:
  s=s+(math.ceil(i/10))*10
x=10
for i in a:
  if i%10==0:
    pass
  elif i%10<x:
    x=i%10
print(x)
print(s-10+x)

Fixed code:
a=[]
for i in range(0,5):
  a.append(int(input()))
s=0
import math
for i in a:
  s=s+(math.ceil(i/10))*10
x=10
for i in a:
  if i%10==0:
    pass
  elif i%10<x:
    x=i%10
print(s-10+x)
Buggy code:
import numpy as np
A = np.array([int(input()) for _ in range(5)]).reshape(-1,1)
A = np.array(A).reshape(-1,1)
A = np.c_[A, (10 - A) * (A % 10 != 0)]
print(A)
print(sum(A[:,0]+A[:,1])-max(A[:,1]))

Fixed code:
import numpy as np
A = np.array([int(input()) for _ in range(5)]).reshape(-1,1)
A = np.array(A).reshape(-1,1)
A = np.c_[A, (10 - A % 10) * (A % 10 != 0)]
print(sum(A[:,0]+A[:,1])-max(A[:,1]))
Buggy code:
import math
 
a = []
for i in range(5):
  a.append(int(input()))

m = 0
j = 0
for i in range(5):
  if a[i] % 10 < m:
          m = a[i] % 10
          j = i

a[j], a[4] = a[4], a[j]

for i in range(5):
  if i != 4:
        a[i] = int(math.ceil(a[i] / 10) * 10)
  #print(a)
  
print(sum(a))

Fixed code:
import math
 
a = []
for i in range(5):
  a.append(int(input()))

m = 9
j = 0
for i in range(5):
  if 0 < a[i] % 10 < m:
          m = a[i] % 10
          j = i

a[j], a[4] = a[4], a[j]

for i in range(5):
  if i != 4:
        a[i] = int(math.ceil(a[i] / 10) * 10)
  #print(a)
  
print(sum(a))
Buggy code:
A = []
for _ in range(5):
    A.append(int(input()))
ans = sum([-10 * (-i//10) for i in A])
ans -= min([(10 - (i % 10)) % 10 for i in A])
print(ans)

Fixed code:
A = []
for _ in range(5):
    A.append(int(input()))
ans = sum([-10 * (-i//10) for i in A])
ans -= max([(10 - (i % 10)) % 10 for i in A])
print(ans)
Buggy code:
import math
time_list=[]

for _ in range(5):
    time_list.append(int(input()))
# print(1, time_list)

time_list2=[]
for x in time_list:
    m = x % 10
    if m!=0:
        time_list2.append(x+(10-m))
    else:
        time_list2.append(x)
# print("2", time_list2)
# print(round(102,-1))

mod_list = []
for x in time_list:
    m = x % 10
    mod_list.append(10-m)

        
min_ = max(mod_list)
# print(mod_list)



print(sum(time_list2)-min_)

Fixed code:
import math
time_list=[]

for _ in range(5):
    time_list.append(int(input()))
# print(1, time_list)

time_list2=[]
for x in time_list:
    m = x % 10
    if m!=0:
        time_list2.append(x+(10-m))
    else:
        time_list2.append(x)
# print("2", time_list2)

mod_list = []
for x in time_list:
    m = x % 10
    if m!=0:
        mod_list.append(m)
    else:
        mod_list.append(10)
min_ = min(mod_list)
# print(mod_list)



print(sum(time_list2)-(10-min_))
Buggy code:
from sys import stdin

x = []
x.append(int(stdin.readline().rstrip()))
x.append(int(stdin.readline().rstrip()))
x.append(int(stdin.readline().rstrip()))
x.append(int(stdin.readline().rstrip()))
x.append(int(stdin.readline().rstrip()))

time = []
min = 0
for i in range(0,5):
    time.append(x[i] - (x[i]%10) + 10)
    if ((x[min]-1) % 10) > ((x[i]-1) % 10):
        min = i

time[min] = x[min]

sum_time = 0
for i in range(0,5):
    sum_time += time[i]

print(sum_time)

Fixed code:
from sys import stdin

x = []
x.append(int(stdin.readline().rstrip()))
x.append(int(stdin.readline().rstrip()))
x.append(int(stdin.readline().rstrip()))
x.append(int(stdin.readline().rstrip()))
x.append(int(stdin.readline().rstrip()))

time = []
min = 0
for i in range(0,5):
    if x[i] %10 == 0:
        time.append(x[i])
    else:
        time.append(x[i] - (x[i]%10) + 10)
    if ((x[min]-1) % 10) > ((x[i]-1) % 10):
        min = i

time[min] = x[min]

sum_time = 0
for i in range(0,5):
    sum_time += time[i]

print(sum_time)
Buggy code:
a=[int(input()) for i in range(5)]
ans = 0
d1 = 10
for i in range(5):
  ans += (a[i]+9)//10*10
  if a[i]%10:
    d1=min(d1,a[i]%10)
if d1!=10:
  print(ans+d1)
if d1==10:
  print(ans)

Fixed code:
a=[int(input()) for i in range(5)]
ans = 0
d1 = 10
for i in range(5):
  ans += (a[i]+9)//10*10
  if a[i]%10:
    d1=min(d1,a[i]%10)
print(ans+d1-10)
Buggy code:
lst=[int(input()) for _ in range(5)]

c=[0]
for i in range(5):
    if lst[i]%10!=0:
        c.append(lst[i]%10)
        lst[i]=(lst[i]//10+1)*10


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

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

c=[]
for i in range(5):
    if lst[i]%10!=0:
        c.append(lst[i]%10)
        lst[i]=(lst[i]//10+1)*10

if not c:
    print(sum(lst))
else:
    print(sum(lst)+min(c)-10)
Buggy code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
l = [a,b,c,d,e]
l1 = [a%10,b%10,c%10,d%10,e%10]
l2 = [(a//10)*10+10,(b//10)*10+10,(c//10)*10+10,(d//10)*10+10,(e//10)*10+10]
for i in range(len(l)):
    if l[i]%10 == 0:
        l1[i] = 10
        l2[i] -= 10
print(sum(l2))
print((sum(l2)-(10-(min(l1)))))

Fixed code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
l = [a,b,c,d,e]
l1 = [a%10,b%10,c%10,d%10,e%10]
l2 = [(a//10)*10+10,(b//10)*10+10,(c//10)*10+10,(d//10)*10+10,(e//10)*10+10]
for i in range(len(l)):
    if l[i]%10 == 0:
        l1[i] = 10
        l2[i] -= 10
print((sum(l2)-(10-(min(l1)))))
Buggy code:
foods = [int(input()) for i in range(5)]
time = 0
rest = list(map(lambda x: x % 10, foods))
for i in range(5):
    if rest[i] == 0:
        time += foods[i]
    else:
        time += foods[i] - rest[i] + 10

if not all(rest):
   print(time)
else:
    print(time - 10 + min([i for i in rest if i != 0]))

Fixed code:
foods = [int(input()) for i in range(5)]
time = 0
rest = list(map(lambda x: x % 10, foods))
for i in range(5):
    if rest[i] == 0:
        time += foods[i]
    else:
        time += foods[i] - rest[i] + 10

if any(rest):
    print(time - 10 + min([i for i in rest if i != 0]))
else:
    print(time)
Buggy code:
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

a = A % 10
b = B % 10
c = C % 10
d = D % 10
e = E % 10

l = [a,b,c,d,e]
m = min([i for i in l if i != 0])
n = l.count(0)
ans = (A//10 + B//10 + C//10 + D//10 + E//10)*10 + m + (5-n)*10
print(ans)


Fixed code:
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

a = A % 10
b = B % 10
c = C % 10
d = D % 10
e = E % 10

l = [a,b,c,d,e]
if len([i for i in l if i != 0]) == 0:
    m = 10
    
else:
    m = min([i for i in l if i != 0])
n = l.count(0)
ans = (A//10 + B//10 + C//10 + D//10 + E//10)*10 + m + (5-n)*10 -10
print(ans)
Buggy code:
m=[int(input()) for i in range(5)]
k = []
j=[]
for i in range(5):
    j.append(-(-m[i]//10)*10)
    k.append(m[i] - (m[i]//10)*10)
if min(k) == 0:
    print(sum(j))
else:
    print(sum(j)-(10-min(k)))

Fixed code:
m=[int(input()) for i in range(5)]
k = []
j=[]
for i in range(5):
    j.append(-(-m[i]//10)*10)
    
    
    t=m[i] - (m[i]//10)*10
    if t>0:
        k.append(t)
if len(k)==0:
    print(sum(j))
else:
    print(sum(j)-(10-min(k)))
Buggy code:
li = []
l = []
for i in range(5):
    a = int(input())
    li.append(a)
    l.append(a%10)
ind = l.index(min(l))
ans = 0
for i in range(5):
    if i != ind:
        ans += (li[i] + 10- l[i]) 
print(ans+li[ind])              

Fixed code:
li = []
l = []
for i in range(5):
    a = int(input())
    li.append(a)
    if a % 10 != 0:
        l.append(a%10)
    else:
        l.append(10)
ind = l.index(min(l))
ans = 0
for i in range(5):
    if i != ind and i != 10:
        ans += (li[i] + 10 - l[i])
    elif i != ind and i == 10:
        ans += (li[i] - l[i])
print(ans+li[ind])
Buggy code:
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

d = 10
ans = 0
if A % 10 == 0:
    ans += A
else:
    ans += (A//10+1)*10
    d = min(A - A//10*10, d)

if B % 10 == 0:
    ans += B
else:
    ans += (B//10+1)*10
    d = min(B - B//10*10, d)

if C % 10 == 0:
    ans += C
else:
    ans += (C//10+1)*10
    d = min(C - C//10*10, d)

if D % 10 == 0:
    ans += D
else:
    ans += (D//10+1)*10
    d = min(D - d//10*10, d)
    
if E % 10 == 0:
    ans += E
else:
    ans += (E//10+1)*10
    d = min(E - E//10*10, d)

if d != 10:
    ans -= 10 - d
    
print(ans)

Fixed code:
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

d = 10
ans = 0
if A % 10 == 0:
    ans += A
else:
    ans += (A//10+1)*10
    d = min(A - A//10*10, d)

if B % 10 == 0:
    ans += B
else:
    ans += (B//10+1)*10
    d = min(B - B//10*10, d)

if C % 10 == 0:
    ans += C
else:
    ans += (C//10+1)*10
    d = min(C - C//10*10, d)

if D % 10 == 0:
    ans += D
else:
    ans += (D//10+1)*10
    d = min(D - D//10*10, d)
    
if E % 10 == 0:
    ans += E
else:
    ans += (E//10+1)*10
    d = min(E - E//10*10, d)

if d != 10:
    ans -= 10 - d
    
print(ans)
Buggy code:
def ceil(v):
	if v % 10 == 0:
		return v
	else:
		return (v // 10+1) *10

A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

times = [A,B,C,D,E]

minMod = 9
last = -1
for time in times:
	if minMod > (time+9) % 10:
		minMod = (time+9) % 10
		last = time
		
times.remove(last)

for i,time in enumerate(times):
	times[i] = ceil(time)
	
times.append(last)

print(times)
print(sum(times))

Fixed code:
def ceil(v):
	if v % 10 == 0:
		return v
	else:
		return (v // 10+1) *10

A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

times = [A,B,C,D,E]

minMod = 9
last = times[0]
for time in times:
	if minMod > (time+9) % 10:
		minMod = (time+9) % 10
		last = time
		
times.remove(last)

for i,time in enumerate(times):
	times[i] = ceil(time)
	
times.append(last)

print(sum(times))
Buggy code:
import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def pf(s): return print(s, flush=True)

dishes=[I() for i in range(0,5)]
rounded = []
for i in dishes:
    if i%10 != 0:
        i += 10 - i % 10
    rounded.append(i)
result=10**10
for i in range(len(dishes)):
    # order i in the end
    result = min(result, sum([r for ridx, r in rounded if ridx != i] + dishes[i])
    
print(result)
    
    

Fixed code:
import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def pf(s): return print(s, flush=True)

dishes=[I() for i in range(0,5)]
rounded = []
for i in dishes:
    if i%10 != 0:
        i += 10 - i % 10
    rounded.append(i)
result=10**10
for i in range(len(dishes)):
    # order i in the end
    result = min(result, sum([r for ridx, r in enumerate(rounded) if ridx != i]) + dishes[i])
    
print(result)
Buggy code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

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

order_list = []
for x in X:
    priority = x % 10
    if priority == 0:
        priority = 10
    order_list.append([x, priority])

order_list.sort(key=lambda order: order[1])

total_time = 0
for time, priority in order_list[1:]:
    plus10 = 0
    if time % 10 > 0:
        plus10 = 10
    actual_time = time//10*10 + plus10
    total_time += actual_time
    print([time, priority], actual_time, total_time)

order = order_list.pop(0)
time = order[0]
total_time += time

print(total_time)


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

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

order_list = []
for x in X:
    priority = x % 10
    if priority == 0:
        priority = 10
    order_list.append([x, priority])

order_list.sort(key=lambda order: order[1])

total_time = 0
for time, priority in order_list[1:]:
    plus10 = 0
    if time % 10 > 0:
        plus10 = 10
    actual_time = time//10*10 + plus10
    total_time += actual_time
    #print([time, priority], actual_time, total_time)

order = order_list.pop(0)
time = order[0]
total_time += time

print(total_time)
Buggy code:
l = [int(input())for i in range(5)]
l1 = []*5
ans = 0
for i in range(5):
    l1[i] = l[i]%10
for i in range(5):
    ans += -(-l[i]//10)
print(ans*10 + min(l1))

Fixed code:
l = [int(input())for i in range(5)]
l1 = ['']*5
ans = 0
for i in range(5):
    l1[i] = l[i]%10
    if l1[i] == 0:
        l1[i] = 10
for i in range(5):
    ans += -(-l[i]//10)
print(ans*10 - 10 + min(l1))
Buggy code:
inputs=[int(input()) for i in range(5)]
summ=0
k=0
for i in inputs:
    if i%10==0:
        summ=summ+i
    else:
        s,m=divmod(i,10)
        summ=summ+(s+1)*10
		if 10-m>10-k:
          k=m
summ=summ-10+k
print(summ)


Fixed code:
inputs = [int(input()) for i in range(5)]
summ = 0
k = 10
for i in inputs:
    if i % 10 == 0:
        summ = summ + i
    else:
        s, m = divmod(i, 10)
        summ = summ + (s + 1) * 10
        if m < k:
            k = m

summ = summ -((10-k)%10)
print(summ)
Buggy code:
a = []
for i in range(5):
  a.append(int(input()))

b = [[i, i%10] for i in a]

b.sort(key=lambda x:x[1])
s=b[0][0]
for i in range(1,5):
  s += b[i][0] if b[i][1] == 0 else (b[i][0]+10)//10*10
print(s)

Fixed code:
a = []
for i in range(5):
  a.append(int(input()))

b = [[i, i%10] for i in a]

b.sort(key=lambda x:x[1])
s=0
flag = 0
for i in range(5):
    if b[i][1] == 0:
        s += b[i][0]
    else:
        if flag == 0:
            s += b[i][0]
            flag = 1
        else :
            s += (b[i][0]+10)//10*10
print(s)
Buggy code:
import copy
li=[int(input()) for i in range(5)]

ans=10**9
temp=0

for j in li:
    temp = j
    li2 = copy.copy(li)
    li2.remove(j)
    for k in li2:
        temp += k + (10 - (k % 10))
    ans = min(ans, temp)

print(ans)

Fixed code:
import copy
li=[int(input()) for i in range(5)]

ans=10**9
temp=0

for j in li:
    temp = j
    li2 = copy.copy(li)
    li2.remove(j)
    for k in li2:
        if k % 10 != 0:
            temp += k + (10 - (k % 10))
        else:
            temp += k
    ans = min(ans, temp)

print(ans)
Buggy code:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
ls = []
for i in range(5):
    ls.append(int(input()))

lasttime = 10
for a in ls:
    b = a%10
    if b < lasttime:
        lasttime = a

ls.remove(a)
sum =0
for i in ls:
    if i%10 ==0:
        sum +=i
    else:
        p = i//10
        sum += (p+1)*10

print(sum + a)



Fixed code:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
ls = []
for i in range(5):
    ls.append(int(input()))
ls2 = [i%10 for i in ls]
if ls2 == [0,0,0,0,0]:
    print(sum(ls))
else:
    lasttime = 10
    for a in ls:
        b = a%10
        if b < lasttime and b != 0:
            lasttime = b
            ans =a

    ls.remove(ans)
    sum =0
    for i in ls:
        if i%10 ==0:
            sum +=i
        else:
            p = i//10
            sum += (p+1)*10

    print(int(sum + ans))
Buggy code:
a=[int(input()) for i in range(5)]
ans=0
b=sorted([a[i]%10 for i in range(5)])
for i in range(5):
    print(ans)
    ans+=((a[i]+9)//10)*10
for i in range(5):
    if b[i]!=0:
        ans+=b[i]-10
        break
print(ans)

Fixed code:
a=[int(input()) for i in range(5)]
ans=0
b=sorted([a[i]%10 for i in range(5)])
for i in range(5):
    #print(ans)
    ans+=((a[i]+9)//10)*10
for i in range(5):
    if b[i]!=0:
        ans+=b[i]-10
        break
print(ans)
Buggy code:
t = [int(input()) for i in range(5)]
t.sort()
count = 0
min_list = [t[0]%10,t[1]%10,t[2]%10,t[3]%10,t[4]%10]
for i in range(5):
    x = min_list[i]
    if x != 0:
        break
f =min([t[0]%10,t[1]%10,t[2]%10,t[3]%10,t[4]%10])
for i in range(5):
    if t[i]%10 == 0 :
        t[i] = t[i]-1
        count = 1
a =(t[4]//10+1)*10
b =(t[3]//10+1)*10
c =(t[2]//10+1)*10
d =(t[1]//10+1)*10
e =(t[0]//10+1)*10
if count == 0:
    print(a+b+c+d+e+f-10)
else:
    print(a+b+c+d+e+x-10)

Fixed code:
t = [int(input()) for i in range(5)]
t.sort()
count = 0
min_list = [t[0]%10,t[1]%10,t[2]%10,t[3]%10,t[4]%10]
min_list.sort()
for i in range(5):
    x = min_list[i]
    if x != 0:
        break
f =min([t[0]%10,t[1]%10,t[2]%10,t[3]%10,t[4]%10])
for i in range(5):
    if t[i]%10 == 0 :
        t[i] = t[i]-1
        count = 1
a =(t[4]//10+1)*10
b =(t[3]//10+1)*10
c =(t[2]//10+1)*10
d =(t[1]//10+1)*10
e =(t[0]//10+1)*10
if count == 0:
        print(a+b+c+d+e+f-10)
else:
    if min_list == [0]*5:
        print(a+b+c+d+e)
    else:
        print(a+b+c+d+e+x-10)
Buggy code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

time = [[a, a%10], [b, b%10], [c, c%10], [d, d%10], [e, e%10]]
ans = 0

for i in range(5):
	if time[i][1] == 0:
		time[i][1] = 10
		
time = sorted(time, key = lambda x:x[1], reverse = True)

for i in range(4):
	ans += int(time[i][0] / 10) * 10 + 10
	
print(ans + time[4][0])

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

time = [[a, a%10], [b, b%10], [c, c%10], [d, d%10], [e, e%10]]
ans = 0

for i in range(5):
	if time[i][1] == 0:
		time[i][1] = 10
		
time = sorted(time, key = lambda x:x[1], reverse = True)

for i in range(4):
	ans += time[i][0] + (10 - time[i][1])
	
print(ans + time[4][0])
Buggy code:
_list = [int(input()) for i in range(5)]

last_order_candidate_value = _list[0]
minimum_mod_10 = 9
for i in range(len(_list)):
    minutes_mod_10 = _list[i] % 10
    if minutes_mod_10 != 0 and minimum_mod_10 < minutes_mod_10:
        minimum_mod_10 = minutes_mod_10
        last_order_candidate_value = _list[i]

_list.remove(last_order_candidate_value)

elaps = 0
for i in range(len(_list)):
    elaps = elaps + _list[i]
    if (elaps%10 != 0):
        elaps = elaps + (10 - elaps%10)
elaps = elaps + last_order_candidate_value

print(elaps)






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

last_order_candidate_value = _list[0]
minimum_mod_10 = 9
for i in range(len(_list)):
    minutes_mod_10 = _list[i] % 10
    if minutes_mod_10 != 0 and minimum_mod_10 > minutes_mod_10:
        minimum_mod_10 = minutes_mod_10
        last_order_candidate_value = _list[i]

_list.remove(last_order_candidate_value)

elaps = 0
for i in range(len(_list)):
    elaps = elaps + _list[i]
    if (elaps%10 != 0):
        elaps = elaps + (10 - elaps%10)
elaps = elaps + last_order_candidate_value

print(elaps)
Buggy code:
l = []
for i in range(5):
    l.append(int(input()))
amari = []
for i in range(5):
    amari.append(l[i]%10)
jikan = []
for i in range(5):
    if amari[i] == 0:
        jikan.append(l[i])
    else :
        jikan.append(l[i] + (10-amari[i]))

print(sum(jikan) - (10-min(amari)))


Fixed code:
l = []
for i in range(5):
    l.append(int(input()))
amari = []
for i in range(5):
    if 10-l[i]%10 == 10 :
        amari.append(0)
    else :
        amari.append(10-l[i]%10)
jikan = []
for i in range(5):
    if amari[i] == 10:
        jikan.append(l[i])
    else :
        jikan.append(l[i] + amari[i])

print(sum(jikan)-max(amari))
Buggy code:
A,B,C,D,E = [int(input()) for _ in range(5)]
a = A % 10
b = B % 10
c = C % 10
d = D % 10
e = E % 10
if a == b == c == d == e == 0:
  print(A+B+C+D+E)
else:
  print(A-a+B-b+C-c+D-d+E-e-max(10-a,10-b,10-c,10-d,10-e)

Fixed code:
A,B,C,D,E = [int(input()) for _ in range(5)]
a = (10-A) % 10
b = (10-B) % 10
c = (10-C) % 10
d = (10-D) % 10
e = (10-E) % 10
if a == b == c == d == e == 0:
  print(A+B+C+D+E)
else:
  print(A+B+C+D+E+a+b+c+d+e-max(a,b,c,d,e))
Buggy code:

A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
 
a = 10 - A % 10
b = 10 - B % 10
c = 10 - C % 10
d = 10 - D % 10
e = 10 - E % 10
 
print(A+B+C+D+E+a+b+c+d+e-max([a,b,c,d,e]))

Fixed code:
# B
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
 
a = (10 - A) % 10
b = (10 - B) % 10
c = (10 - C) % 10
d = (10 - D) % 10
e = (10 - E) % 10
 
print(A+B+C+D+E+a+b+c+d+e-max([a,b,c,d,e]))
Buggy code:
import sys
from collections import defaultdict


def input():
    return sys.stdin.readline().rstrip()


def main():
    a = int(input())
    b = int(input())
    c = int(input())
    d = int(input())
    e = int(input())

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

    d = 0
    p = []

    for i in range(5):
        x, y = divmod(W[i], 10)
        if y == 0:
            d += x
            p.append(y)
        else:
            d += x + 1
            p.append(y)

    print(d * 10 + min(p)-10)


if __name__ == "__main__":
    main()


Fixed code:
import sys
from collections import defaultdict


def input():
    return sys.stdin.readline().rstrip()


def main():
    a = int(input())
    b = int(input())
    c = int(input())
    d = int(input())
    e = int(input())

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

    d = 0
    p = []

    for i in range(5):
        x, y = divmod(W[i], 10)
        if y == 0:
            d += x
            p.append(10)
        else:
            d += x + 1
            p.append(y)

    print(d * 10 + min(p)-10)


if __name__ == "__main__":
    main()
Buggy code:
a=[int(input()) for _ in [0]*5]
b=[-(-a//10)*10-i for i in a]
print(sum(b)+sum(a)-max(b))

Fixed code:
a=[int(input()) for _ in [0]*5]
b=[-(-i//10)*10-i for i in a]
print(sum(b)+sum(a)-max(b))
Buggy code:
a = []
for _ in range(5):
    b = int(input())
    t = 10 if b%10 == 0 else b%10
    a.append((t, b))
a.sort()
a.reverse()
c = 0
for i in range(4):
    c += round(a[i][1], -1)
c += a[-1][1]
print(c)

Fixed code:
a = []
for _ in range(5):
    b = int(input())
    t = 10 if b%10 == 0 else b%10
    a.append((t, b))
a.sort()
a.reverse()
c = 0
for i in range(4):
    if a[i][0] == 10:
        c += (a[i][1]  - a[i][1] % 10)
    else:
        c += (a[i][1] + (10 - a[i][1] % 10))
c += a[-1][1]
print(c)
Buggy code:
import numpy as np
l = np.zeros(5)
t = np.zeros(5)
k = True
for i in range(5):
    l[i] = int(input())
    t[i] = l[i] - (l[i]//10)*10
    if t[i] != 0 :
        k = False
t.sort()
l = np.ceil(l/10)*10
if k :
    ans = int(np.sum(l)+t[0])
else :
    ans = int(np.sum(l)+t[0])-10
print(ans)




Fixed code:
import numpy as np
l = np.zeros(5)
t = np.zeros(5)
k = True
for i in range(5):
    l[i] = int(input())
    t[i] = l[i] - (l[i]//10)*10
    if t[i] != 0 :
        k = False
t.sort()
for i in range(5):
    if t[i] != 0:
        s = t[i]
        break
l = np.ceil(l/10)*10
if k :
    ans = int(np.sum(l))
else :
    ans = int(np.sum(l)+s)-10
print(ans)
Buggy code:
ten = a//10 + b//10 + c//10 + d//10 + e//10

aa = [a%10,b%10,c%10,d%10,e%10]
zero = aa.count(0)

if zero == 5:
	print(ten)
else:
	for i in range(1,10):
		if  i in aa:
			one = i
			break
	print(ten*10 + (4-zero)*10 +one)

Fixed code:

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


ten = a//10 + b//10 + c//10 + d//10 + e//10

aa = [a%10,b%10,c%10,d%10,e%10]
zero = aa.count(0)

if zero == 5:
	print(ten*10)
else:
	for i in range(1,10):
		if  i in aa:
			one = i
			break
	print(ten*10 + (4-zero)*10 +one)