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 = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
a = int(0.1*A)
b = int(0.1*B)
c = int(0.1*C)
d = int(0.1*D)
e = int(0.1*E)
t_1 = 10*(a+b+c+d) + E
t_2 = 10*(b+c+d+e) + A
t_3 = 10*(c+d+e+a) + B
t_4 = 10*(d+e+a+b) + C
t_5 = 10*(e+a+b+a) + D
print(min([t_1,t_2,t_3,t_4,t_5]))

A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
a = int(0.1*(5+A))
b = int(0.1*(5+B))
c = int(0.1*(5+C))
d = int(0.1*(5+D))
e = int(0.1*(5+E))
t_1 = 10*(a+b+c+d) + E
t_2 = 10*(b+c+d+e) + A
t_3 = 10*(c+d+e+a) + B
t_4 = 10*(d+e+a+b) + C
t_5 = 10*(e+a+b+a) + D
print(min([t_1,t_2,t_3,t_4,t_5]))

A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
a = int(0.1*(9+A))
b = int(0.1*(9+B))
c = int(0.1*(9+C))
d = int(0.1*(9+D))
e = int(0.1*(9+E))
t_1 = 10*(a+b+c+d) + E
t_2 = 10*(b+c+d+e) + A
t_3 = 10*(c+d+e+a) + B
t_4 = 10*(d+e+a+b) + C
t_5 = 10*(e+a+b+c) + D
#print(min([t_1,t_2,t_3,t_4,t_5]))
print(t_1,t_2,t_3,t_4,t_5)

A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
a = int(0.1*(9+A))
b = int(0.1*(9+B))
c = int(0.1*(9+C))
d = int(0.1*(9+D))
e = int(0.1*(9+E))
t_1 = 10*(a+b+c+d) + E
t_2 = 10*(b+c+d+e) + A
t_3 = 10*(c+d+e+a) + B
t_4 = 10*(d+e+a+b) + C
t_5 = 10*(e+a+b+c) + D
print(min([t_1,t_2,t_3,t_4,t_5]))

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):
lst = []
for i in range(5):
  n = int(input())
  lst.append([(n + 1) % 10, n])
lst = sorted(lst)

res = 0
for i in range(5):
  if i == 0:
    res += lst[i][1]
  else:
    res += (lst[i][1] + 9) // 10 * 10
print(res)


lst = []
for i in range(5):
  n = int(input())
  lst.append([n % 10, n])
lst = sorted(lst)

res = 0
for i in range(5):
  if i == 0:
    res += lst[i][1]
  else:
    res += (lst[i][1] + 9) // 10 * 10
print(res)

l = [int(input()) for _ in range(5)]
l.sort(key=lambda x: (10 - x) % 10)

res = l[-1]
for i in range(4):
	res += (l[i] + 9) // 10 * 10
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):
import math
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
raws = [A, B, C, D, E]
residues = [A % 10, B % 10, C % 10, D % 10, E % 10]
ans = 0
lastDish = residues.index(min(residues))
for i in range(len(raws)):
    if i != lastDish:
        ans += math.ceil(raws[i] / 10) * 10
    else:
        ans += raws[i]
print(ans)


import math
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
raws = [A, B, C, D, E]
residues = []
for num in raws:
    if num % 10 != 0:
        residues.append(num % 10)
    else:
        residues.append(10)

ans = 0
lastDish = residues.index(min(residues))
for i in range(len(raws)):
    if i != lastDish:
        ans += math.ceil(raws[i] / 10) * 10
    else:
        ans += raws[i]
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):
aaa = [int(input()) for i in range(5)]

i = list()
b = 0
for a in aaa:
  n = 0
  n = 10 - int(str(a)[-1])
  if n % 10 != 0:i.append(n)
print(i)
print(sum(aaa) + sum(i) - max(i))

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

i = list()
b = 0
for a in aaa:
  n = 0
  n = 10 - int(str(a)[-1])
  if n % 10 != 0:i.append(n)
    
if len(i) == 0:
  h = 0
