TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: The restaurant AtCoder serves the following five dishes:    * ABC Don (rice bowl): takes A minutes to serve.   * ARC Curry: takes B minutes to serve.   * AGC Pasta: takes C minutes to serve.   * APC Ramen: takes D minutes to serve.   * ATC Hanbagu (hamburger patty): takes E minutes to serve.  Here, the time to serve a dish is the time between when an order is placed and when the dish is delivered.  This restaurant has the following rules on orders:    * An order can only be placed at a time that is a multiple of 10 (time 0, 10, 20, ...).   * Only one dish can be ordered at a time.   * No new order can be placed when an order is already placed and the dish is still not delivered, but a new order can be placed at the exact time when the dish is delivered.  E869120 arrives at this restaurant at time 0. He will order all five dishes. Find the earliest possible time for the last dish to be delivered.   Here, he can order the dishes in any order he likes, and he can place an order already at time 0.

Submission attempts (in order):
a = [0]*5
for i in range(len(a)):
  a[i] = int(input())
for i in range(0,len(a)-1):
  for j in range(len(a)-1,i,-1):
    if(a[j-1]%10 < a[j]%10):
      temp = a[j]
      a[j] = a[j-1]
      a[j-1] = temp
for i in range(len(a)):
  if(a[i]%10 != 0 and i != len(a)-1):
    a[i] = a[i]+(10 - a[i]%10)
print(sum(a))

a = []
for i in range(5):
    a.append(int(input()))
b = []
for i in a:
    if i%10:
        b.append(i)
c = min(b,key = lambda x:x%10) if len(b) else 0
ans = 0
for i in a:
    ans += i+(10-i%10) if i%10 else i
print(ans-(10-c%10) if len(b) else ans)

Verdicts: Wrong Answer

Accepted
Problem: The restaurant AtCoder serves the following five dishes:    * ABC Don (rice bowl): takes A minutes to serve.   * ARC Curry: takes B minutes to serve.   * AGC Pasta: takes C minutes to serve.   * APC Ramen: takes D minutes to serve.   * ATC Hanbagu (hamburger patty): takes E minutes to serve.  Here, the time to serve a dish is the time between when an order is placed and when the dish is delivered.  This restaurant has the following rules on orders:    * An order can only be placed at a time that is a multiple of 10 (time 0, 10, 20, ...).   * Only one dish can be ordered at a time.   * No new order can be placed when an order is already placed and the dish is still not delivered, but a new order can be placed at the exact time when the dish is delivered.  E869120 arrives at this restaurant at time 0. He will order all five dishes. Find the earliest possible time for the last dish to be delivered.   Here, he can order the dishes in any order he likes, and he can place an order already at time 0.