else:
  h = max(i)
print(sum(aaa) + sum(i) - h)

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):
a = [int(input()) for i in range(5)]
A = [j%10 for j in a if j%10 != 0]
if A:p=sum(A)
else:p=0
b = sum([((k//10)+1)*10 for k in a if k%10 != 0])
b += sum([l for l in a if l%10 ==0])
if p:print(b-(10-p))
else:print(b)

l = [int(input()) for _ in range(5)]
l.sort(key=lambda x: 10 if x%10==0 else x%10)
l = l[::-1]
ans = 0
for i in range(5):
    if i == 4 or l[i]%10==0:
        ans += l[i]
    else:
        ans += ((l[i]//10)+1)*10
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):
time_list = []
loss_time_list = []
for i in range(5):
  time_list.append(int(input()))
  loss_time_list.append(10-time_list[i]%10)
  
print(sum(time_list)+sum(loss_time_list)-max(loss_time_list))


time_list = []
loss_time_list = []
for i in range(5):
  time_list.append(int(input()))
  loss_time_list.append((10-time_list[i]%10)%10)
#print(loss_time_list)
print(sum(time_list)+sum(loss_time_list)-max(loss_time_list))


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):
import sys
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

a = ni()
b = ni()
c = ni()
d = ni()
e = ni()

f = min(a%10,b%10,c%10,d%10,e%10)

ans = (a+9)//10+(b+9)//10+(c+9)//10+(d+9)//10+(e+9)//10

print(ans*10+f-10)

import sys
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

a = ni()
b = ni()
c = ni()
d = ni()
e = ni()

f = min((a-1)%10,(b-1)%10,(c-1)%10,(d-1)%10,(e-1)%10)

ans = (a+9)//10+(b+9)//10+(c+9)//10+(d+9)//10+(e+9)//10

print(ans*10+f-9)

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):
arr = [0]*5
for i in range(5):
  arr[i] = int(input())
time = 0
for ar in arr:
  time += -(-ar//10)
amari = []
for i in arr:
  amari.append(i%10)
amari.sort()
print(time - (10-amari[0])

arr = [0]*5
for i in range(5):
    arr[i] = int(input())
time = 0
for ar in arr:
    time += (-(-ar//10))*10
amari = []
for i in arr:
    amari.append(i%10)
amari.sort()
print(time - (10-amari[0]))

arr = [0]*5
for i in range(5):
    arr[i] = int(input())
time = 0
for ar in arr:
    time += (-(-ar//10))*10
amari = []
for i in arr:
    amari.append(i%10)
amari.sort()
while 0 in amari:
    amari.remove(0)
if amari == []:
    amari.append(10)
print(time - (10-amari[0]))


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):
time = []
for i in range(5):
  time.append(int(input()))
  
time_diff = [10-(i%10) for i in time]
time_ten = [i+10-i%10 for i in time]

max_diff = time_diff.index(max(time_diff))

ans = sum(time_ten) - time_ten[max_diff] + time[max_diff]

print(ans)

time = []
for i in range(5):
  time.append(int(input()))
  
time_diff = [(10-(i%10))%10 for i in time]
time_ten = [i+(10-i%10)%10 for i in time]


max_diff = time_diff.index(max(time_diff))

ans = sum(time_ten) - time_ten[max_diff] + time[max_diff]

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):
import itertools
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
l = [a, b, c, d, e]
total = []
for v in itertools.permutations(l):
    print(v)
    nl = list(v)
    t = 0
    for num in range(len(nl)):
        if(num != 4 and nl[num] % 10 != 0):
            print(int(nl[num] / 10) * 10 + 10)
            t += int(nl[num] / 10) * 10 + 10
        else:
            print(nl[num])
            t += nl[num]
    t = int(t)
    print(t)
    total.append(t)
print(total)
print(min(total))

import itertools
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
l = [a, b, c, d, e]
total = []
for v in itertools.permutations(l):
    nl = list(v)
    t = 0
    for num in range(len(nl)):
        if(num != 4 and nl[num] % 10 != 0):
            t += int(nl[num] / 10) * 10 + 10
        else:
            t += nl[num]
    t = int(t)
    total.append(t)
print(min(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):
import sys

args = [int(input()) for i in range(5)]
#args = [29,20,7,35,120]
smallest = 10
i = 0
sum = 0
arg_num = 0

for tmp in args[:4]:
    if tmp % 10 < smallest:
        if tmp % 10 != 0:
            smallest = tmp % 10
            arg_num = i
    i+=1

print("smallest:" + str(arg_num))

for i in range(5):
    if i != arg_num:
        if args[i] % 10 != 0:
            args[i] = args[i] + (10 - args[i] % 10)
    print("args[" + str(i) + "]:" + str(args[i]))
    sum += args[i]

print(sum)


import sys

args = [int(input()) for i in range(6)]
#args = [29,20,7,35,120]
smallest = 10
i = 0
sum = 0
arg_num = 0

for tmp in args[:4]:
    if tmp % 10 < smallest:
        if tmp % 10 != 0:
            smallest = tmp % 10
            arg_num = i
    i+=1

print("smallest:" + str(arg_num))

for i in range(5):
    if i != arg_num:
        if args[i] % 10 != 0:
            args[i] = args[i] + (10 - args[i] % 10)
    print("args[" + str(i) + "]:" + str(args[i]))
    sum += args[i]

print(sum)


import sys

args = [int(input()) for i in range(5)]
#args = [29,20,7,35,120]
smallest = 10
i = 0
sum = 0
arg_num = 0

for tmp in args[:4]:
    if tmp % 10 < smallest:
        if tmp % 10 != 0:
            smallest = tmp % 10
            arg_num = i
    i+=1

#print("smallest:" + str(arg_num))

for i in range(5):
    if i != arg_num:
        if args[i] % 10 != 0:
            args[i] = args[i] + (10 - args[i] % 10)
    #print("args[" + str(i) + "]:" + str(args[i]))
    sum += args[i]

print(sum)


Verdicts: 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):
m=[]
cnt=0
for i in range(5):
    x=int(input())
    menu.append(x)
m10=[i % 10 for i in m if i %10 >=1]
t=min(m10)
for i in m:
    if i %10==0:
        cnt += i
    else:
        cnt += ((i//10)+1)*10
print(cnt-10+t)

m=[]
cnt=0
for i in range(5):
    x=int(input())
    m.append(x)
m10=[i % 10 for i in m if i %10 >=1]
if n10:
    t=min(m10)
    for i in m:
        if i %10==0:
            cnt += i
        else:
            cnt += ((i//10)+1)*10
    print(cnt-10+t)
else:
    print(sum(m))

m=[]
cnt=0
for i in range(5):
    x=int(input())
    menu.append(x)
m10=[i % 10 for i in m if i %10 >=1]
t=min(m10)
for i in m:
    if i %10==0:
        cnt += i
    else:
        cnt += ((i//10)+1)*10
print(cnt-t)

m=[]
cnt=0
for i in range(5):
    x=int(input())
    m.append(x)
m10=[i % 10 for i in m if i %10 >=1]
if m10:
    t=min(m10)
    for i in m:
        if i %10==0:
            cnt += i
        else:
            cnt += ((i//10)+1)*10
    print(cnt-10+t)
else:
    print(sum(m))

Verdicts: 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):
time=[]
for i in range(5):
    temp=[]
    temp.append(int(input()))
    if temp[0]%10==0:
        temp.append(0)
    else:
        temp.append(10-temp[0]%10)
    time.append(temp)
print(time)
time=sorted(time,key=lambda x:x[1])
print(time)
sum=0
for i in range(5):
    sum+=time[i][0]
    sum+=time[i][1]
print(sum-time[4][1])

time=[]
for i in range(5):
    temp=[]
    temp.append(int(input()))
    if temp[0]%10==0:
        temp.append(0)
    else:
        temp.append(10-temp[0]%10)
    time.append(temp)
time=sorted(time,key=lambda x:x[1])
sum=0
for i in range(5):
    sum+=time[i][0]
    sum+=time[i][1]
print(sum-time[4][1])

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 = list(map(int, (input() for _ in range(5))))
T2 = [math.ceil(t / 10) * 10 for t in T]
m = max(t2 - t for t, t2 in zip(T, T2))
print(sum(T2) - m)

import math
 
T = list(map(int, (input() for _ in range(5))))
T2 = [math.ceil(t / 10) * 10 for t in T]
m = max(t2 - t for t, t2 in zip(T, T2))
print(sum(T2) - m)

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):
K=[int(input()) for _ in range(5)]
ans=0
c=10
for i in range(5):
  c=min(K[i]%10,c)
for k in range(5):
  ans+=(K[k]//10)*10+10
print(ans-10+c)

K=[int(input()) for _ in range(5)]
ans=0
c=10
for i in range(5):
  r=K[i]%10
  if r==0:
    r=10
  c=min(r,c)
for k in range(5):
  if K[k]%10==0:
    ans+=K[k]
  else:
    ans+=(K[k]//10)*10+10
print(ans-10+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):
T = [int(input()) for _ in range(5)]

lst1 = []
lst2 = []
for i in range(5):
    if T[i]%10 == 0:
        lst1.append([0,T[i]])
    else:
        lst2.append([T[i]%10,T[i]])

lst2 = sorted(lst2, reverse=True)
lst = lst1 + lst2
print(lst)

ans = 0
for i in range(5):
    ans += lst[i][1]
    if lst[i][0] == 0:
        pass
    else:
        ans += 10 - lst[i][0]

ans -= 10 - lst[i][0]

print(ans)


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

lst1 = []
lst2 = []
for i in range(5):
    if T[i]%10 == 0:
        lst1.append([0,T[i]])
    else:
        lst2.append([T[i]%10,T[i]])

lst2 = sorted(lst2, reverse=True)
lst = lst1 + lst2

ans = 0
for i in range(5):
    ans += lst[i][1]
    if lst[i][0] == 0:
        pass
    else:
        ans += 10 - lst[i][0]

if lst[i][0] == 0:
    pass
else:
    ans -= 10 - lst[i][0]

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):
import math

dish = [ int(input()) for i in range(5) ]
sum = sum([ math.ceil(d/10)*10 for d in dish])
min = min([d%10 for d in dish])

if min == 0:
    print(sum)
else:
    print(sum + min - 10)


import math

dish = [ int(input()) for i in range(5) ]
print(sum([ math.ceil(d/10)*10 for d in dish]) + min([d%10 for d in dish]) - 10)

import math

dish = [ int(input()) for i in range(5) ]
sum = sum([ math.ceil(d/10)*10 for d in dish])
mdish = 10

for d in dish:
    if d%10 != 0:
        mdish = min(d%10, mdish)

print(sum + mdish - 10)

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):
atoe =[int(input()),int(input()),int(input()),int(input()),int(input())]

maxNum = 5
wrap = 0
atoe = sorted(atoe, key=lambda x: -10 if x%10==0 else -(x%10))
for i in range(0, maxNum-1):
    if atoe[i] % 10 == 0:
        step = atoe[i]
    else:
        step = (atoe[i] // 10 + 1) * 10
    print(atoe[i], step)
    wrap += step

wrap += atoe[maxNum-1]
print(wrap)


atoe =[int(input()),int(input()),int(input()),int(input()),int(input())]

maxNum = 5
wrap = 0
atoe = sorted(atoe, key=lambda x: -10 if x%10==0 else -(x%10))
for i in range(0, maxNum-1):
    if atoe[i] % 10 == 0:
        step = atoe[i]
    else:
        step = (atoe[i] // 10 + 1) * 10
    
    wrap += step

wrap += atoe[maxNum-1]
print(wrap)


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):
dish=[int(input()) for i in range(5)]
remain=[(dish[i]-1)%10 for i in range(5)]
divide=[(dish[i]-1)//10+1 for i in range(5)]
a=sorted(remain)[0]
print(a)
print(sum(divide)*10-9+a)
print(sum(divide))

dish=[int(input()) for i in range(5)]
remain=[(dish[i]-1)%10 for i in range(5)]
divide=[(dish[i]-1)//10+1 for i in range(5)]
a=sorted(remain)[4]
print(sum(divide)*10-10+a)

dish=[int(input()) for i in range(5)]
print(sum([(dish[i]-1)//10+1 for i in range(5)])*10-9+min([(dish[i]-1)%10 for i in range(5)]))

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):
l=list(int(input()) for _ in range(5))
s=list(10-i%10 for i in l)
s.remove(max(s))
print(sum(l)+sum(s))

l=list(int(input()) for _ in range(5))
s=list(10-i%10 for i in l)
for i in range(s.count(10)):
  s.remove(10)
if len(s)>0:
  s.remove(max(s))
print(sum(l)+sum(s))

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())
T = [a, b, c, d, e]
A = []
max_tt = 0
for i in range(len(T)):
  t = (T[i]//10 + 1) * 10
  A.append(t)
  tt = t - T[i]
  if max_tt < tt:
    max_tt = tt
print(sum(A)-max_tt)

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
T = [a, b, c, d, e]
A = []
max_tt = 0
for i in range(len(T)):
  if T[i]%10 == 0:
    t = T[i]
  else:
    t = (T[i]//10 + 1) * 10
  A.append(t)
  tt = t - T[i]
  if max_tt < tt:
    max_tt = tt
print(sum(A)-max_tt)

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):
dish = []
for i in range(5):
    dish.append(int(input()))
ichi = 0
for i in range(1,5):
    if dish[i]%10 > 0 and dish[ichi] % 10 > dish[i] % 10:
        ichi = i
print(str(ichi))
for i in range(5):
    if i != ichi and dish[i]%10 > 0:
        dish[i] += 10 - dish[i]%10
print(sum(dish))

dish = []
for i in range(5):
    dish.append(int(input()))
ichi = 0
for i in range(1,5):
    if dish[i]%10 > 0 and dish[ichi] % 10 > dish[i] % 10:
        ichi = i
for i in range(5):
    if i != ichi and dish[i]%10 > 0:
        dish[i] += 10 - dish[i]%10
print(sum(dish))

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())
s=0
amari=[a%10,b%10,c%10,d%10,e%10]
maxi=max(amari)
dish=[a,b,c,d,e]
for i in range(5):
  if dish[i]%10==0:
    s=s+dish[i]
  else:
    s=s+dish[i]+10-dish[i]%10
if maxi==0:
  print(s)
else:
  print(s-10+maxi)


a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
s=0
amari=[a%10,b%10,c%10,d%10,e%10]
mini=min(amari)
dish=[a,b,c,d,e]
for i in range(5):
  if dish[i]%10==0:
    s=s+dish[i]
  else:
    s=s+dish[i]+10-dish[i]%10
if mini==0:
  print(s)
else:
  print(s-10+max(amari))


a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
s=0
amari=[a%10,b%10,c%10,d%10,e%10]
mini=min(amari)
dish=[a,b,c,d,e]
for i in range(5):
  if dish[i]%10==0:
    s=s+dish[i]
  else:
    s=s+dish[i]+10-dish[i]%10
print(s-10+mini)

a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
s=0
amari=[a%10,b%10,c%10,d%10,e%10]
mini=min(amari)
dish=[a,b,c,d,e]
for i in range(5):
  if dish[i]%10==0:
    s=s+dish[i]
  else:
    s=s+dish[i]+10-dish[i]%10
if mini==0:
  print(s)
else:
  print(s-10+mini)


a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
s=0
amari=[a%10,b%10,c%10,d%10,e%10]
nokori=list((10-amari[i])%10 for i in range(5))
maxi=max(nokori)
dish=[a,b,c,d,e]
for i in range(5):
  if dish[i]%10==0:
    s=s+dish[i]
  else:
    s=s+dish[i]+10-dish[i]%10
if maxi==0:
  print(s)
else:
  print(s-maxi)


Verdicts: Wrong Answer

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):
ryouri = [int(input()) for i in range(5)]

order_1 = [(i-1)*0.1 - int((i-1)*0.1) for i in ryouri]
min_v = sorted(order_1)[0]
min_id = 0
for i, v in enumerate(order_1):
    if v == min_v:
        min_id = i

goukei = 0
for i, (price, order) in enumerate(zip(ryouri, order_1)):
    if i == min_id:
        goukei = goukei + price
    else:
        goukei = goukei + price + 10

print(goukei)


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

order_1 = [i*0.1 - int(i*0.1) for i in ryouri]
min_v = sorted(order_1)[0]
min_id = 0
for i, v in enumerate(order_1):
    if v == min_v:
        min_id = i

goukei = 0
for i, (price, order) in enumerate(zip(ryouri, order_1)):
    if i == min_id:
        goukei = goukei + ryouri
    else:
        goukei = goukei + ryouri + 10



import math
ryouri = [int(input()) for i in range(5)]

order_1 = [(i-1)*0.1 - int((i-1)*0.1) for i in ryouri]
min_v = 999
min_id = 0
for i, v in enumerate(order_1):
    if v < min_v:
        min_v = v
        min_id = i

goukei = 0
for i, (price, order) in enumerate(zip(ryouri, order_1)):
    if i == min_id:
        goukei = goukei + price
    else:
        goukei = goukei + math.ceil(price*0.1)*10

print(goukei)


Verdicts: 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):
a,b,c,d,e=[int(input()) for i in range(5)]
a1=a%10
b1=b%10
c1=c%10
d1=d%10
e1=e%10
A=[a1,b1,c1,d1,e1]
cnt=(a//10 + b//10+c//10+d//10+e//10)*10+40+min(A)
print(cnt)

a,b,c,d,e=[int(input()) for i in range(5)]
a1=a%10
b1=b%10
c1=c%10
d1=d%10
e1=e%10
A=[a1,b1,c1,d1,e1]
for i in range(5):
  if 0 in A:
    A.remove(0)
if A==[]:
  cnt=(a//10 + b//10+c//10+d//10+e//10)*10
  A.append(0)
else:
  cnt=(a//10 + b//10+c//10+d//10+e//10)*10+10*(len(A)-1)
cnt1=cnt+min(A)
print(cnt1)


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):
import math

time_list = list()

for _ in range(5):
    time_list.append(int(input()))


def key_func(x):
    if x < 100:  
        if x % 10 == 0:
            return 10
        return x % 10  
    else:
        if x % 100 == 0:
            return 10
        return x % 100  


time_list.sort(key=key_func, reverse=True)

# print(time_list)

ans = sum
for i, time in enumerate(time_list):
    if i < len(time_list) - 1:
        ans += math.ceil(time / 10) * 10
    else:
        ans += time

print(ans)


import math

time_list = list()

for _ in range(5):
    time_list.append(int(input()))


def key_func(x):
    if x < 100:
        if x % 10 == 0:
            return 10
        return x % 10  
    else:
        if x % 100 == 0:
            return 10
        return x % 100  


time_list.sort(key=key_func, reverse=True)

print(time_list)

ans = sum
for i, time in enumerate(time_list):
    if i < len(time_list) - 1:
        ans += math.ceil(time / 10) * 10
    else:
        ans += time

print(ans)


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

sorted_list = sorted(input_list, key=lambda v: v%10, reverse=True)

time = 0
for v in sorted_list[:-1]:
    time += math.ceil(v/10)*10
time += sorted_list[-1]


print(time)

import math

time_list = list()

for _ in range(5):
    time_list.append(int(input()))


ans = 1e6
for i in range(len(time_list)):
    tmp = 0
    for j in range(len(time_list)):
        if i == j:
            tmp += time_list[i]
            continue
        tmp += math.ceil(time_list[j] / 10) * 10
    ans = min(tmp, ans)

print(ans)

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Accepted