Submission attempts (in order):
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
f=[a,b,c,d,e]
f.sort()
x=0
for i in range(5):
  if f[i]%10==0:
    x=x+f[i]
  if f[i]%10!=0:
    x=x+(f[i]//10)*10+10
g=a-(a//10)*10
h=b-(b//10)*10
i=c-(c//10)*10
j=d-(d//10)*10
k=e-(e//10)*10
l=[g,h,i,j,k]
l.sort()
print(x-(10-l[0]))

a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
f=[a,b,c,d,e]
f.sort()
x=0
for i in range(5):
  if f[i]%10==0:
    x=x+f[i]
  if f[i]%10!=0:
    x=x+(f[i]//10)*10+10
g=a-(a//10)*10
h=b-(b//10)*10
i=c-(c//10)*10
j=d-(d//10)*10
k=e-(e//10)*10
l=[g,h,i,j,k]
l.sort()
y=0
z=0
for i in range(5):
  if l[i]!=0:
    y=y+1
    z=i
    break
if y==0:
  print(x)
else:
  print(x-(10-l[z]))

Verdicts: Wrong Answer

Accepted
Problem: The restaurant AtCoder serves the following five dishes:    * ABC Don (rice bowl): takes A minutes to serve.   * ARC Curry: takes B minutes to serve.   * AGC Pasta: takes C minutes to serve.   * APC Ramen: takes D minutes to serve.   * ATC Hanbagu (hamburger patty): takes E minutes to serve.  Here, the time to serve a dish is the time between when an order is placed and when the dish is delivered.  This restaurant has the following rules on orders:    * An order can only be placed at a time that is a multiple of 10 (time 0, 10, 20, ...).   * Only one dish can be ordered at a time.   * No new order can be placed when an order is already placed and the dish is still not delivered, but a new order can be placed at the exact time when the dish is delivered.  E869120 arrives at this restaurant at time 0. He will order all five dishes. Find the earliest possible time for the last dish to be delivered.   Here, he can order the dishes in any order he likes, and he can place an order already at time 0.

Submission attempts (in order):
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)


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)

Verdicts: Runtime Error

Accepted
Problem: The restaurant AtCoder serves the following five dishes:    * ABC Don (rice bowl): takes A minutes to serve.   * ARC Curry: takes B minutes to serve.   * AGC Pasta: takes C minutes to serve.   * APC Ramen: takes D minutes to serve.   * ATC Hanbagu (hamburger patty): takes E minutes to serve.  Here, the time to serve a dish is the time between when an order is placed and when the dish is delivered.  This restaurant has the following rules on orders:    * An order can only be placed at a time that is a multiple of 10 (time 0, 10, 20, ...).   * Only one dish can be ordered at a time.   * No new order can be placed when an order is already placed and the dish is still not delivered, but a new order can be placed at the exact time when the dish is delivered.  E869120 arrives at this restaurant at time 0. He will order all five dishes. Find the earliest possible time for the last dish to be delivered.   Here, he can order the dishes in any order he likes, and he can place an order already at time 0.

Submission attempts (in order):
#2019/10/04
time = list(map(int, open(0).read().split()))
# print(time)

time_residual = [i%10 for i in time]
# print(time_residual)

time_residual_notZero = [i for i in time_residual if i%10 != 0 ]


#ans = sum([-(-i//10)*10 for i in time]) + min(time_residual_notZero) - 10
#print(ans)

#2019/10/04
time = list(map(int, open(0).read().split()))
# print(time)


# print(time_residual)




#ans = sum([-(-i//10)*10 for i in time]) + min(time_residual_notZero) - 10
#print(ans)

#2019/10/04
time = list(map(int, open(0).read().split()))
# print(time)

time_residual = [i%10 for i in time]
# print(time_residual)

time_residual_notZero = [i for i in time_residual if i%10 != 0 ]


ans = sum([-(-i//10)*10 for i in time]) + min(time_residual_notZero) - 10
#print(ans)

#2019/10/04
time = list(map(int, open(0).read().split()))
# print(time)

time_residual = [i%10 for i in time]
# print(time_residual)




#ans = sum([-(-i//10)*10 for i in time]) + min(time_residual_notZero) - 10
#print(ans)

#2019/10/04
time = list(map(int, open(0).read().split()))
# print(time)

time_residual = [i%10 for i in time]
# print(time_residual)

time_residual_notZero = [i for i in time_residual if i%10 != 0 ]


if(time_residual_notZero != []):
    ans = sum([-(-i//10)*10 for i in time]) + min(time_residual_notZero) - 10
else:
    ans = sum(time)
print(ans)

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: The restaurant AtCoder serves the following five dishes:    * ABC Don (rice bowl): takes A minutes to serve.   * ARC Curry: takes B minutes to serve.   * AGC Pasta: takes C minutes to serve.   * APC Ramen: takes D minutes to serve.   * ATC Hanbagu (hamburger patty): takes E minutes to serve.  Here, the time to serve a dish is the time between when an order is placed and when the dish is delivered.  This restaurant has the following rules on orders:    * An order can only be placed at a time that is a multiple of 10 (time 0, 10, 20, ...).   * Only one dish can be ordered at a time.   * No new order can be placed when an order is already placed and the dish is still not delivered, but a new order can be placed at the exact time when the dish is delivered.  E869120 arrives at this restaurant at time 0. He will order all five dishes. Find the earliest possible time for the last dish to be delivered.   Here, he can order the dishes in any order he likes, and he can place an order already at time 0.

Submission attempts (in order):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

a1 = (a + 9) // 10 * 10
b1 = (b + 9) // 10 * 10
c1 = (c + 9) // 10 * 10
d1 = (d + 9) // 10 * 10
e1 = (e + 9) // 10 * 10

print(a1, b1, c1, d1, e1)

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

a1 = (a + 9) // 10 * 10
b1 = (b + 9) // 10 * 10
c1 = (c + 9) // 10 * 10
d1 = (d + 9) // 10 * 10
e1 = (e + 9) // 10 * 10

print(a1 + b1 + c1 + d1 + e1)

lossmax = 0
total = 0
for i in range(5):
    a = int(input())
    x = (a + 9) // 10 * 10
    total += x
    if lossmax < x - a:
        lossmax = x - a

total -= lossmax
print(total)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: The restaurant AtCoder serves the following five dishes:    * ABC Don (rice bowl): takes A minutes to serve.   * ARC Curry: takes B minutes to serve.   * AGC Pasta: takes C minutes to serve.   * APC Ramen: takes D minutes to serve.   * ATC Hanbagu (hamburger patty): takes E minutes to serve.  Here, the time to serve a dish is the time between when an order is placed and when the dish is delivered.  This restaurant has the following rules on orders:    * An order can only be placed at a time that is a multiple of 10 (time 0, 10, 20, ...).   * Only one dish can be ordered at a time.   * No new order can be placed when an order is already placed and the dish is still not delivered, but a new order can be placed at the exact time when the dish is delivered.  E869120 arrives at this restaurant at time 0. He will order all five dishes. Find the earliest possible time for the last dish to be delivered.   Here, he can order the dishes in any order he likes, and he can place an order already at time 0.

Submission attempts (in order):
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
a_moji=str(a)
b_moji=str(b)
c_moji=str(c)
d_moji=str(d)
e_moji=str(e)

a1=int(a_moji[-1])
a1_moji=str(a1)
if a1==0:
    a1=10
a_kiriage=a+10-a1

b1=int(b_moji[-1])
b1_moji=str(b1)
if b1==0:
    b1=10
b_kiriage=b+10-b1

c1=int(c_moji[-1])
c1_moji=str(c1)
if c1==0:
    c1=10
c_kiriage=c+10-c1

d1=int(d_moji[-1])
d1_moji=str(d1)
if d1==0:
    d1=10
d_kiriage=d+10-d1

e1=int(e_moji[-1])
e1_moji=str(e1)
if e1==0:
    e1=10
e_kiriage=e+10-e1

k=10
if k>a1:
    k=a1
if k>b1:
    k=b1
if k>c1:
    k=c1
if k>d1:
    k=d1
if k>e1:
    k=e1
print(k)
goke=a_kiriage+b_kiriage+c_kiriage+d_kiriage+e_kiriage+k-10
print(goke)


a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
a_moji=str(a)
b_moji=str(b)
c_moji=str(c)
d_moji=str(d)
e_moji=str(e)

a1=int(a_moji[-1])
a1_moji=str(a1)
if a1==0:
    a1=10
a_kiriage=a+10-a1

b1=int(b_moji[-1])
b1_moji=str(b1)
if b1==0:
    b1=10
b_kiriage=b+10-b1

c1=int(c_moji[-1])
c1_moji=str(c1)
if c1==0:
    c1=10
c_kiriage=c+10-c1

d1=int(d_moji[-1])
d1_moji=str(d1)
if d1==0:
    d1=10
d_kiriage=d+10-d1

e1=int(e_moji[-1])
e1_moji=str(e1)
if e1==0:
    e1=10
e_kiriage=e+10-e1

k=10
if k>a1:
    k=a1
if k>b1:
    k=b1
if k>c1:
    k=c1
if k>d1:
    k=d1
if k>e1:
    k=e1
goke=a_kiriage+b_kiriage+c_kiriage+d_kiriage+e_kiriage+k-10
print(goke)

Verdicts: Wrong Answer

Accepted
Problem: The restaurant AtCoder serves the following five dishes:    * ABC Don (rice bowl): takes A minutes to serve.   * ARC Curry: takes B minutes to serve.   * AGC Pasta: takes C minutes to serve.   * APC Ramen: takes D minutes to serve.   * ATC Hanbagu (hamburger patty): takes E minutes to serve.  Here, the time to serve a dish is the time between when an order is placed and when the dish is delivered.  This restaurant has the following rules on orders:    * An order can only be placed at a time that is a multiple of 10 (time 0, 10, 20, ...).   * Only one dish can be ordered at a time.   * No new order can be placed when an order is already placed and the dish is still not delivered, but a new order can be placed at the exact time when the dish is delivered.  E869120 arrives at this restaurant at time 0. He will order all five dishes. Find the earliest possible time for the last dish to be delivered.   Here, he can order the dishes in any order he likes, and he can place an order already at time 0.

Submission attempts (in order):
L = []
for i in range(5):
    L.append(int(input()))

L1 = [x for x in L if x%10 == 0]
L2 = [x for x in L if x%10 != 0]
L3 = [(x%10,x//10) for x in L2]

ans = sum(L1)
if len(L3)>0:
	L3.sort(reverse = True)
	for i in range(len(L3)-1):
    	ans += (L3[i][1]+1)*10
	ans += L3[-1][1]*10+L3[-1][0]
print(ans) 

li = []
for i in range(5):
    li.append(int(input()))
li2 = [x%10 for x in li]
li3,li4 = [],[]
for i,j in zip(li,li2):
    li3.append([i,j])
li3.sort( key = lambda x:x[1])
import math
for i in range(len(li3)):
    if i == 0:
        li4.append(li3[i][0])
    else:
        li4.append(math.ceil(li3[i][0]/10)*10)
print(sum(li4))

L = []
for i in range(5):
    L.append(int(input()))

L1 = [x for x in L if x%10 == 0]
L2 = [x for x in L if x%10 != 0]
L3 = [(x%10,x//10) for x in L2]

ans = sum(L1)
if len(L3)>0:
  L3.sort(reverse = True)
  for i in range(len(L3)-1):
    ans += (L3[i][1]+1)*10
  ans += L3[-1][1]*10+L3[-1][0]
print(ans) 

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: The restaurant AtCoder serves the following five dishes:    * ABC Don (rice bowl): takes A minutes to serve.   * ARC Curry: takes B minutes to serve.   * AGC Pasta: takes C minutes to serve.   * APC Ramen: takes D minutes to serve.   * ATC Hanbagu (hamburger patty): takes E minutes to serve.  Here, the time to serve a dish is the time between when an order is placed and when the dish is delivered.  This restaurant has the following rules on orders:    * An order can only be placed at a time that is a multiple of 10 (time 0, 10, 20, ...).   * Only one dish can be ordered at a time.   * No new order can be placed when an order is already placed and the dish is still not delivered, but a new order can be placed at the exact time when the dish is delivered.  E869120 arrives at this restaurant at time 0. He will order all five dishes. Find the earliest possible time for the last dish to be delivered.   Here, he can order the dishes in any order he likes, and he can place an order already at time 0.

Submission attempts (in order):
a = []
for i in range(5):
    a.append(int(input() )) 

t =0
for m in a:
    t += int(m/10) * 10
    if m%10 != 0:
        t = t + 10

b = [10 - (x%10) for x in a]
print(t - max(b))

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

t =0
for i,m in enumerate(a):
    t += int(m/10) * 10
    if m%10 != 0:
        t = t + 10
    else:
        a.pop(i)

b = [10 - (x%10) for x in a]
print(t - max(b))

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


t =0
s = 0
for m in a:
    t += int(m/10) * 10
    if m%10 != 0:
        t = t + 10
    if 10 - (m%10) > s and m%10 !=0:
        s = 10 - (m%10)

print(t - s)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: The restaurant AtCoder serves the following five dishes:    * ABC Don (rice bowl): takes A minutes to serve.   * ARC Curry: takes B minutes to serve.   * AGC Pasta: takes C minutes to serve.   * APC Ramen: takes D minutes to serve.   * ATC Hanbagu (hamburger patty): takes E minutes to serve.  Here, the time to serve a dish is the time between when an order is placed and when the dish is delivered.  This restaurant has the following rules on orders:    * An order can only be placed at a time that is a multiple of 10 (time 0, 10, 20, ...).   * Only one dish can be ordered at a time.   * No new order can be placed when an order is already placed and the dish is still not delivered, but a new order can be placed at the exact time when the dish is delivered.  E869120 arrives at this restaurant at time 0. He will order all five dishes. Find the earliest possible time for the last dish to be delivered.   Here, he can order the dishes in any order he likes, and he can place an order already at time 0.

Submission attempts (in order):
s = [input() for i in range(5)]
x10 = int(0)
sum = int(0)
a = []

for i in range(5):
  if int(s[i]) % 10 == 0:
    x10 = x10 + 1
  else:
    pass
  sum = sum + ((int(s[i]) - 1) // 10 + 1) * 10
  a.append(int(s[i]) % 10)
  
b = [int(s) for s in a]

if x10 == 5:
  print(sum)
else:
  print(sum - 10 + min(b))

s = [input() for i in range(5)]
x10 = int(0)
sum = int(0)
a = []

for i in range(5):
  if int(s[i]) % 10 == 0:
    x10 = x10 + 1
  else:
    a.append(int(s[i]) % 10)
  sum = sum + ((int(s[i]) - 1) // 10 + 1) * 10

  
b = [int(s) for s in a]

if x10 == 5:
  print(sum)
else:
  print(sum - 10 + min(b))
  

Verdicts: Wrong Answer

Accepted
Problem: The restaurant AtCoder serves the following five dishes:    * ABC Don (rice bowl): takes A minutes to serve.   * ARC Curry: takes B minutes to serve.   * AGC Pasta: takes C minutes to serve.   * APC Ramen: takes D minutes to serve.   * ATC Hanbagu (hamburger patty): takes E minutes to serve.  Here, the time to serve a dish is the time between when an order is placed and when the dish is delivered.  This restaurant has the following rules on orders:    * An order can only be placed at a time that is a multiple of 10 (time 0, 10, 20, ...).   * Only one dish can be ordered at a time.   * No new order can be placed when an order is already placed and the dish is still not delivered, but a new order can be placed at the exact time when the dish is delivered.  E869120 arrives at this restaurant at time 0. He will order all five dishes. Find the earliest possible time for the last dish to be delivered.   Here, he can order the dishes in any order he likes, and he can place an order already at time 0.

Submission attempts (in order):
t = [int(input()) for i in range(5)]
T = [(-(-i//10))*10 for i in t]
t_min = [i%10 for i in t]
t_min = min([i for i in t_min if i != 0]) if min(t_min) != 0 else 10
print(sum(T) - 10 + t_min)

t = [int(input()) for i in range(5)]
T = [(-(-i//10))*10 for i in t]
t_min = [i%10 for i in t]
print(sum(T) - 10 + min(t_min))

t = [int(input()) for i in range(5)]
T = [(-(-i//10))*10 for i in t]
t_min = [i%10 for i in t]
t_min = min([i for i in t_min if i != 0])
sum(T) - 10 + t_min

t = [int(input()) for i in range(5)]
T = [(-(-i//10))*10 for i in t]
t_min = [i%10 for i in t]
t_min = min([i for i in t_min if i != 0]) if t_min != [0 for i in range(5)] else 10
print(sum(T) - 10 + t_min)

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: The restaurant AtCoder serves the following five dishes:    * ABC Don (rice bowl): takes A minutes to serve.   * ARC Curry: takes B minutes to serve.   * AGC Pasta: takes C minutes to serve.   * APC Ramen: takes D minutes to serve.   * ATC Hanbagu (hamburger patty): takes E minutes to serve.  Here, the time to serve a dish is the time between when an order is placed and when the dish is delivered.  This restaurant has the following rules on orders:    * An order can only be placed at a time that is a multiple of 10 (time 0, 10, 20, ...).   * Only one dish can be ordered at a time.   * No new order can be placed when an order is already placed and the dish is still not delivered, but a new order can be placed at the exact time when the dish is delivered.  E869120 arrives at this restaurant at time 0. He will order all five dishes. Find the earliest possible time for the last dish to be delivered.   Here, he can order the dishes in any order he likes, and he can place an order already at time 0.

Submission attempts (in order):
t = [int(input()) for i in range(5)]
minimum = 10
k = 10
t2 = list()
ans = 0

for i in range(5):
    #    print(-(-t[i] // 10) * 10)
    t2.append(-(-t[i] // 10) * 10)
    if 0 < t[i] % 10 < minimum:
        minimum = t[i] % 10
        k = i

#print(minimum, k)

for i in range(5):
    print(t2[i])
    if i == k:
        ans += t[i]
    else:
        ans += t2[i]


print(ans)

N = 5
time = [int(input()) for _ in range(N)]
order_time = list()
sabun = list()

for i in range(N):
    if time[i] % 10 == 0:
        order_time.append(time[i])
    else:
        order_time.append(time[i] - time[i] % 10 + 10)
    sabun.append(order_time[i] - time[i])

print(sum(order_time) - max(sabun))


Verdicts: Wrong Answer

Accepted
Problem: The restaurant AtCoder serves the following five dishes:    * ABC Don (rice bowl): takes A minutes to serve.   * ARC Curry: takes B minutes to serve.   * AGC Pasta: takes C minutes to serve.   * APC Ramen: takes D minutes to serve.   * ATC Hanbagu (hamburger patty): takes E minutes to serve.  Here, the time to serve a dish is the time between when an order is placed and when the dish is delivered.  This restaurant has the following rules on orders:    * An order can only be placed at a time that is a multiple of 10 (time 0, 10, 20, ...).   * Only one dish can be ordered at a time.   * No new order can be placed when an order is already placed and the dish is still not delivered, but a new order can be placed at the exact time when the dish is delivered.  E869120 arrives at this restaurant at time 0. He will order all five dishes. Find the earliest possible time for the last dish to be delivered.   Here, he can order the dishes in any order he likes, and he can place an order already at time 0.

Submission attempts (in order):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
li = [a, b, c, d, e]

l1 = [i % 10 for i in li]
min_idx = -1
for i in range(len(l1)):
    if min_idx == -1 or l1[i] != 0 and l1[i] < l1[min_idx]:
        min_idx = i
last = li.pop(min_idx)
print(last)

output = 0
for x in li:
    if x % 10 != 0:
        x = x - (x % 10) + 10
    output += x
print(output + last)


a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
li = [a, b, c, d, e]

l1 = [i % 10 for i in li]
min_idx = -1
for i in range(len(l1)):
    if min_idx == -1 or l1[i] != 0 and l1[i] < l1[min_idx]:
        min_idx = i
last = li.pop(min_idx)

output = 0
for x in li:
    if x % 10 != 0:
        x = x - (x % 10) + 10
    output += x
print(output + last)

Verdicts: Wrong Answer

Accepted
Problem: The restaurant AtCoder serves the following five dishes:    * ABC Don (rice bowl): takes A minutes to serve.   * ARC Curry: takes B minutes to serve.   * AGC Pasta: takes C minutes to serve.   * APC Ramen: takes D minutes to serve.   * ATC Hanbagu (hamburger patty): takes E minutes to serve.  Here, the time to serve a dish is the time between when an order is placed and when the dish is delivered.  This restaurant has the following rules on orders:    * An order can only be placed at a time that is a multiple of 10 (time 0, 10, 20, ...).   * Only one dish can be ordered at a time.   * No new order can be placed when an order is already placed and the dish is still not delivered, but a new order can be placed at the exact time when the dish is delivered.  E869120 arrives at this restaurant at time 0. He will order all five dishes. Find the earliest possible time for the last dish to be delivered.   Here, he can order the dishes in any order he likes, and he can place an order already at time 0.

Submission attempts (in order):
# AtCoder

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

n = len(lst)
diffs = []
for i in range(n):
    dif = 10 - int(str(lst[i])[-1])
    diffs.append(dif)

if sum(diffs) == 50:
    print(sum(lst))
    exit()

mx = max(diffs)
s = []
for i in diffs:
    if i == 10:
        continue
    s.append(i)
print(sum(s)+sum(lst))


import math
l = [int(input()) for i in range(5)]
ans = 0
c = 0
for i in l:
    times = math.ceil(i/10)*10-i
    if times != 0:
        c = max(c, times)
    ans += math.ceil(i/10)*10
print(ans-c)

Verdicts: Wrong Answer

Accepted
Problem: The restaurant AtCoder serves the following five dishes:    * ABC Don (rice bowl): takes A minutes to serve.   * ARC Curry: takes B minutes to serve.   * AGC Pasta: takes C minutes to serve.   * APC Ramen: takes D minutes to serve.   * ATC Hanbagu (hamburger patty): takes E minutes to serve.  Here, the time to serve a dish is the time between when an order is placed and when the dish is delivered.  This restaurant has the following rules on orders:    * An order can only be placed at a time that is a multiple of 10 (time 0, 10, 20, ...).   * Only one dish can be ordered at a time.   * No new order can be placed when an order is already placed and the dish is still not delivered, but a new order can be placed at the exact time when the dish is delivered.  E869120 arrives at this restaurant at time 0. He will order all five dishes. Find the earliest possible time for the last dish to be delivered.   Here, he can order the dishes in any order he likes, and he can place an order already at time 0.

Submission attempts (in order):
l = [int(input) in i for range(5)]
l_0 = l % 10
ar = []
for n in l_0:
  if n != 0:
    ar.append(10-n)
  else:
    ar.append(0)
s = l_0.index(max(l_0))
ans = sum(l[l.index()!=s]) + sum(l_0[l_0.index()!=s]) + l[s]
print(ans)

l = [int(input()) for i in range(5)]
l_0 = [a%10 for a in l]
ar = []
for n in l_0:
  if n != 0:
    ar.append(10-n)
  else:
    ar.append(0)
s = ar.index(max(ar))
ar.pop(s)
ans = sum(l) + sum(ar)
print(ans)

Verdicts: Runtime Error

Accepted
Problem: The restaurant AtCoder serves the following five dishes:    * ABC Don (rice bowl): takes A minutes to serve.   * ARC Curry: takes B minutes to serve.   * AGC Pasta: takes C minutes to serve.   * APC Ramen: takes D minutes to serve.   * ATC Hanbagu (hamburger patty): takes E minutes to serve.  Here, the time to serve a dish is the time between when an order is placed and when the dish is delivered.  This restaurant has the following rules on orders:    * An order can only be placed at a time that is a multiple of 10 (time 0, 10, 20, ...).   * Only one dish can be ordered at a time.   * No new order can be placed when an order is already placed and the dish is still not delivered, but a new order can be placed at the exact time when the dish is delivered.  E869120 arrives at this restaurant at time 0. He will order all five dishes. Find the earliest possible time for the last dish to be delivered.   Here, he can order the dishes in any order he likes, and he can place an order already at time 0.

Submission attempts (in order):
lis = []
for i in range(5):
    lis.append(int(input()))
plus = 0
notdiv = []
for i in range(5):
    if lis[i] % 10 != 0:
        plus += 10 - (lis[i] % 10)
        notdiv.append(lis[i])
for i in range(5):
    notdiv[i] %= 10
    notdiv[i] = 10 - notdiv[i]


notdiv.sort()
print(sum(lis) + plus - notdiv[-1])

lis = []
for i in range(5):
    lis.append(int(input()))
plus = 0
notdiv = []
for i in range(5):
    if lis[i] % 10 != 0:
        plus += 10 - (lis[i] % 10)
        notdiv.append(lis[i])
for i in range(5):
    notdiv[i] %= 10
    notdiv[i] = 10 - notdiv[i]


notdiv.sort()
print(sum(lis) + plus - notdiv[-1])

lis = []
for i in range(5):
    lis.append(int(input()))
plus = 0
notdiv = []
for i in range(5):
    if lis[i] % 10 != 0:
        plus += 10 - (lis[i] % 10)
        notdiv.append(lis[i])
if notdiv:
    for i in range(len(notdiv)):
        notdiv[i] %= 10
        notdiv[i] = 10 - notdiv[i]

    notdiv.sort()
    print(sum(lis) + plus - notdiv[-1])
else:
    print(sum(lis) + plus)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: The restaurant AtCoder serves the following five dishes:    * ABC Don (rice bowl): takes A minutes to serve.   * ARC Curry: takes B minutes to serve.   * AGC Pasta: takes C minutes to serve.   * APC Ramen: takes D minutes to serve.   * ATC Hanbagu (hamburger patty): takes E minutes to serve.  Here, the time to serve a dish is the time between when an order is placed and when the dish is delivered.  This restaurant has the following rules on orders:    * An order can only be placed at a time that is a multiple of 10 (time 0, 10, 20, ...).   * Only one dish can be ordered at a time.   * No new order can be placed when an order is already placed and the dish is still not delivered, but a new order can be placed at the exact time when the dish is delivered.  E869120 arrives at this restaurant at time 0. He will order all five dishes. Find the earliest possible time for the last dish to be delivered.   Here, he can order the dishes in any order he likes, and he can place an order already at time 0.

Submission attempts (in order):
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)))


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)))


Verdicts: Runtime Error

Accepted
Problem: The restaurant AtCoder serves the following five dishes:    * ABC Don (rice bowl): takes A minutes to serve.   * ARC Curry: takes B minutes to serve.   * AGC Pasta: takes C minutes to serve.   * APC Ramen: takes D minutes to serve.   * ATC Hanbagu (hamburger patty): takes E minutes to serve.  Here, the time to serve a dish is the time between when an order is placed and when the dish is delivered.  This restaurant has the following rules on orders:    * An order can only be placed at a time that is a multiple of 10 (time 0, 10, 20, ...).   * Only one dish can be ordered at a time.   * No new order can be placed when an order is already placed and the dish is still not delivered, but a new order can be placed at the exact time when the dish is delivered.  E869120 arrives at this restaurant at time 0. He will order all five dishes. Find the earliest possible time for the last dish to be delivered.   Here, he can order the dishes in any order he likes, and he can place an order already at time 0.

Submission attempts (in order):
import math

one = [10]
total = 0
for i in range(5):
    time = input()
    if time[-1] != "0":
        one.append(int(time[-1]))
    time = int(time)
    time = math.ceil(time / 10) * 10
    print(time)
    total += time
total += min(one) - 10
print(int(total))


import math

one = [10]
total = 0
for i in range(5):
    time = input()
    if time[-1] != "0":
        one.append(int(time[-1]))
    time = int(time)
    time = math.ceil(time / 10) * 10
    total += time
total += min(one) - 10
print(int(total))


Verdicts: Wrong Answer

Accepted
Problem: The restaurant AtCoder serves the following five dishes:    * ABC Don (rice bowl): takes A minutes to serve.   * ARC Curry: takes B minutes to serve.   * AGC Pasta: takes C minutes to serve.   * APC Ramen: takes D minutes to serve.   * ATC Hanbagu (hamburger patty): takes E minutes to serve.  Here, the time to serve a dish is the time between when an order is placed and when the dish is delivered.  This restaurant has the following rules on orders:    * An order can only be placed at a time that is a multiple of 10 (time 0, 10, 20, ...).   * Only one dish can be ordered at a time.   * No new order can be placed when an order is already placed and the dish is still not delivered, but a new order can be placed at the exact time when the dish is delivered.  E869120 arrives at this restaurant at time 0. He will order all five dishes. Find the earliest possible time for the last dish to be delivered.   Here, he can order the dishes in any order he likes, and he can place an order already at time 0.

Submission attempts (in order):
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)

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)

Verdicts: Wrong Answer

Accepted
Problem: The restaurant AtCoder serves the following five dishes:    * ABC Don (rice bowl): takes A minutes to serve.   * ARC Curry: takes B minutes to serve.   * AGC Pasta: takes C minutes to serve.   * APC Ramen: takes D minutes to serve.   * ATC Hanbagu (hamburger patty): takes E minutes to serve.  Here, the time to serve a dish is the time between when an order is placed and when the dish is delivered.  This restaurant has the following rules on orders:    * An order can only be placed at a time that is a multiple of 10 (time 0, 10, 20, ...).   * Only one dish can be ordered at a time.   * No new order can be placed when an order is already placed and the dish is still not delivered, but a new order can be placed at the exact time when the dish is delivered.  E869120 arrives at this restaurant at time 0. He will order all five dishes. Find the earliest possible time for the last dish to be delivered.   Here, he can order the dishes in any order he likes, and he can place an order already at time 0.

Submission attempts (in order):
from decimal import Decimal, ROUND_HALF_UP

# input
cook_time = []
append = cook_time.append

for i in range(5):
    append(int(input()))


cook_time.sort(key=lambda x: int(Decimal(x).quantize(Decimal("1E1"), rounding=ROUND_HALF_UP)) - x)
res = 0
for c in cook_time:

    if res % 10 != 0:
        res = int(Decimal(res).quantize(Decimal("1E1"), rounding=ROUND_HALF_UP))

    print(c, res)

    res += c

print(res)

from decimal import Decimal, ROUND_HALF_UP

# input
cook_time = []
append = cook_time.append

for i in range(5):
    append(int(input()))


cook_time.sort(key=lambda x: int(Decimal(x).quantize(Decimal("1E1"), rounding=ROUND_HALF_UP)) - x)
res = 0
for c in cook_time:

    if res % 10 != 0:
        res = int(Decimal(res).quantize(Decimal("1E1"), rounding=ROUND_HALF_UP))

    print(c, res)

    res += c

print(res)

from decimal import Decimal, ROUND_UP

# input
cook_time = []
append = cook_time.append

for i in range(5):
    append(int(input()))


cook_time.sort(key=lambda x: int(Decimal(x).quantize(Decimal("1E1"), rounding=ROUND_UP)) - x)
res = 0
for c in cook_time:

    if res % 10 != 0:
        res = int(Decimal(res).quantize(Decimal("1E1"), rounding=ROUND_UP))

    res += c

print(res)


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: The restaurant AtCoder serves the following five dishes:    * ABC Don (rice bowl): takes A minutes to serve.   * ARC Curry: takes B minutes to serve.   * AGC Pasta: takes C minutes to serve.   * APC Ramen: takes D minutes to serve.   * ATC Hanbagu (hamburger patty): takes E minutes to serve.  Here, the time to serve a dish is the time between when an order is placed and when the dish is delivered.  This restaurant has the following rules on orders:    * An order can only be placed at a time that is a multiple of 10 (time 0, 10, 20, ...).   * Only one dish can be ordered at a time.   * No new order can be placed when an order is already placed and the dish is still not delivered, but a new order can be placed at the exact time when the dish is delivered.  E869120 arrives at this restaurant at time 0. He will order all five dishes. Find the earliest possible time for the last dish to be delivered.   Here, he can order the dishes in any order he likes, and he can place an order already at time 0.

Submission attempts (in order):
array = [int(input()) for i in range(5)]
array2 = [] 
array3 = []

for i in array:
  array2.append((i//10 + 1 ) if i%10 != 0 else i//10 * 10)
  array3.append(i%10 if i%10 != 0 else 10)

print(sum(array2)-(10-min(array3)))

array = [int(input()) for i in range(5)]
array2 = [] 
array3 = []

for i in array:
  array2.append(((i//10 + 1) *10) if i%10 != 0 else i//10 * 10)
  array3.append(i%10 if i%10 != 0 else 10)

print(sum(array2)-(10-min(array3)))

Verdicts: Wrong Answer

Accepted
Problem: The restaurant AtCoder serves the following five dishes:    * ABC Don (rice bowl): takes A minutes to serve.   * ARC Curry: takes B minutes to serve.   * AGC Pasta: takes C minutes to serve.   * APC Ramen: takes D minutes to serve.   * ATC Hanbagu (hamburger patty): takes E minutes to serve.  Here, the time to serve a dish is the time between when an order is placed and when the dish is delivered.  This restaurant has the following rules on orders:    * An order can only be placed at a time that is a multiple of 10 (time 0, 10, 20, ...).   * Only one dish can be ordered at a time.   * No new order can be placed when an order is already placed and the dish is still not delivered, but a new order can be placed at the exact time when the dish is delivered.  E869120 arrives at this restaurant at time 0. He will order all five dishes. Find the earliest possible time for the last dish to be delivered.   Here, he can order the dishes in any order he likes, and he can place an order already at time 0.

Submission attempts (in order):
p={} 
q={} /10のあまり
r={} 
for i in range(5):
    p[i] = int(input())
    q[i] = p[i] % 10
    if q[i] != 0:
        r[i] = p[i] + 10 - q[i]

maxloss = 0
maxlossnum = 0
for i in range(5):
    if maxloss < r[i] - p[i]:
        maxloss = r[i] - p[i]
        maxlossnum = i

time = int(0)
for i in range(5):
    if i != maxlossnum:
        time += r[i]
    else:
        time += p[i]

print(time)

p={} 
r={} 
for i in range(5):
    p[i] = int(input())
    if p[i] % 10 != 0:
        r[i] = p[i] + 10 - p[i] % 10

lastnum = 0
for i in range(1,5):
    if r[lastnum] - p[lastnum] < r[i] - p[i]:
        lastnum = i

#print(lastnum)

time = 0
for i in range(5):
    if i != lastnum:
        time += r[i]
    else:
        time += p[i]

print(time)

p={} 
r={} 
for i in range(5):
    p[i] = int(input())
    if p[i] % 10 != 0:
        r[i] = p[i] + 10 - p[i] % 10

lastnum = 0
for i in range(1,5):
    if r[lastnum] - p[lastnum] < r[i] - p[i]:
        lastnum = i

print(lastnum)

time = 0
for i in range(5):
    if i != lastnum:
        time += r[i]
    else:
        time += p[i]

print(time)

p={} 
q={} /10のあまり
r={} 
for i in range(5):
    p[i] = int(input())
    q[i] = p[i] % 10
    if q[i] != 0:
        r[i] = p[i] + 10 - q[i]

maxloss = 0
maxlossnum = 0
for i in range(5):
    if maxloss < r[i] - p[i]:
        maxloss = r[i] - p[i]
        maxlossnum = i

time = int(0)
for i in range(5):
    if i != maxlossnum:
        time += r[i]
    else:
        time += p[i]

print(time)

p={} 
r={} 
for i in range(5):
    p[i] = int(input())
    r[i] = int((p[i] + 9) /10) * 10
    #print(r[i])


lastnum = 0
for i in range(1,5):
    if r[lastnum] - p[lastnum] < r[i] - p[i]:
        lastnum = i

#print(lastnum)

time = 0
for i in range(5):
    if i != lastnum:
        time += r[i]
    else:
        time += p[i]

print(time)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: The restaurant AtCoder serves the following five dishes:    * ABC Don (rice bowl): takes A minutes to serve.   * ARC Curry: takes B minutes to serve.   * AGC Pasta: takes C minutes to serve.   * APC Ramen: takes D minutes to serve.   * ATC Hanbagu (hamburger patty): takes E minutes to serve.  Here, the time to serve a dish is the time between when an order is placed and when the dish is delivered.  This restaurant has the following rules on orders:    * An order can only be placed at a time that is a multiple of 10 (time 0, 10, 20, ...).   * Only one dish can be ordered at a time.   * No new order can be placed when an order is already placed and the dish is still not delivered, but a new order can be placed at the exact time when the dish is delivered.  E869120 arrives at this restaurant at time 0. He will order all five dishes. Find the earliest possible time for the last dish to be delivered.   Here, he can order the dishes in any order he likes, and he can place an order already at time 0.

Submission attempts (in order):
l =list(int(input()) for i in range(5))
a =[]
time = 0
for i in range(5):
  if l[i]%10!=0:
    a.append(l[i]%10)
  else:
    a.append(9)
#print(a)
b = a.index(min(a))
#print(b)
for i in range(5):
  time += (-(-l[i]//10))*10
  print(time)
time -= (-(-l[b]//10)*10) - l[b]
print(time)


l =list(int(input()) for i in range(5))
a =[]
time = 0
for i in range(5):
  a.append(l[i]%10)
#print(a)
b = a.index(min(a))
#print(b)
for i in range(5):
  time += (-(-l[i]//10))*10
time -= (-(-l[b]//10)*10) - l[b]
print(time)


l =list(int(input()) for i in range(5))
a =[]
time = 0
for i in range(5):
  if l[i]%10!=0:
    a.append(l[i]%10)
  else:
    a.append(9)
#print(a)
b = a.index(min(a))
#print(b)
for i in range(5):
  time += (-(-l[i]//10))*10
  #print(time)
time -= (-(-l[b]//10)*10) - l[b]
print(time)


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: The restaurant AtCoder serves the following five dishes:    * ABC Don (rice bowl): takes A minutes to serve.   * ARC Curry: takes B minutes to serve.   * AGC Pasta: takes C minutes to serve.   * APC Ramen: takes D minutes to serve.   * ATC Hanbagu (hamburger patty): takes E minutes to serve.  Here, the time to serve a dish is the time between when an order is placed and when the dish is delivered.  This restaurant has the following rules on orders:    * An order can only be placed at a time that is a multiple of 10 (time 0, 10, 20, ...).   * Only one dish can be ordered at a time.   * No new order can be placed when an order is already placed and the dish is still not delivered, but a new order can be placed at the exact time when the dish is delivered.  E869120 arrives at this restaurant at time 0. He will order all five dishes. Find the earliest possible time for the last dish to be delivered.   Here, he can order the dishes in any order he likes, and he can place an order already at time 0.

Submission attempts (in order):
def main():
    A = int(input())
    B = int(input())
    C = int(input())
    D = int(input())
    E = int(input())

    min_mod = 0
    elapsed_time = 0
    for x in [A, B, C, D, E]:
        mod = x % 10
        if 0 < mod < min_mod:
            min_mod = mod
        time = x if x % 10 == 0 else (x // 10 + 1) * 10
        elapsed_time += time

    elapsed_time = elapsed_time - (10 - min_mod) if min_mod != 0 else elapsed_time
    print(elapsed_time)

if __name__ == '__main__':
    main()

def main():
    A = int(input())
    B = int(input())
    C = int(input())
    D = int(input())
    E = int(input())

    min_mod = 10
    elapsed_time = 0
    for x in [A, B, C, D, E]:
        mod = x % 10
        if 0 < mod < min_mod:
            min_mod = mod
        time = x if x % 10 == 0 else (x // 10 + 1) * 10
        elapsed_time += time

    elapsed_time = elapsed_time - (10 - min_mod)
    print(elapsed_time)

if __name__ == '__main__':
    main()

Verdicts: Wrong Answer

Accepted
Problem: The restaurant AtCoder serves the following five dishes:    * ABC Don (rice bowl): takes A minutes to serve.   * ARC Curry: takes B minutes to serve.   * AGC Pasta: takes C minutes to serve.   * APC Ramen: takes D minutes to serve.   * ATC Hanbagu (hamburger patty): takes E minutes to serve.  Here, the time to serve a dish is the time between when an order is placed and when the dish is delivered.  This restaurant has the following rules on orders:    * An order can only be placed at a time that is a multiple of 10 (time 0, 10, 20, ...).   * Only one dish can be ordered at a time.   * No new order can be placed when an order is already placed and the dish is still not delivered, but a new order can be placed at the exact time when the dish is delivered.  E869120 arrives at this restaurant at time 0. He will order all five dishes. Find the earliest possible time for the last dish to be delivered.   Here, he can order the dishes in any order he likes, and he can place an order already at time 0.

Submission attempts (in order):
times = [int(input()) for _ in range(5)]
times1 = []
total = 0
for t in times:
  t1 = t % 10
  if t1 == 0:
    total += t
  else:
    times1.append(t1)
    total += (t//10 + 1) * 10
if len(times1) >= 1:
    total = total + min(times1)
print(total)

times = [int(input()) for _ in range(5)]
times1 = []
total = 0
for t in times:
  t1 = t % 10
  times1.append(t1)
  if t1 == 0:
    total += t
  else:
    total += (t//10 + 1) * 10
total = total + min(times1) - 10
print(total)

times = [int(input()) for _ in range(5)]
times1 = [0]
total = 0
for t in times:
  t1 = t % 10
  if t1 == 0:
    total += t
  else:
    times1.append(t1)
    total += (t//10 + 1) * 10
total = total + min(times1) - 10
print(total)

times = [int(input()) for _ in range(5)]
times1 = []
total = 0
for t in times:
  t1 = t % 10
  if t1 == 0:
    total += t
  else:
    times1.append(t1)
    total += (t//10 + 1) * 10
if len(times1) >= 1:
    total = total + min(times1) - 10
print(total)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: The restaurant AtCoder serves the following five dishes:    * ABC Don (rice bowl): takes A minutes to serve.   * ARC Curry: takes B minutes to serve.   * AGC Pasta: takes C minutes to serve.   * APC Ramen: takes D minutes to serve.   * ATC Hanbagu (hamburger patty): takes E minutes to serve.  Here, the time to serve a dish is the time between when an order is placed and when the dish is delivered.  This restaurant has the following rules on orders:    * An order can only be placed at a time that is a multiple of 10 (time 0, 10, 20, ...).   * Only one dish can be ordered at a time.   * No new order can be placed when an order is already placed and the dish is still not delivered, but a new order can be placed at the exact time when the dish is delivered.  E869120 arrives at this restaurant at time 0. He will order all five dishes. Find the earliest possible time for the last dish to be delivered.   Here, he can order the dishes in any order he likes, and he can place an order already at time 0.

Submission attempts (in order):
def rest(num):
    return num % 10

A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
Foods = [A,B,C,D,E]
res = 0

poplist=[]
for idx in range(5):
    if Foods[idx]%10==0:
        res += Foods[idx]
        poplist.append(idx)
while len(poplist)>0:
    idx = max(poplist)
    Foods.pop(idx)
    poplist.pop(idx)

while len(Foods) > 0:
    idx = Foods.index(max(Foods, key=rest))
    if len(Foods)>1:
        res += (Foods[idx]//10)*10+10
    else:
        res += Foods[idx]
    Foods.pop(idx)



print(res)


def rest(num):
    return num % 10

A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
Foods = [A,B,C,D,E]
res = 0

poplist=[]
for idx in range(5):
    if Foods[idx]%10==0:
        res += Foods[idx]
        poplist.append(idx)
while len(poplist)>0:
    idx = max(poplist)
    Foods.pop(idx)
    poplist.pop(poplist.index(idx))

while len(Foods) > 0:
    idx = Foods.index(max(Foods, key=rest))
    if len(Foods)>1:
        res += (Foods[idx]//10)*10+10
    else:
        res += Foods[idx]
    Foods.pop(idx)



print(res)


Verdicts: Runtime Error

Accepted