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())
import numpy as np
num=[a,b,c,d,e]
resi=[i%10 for i in num]
x=np.argsort(resi)
minnum=num[x[0]]
del(num[x[0]])
sumnum=sum([((i//10)+1)*10 for i in num])
res=sumnum+minnum
print(res)

a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
import numpy as np
num=[a,b,c,d,e]
resi=[i%10 if i%10 != 0 else 10 for i in num ]
x=np.argsort(resi)
minnum=num[x[0]]
del(num[x[0]])
sumnum=sum([((i//10)+1)*10 if i%10 !=0 else i for i in num])
res=sumnum+minnum
print(res)

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=[];timeloss=[];ans=0
for i in range(5):
    a=input()
    if a[-1]==0:
        ans+=int(a)
    else:
        time.append(int(a))
        timeloss.append(10-int(a[-1]))
for i in range(5):
        for i in range(5):
            if timeloss[i]==min(timeloss):
                ans+=time[i]
                if not len(time)==1:
                    ans+=timeloss[i]
                del time[i];del timeloss[i];break
print(ans)

time=[];timeloss=[];ans=0
for i in range(5):
    a=input()
    if a[-1]==0:
        ans+=int(a)
    else:
        a=int(a)
        time.append(a)
        timeloss.append(10-a)
while len(time)>0:
        for i in range(len(time)):
            if timeloss[i]==min(timeloss):
                ans+=time[i]
                if not len(time)==1:
                    ans+=timeloss[i]
                del time[i];del timeloss[i];break
print(ans)

time=[];timeloss=[];ans=0
for i in range(5):
    a=input()
    if int(a[-1])==0:
        ans+=int(a)
    else:
        time.append(int(a))
        timeloss.append(10-int(a[-1]))
while len(time)>0:
        for i in range(len(time)):
            if timeloss[i]==min(timeloss):
                ans+=time[i]
                if not len(time)==1:
                    ans+=timeloss[i]
                del time[i];del timeloss[i];break
print(ans)


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 = [int(input()) for i in range(5)]
l_d = []
for i in l:
  if i % 10 == 0:
    l_d.append(0)
  else:
    n = (i//10+1)*10 - i
    l_d.append(n)
c = []
for i, j in zip(l_d, l):
  c.append([i, j])
  
from operator import itemgetter
c.sort(key=itemgetter(0))
a, b = zip(*c)
d = list(b)
for n, i in enumerate(list(d[:-1])):
  if i % 10 == 0:
    continue
  else:
    d[n] = (i//10+1)*10    
sum(d)

l = [int(input()) for i in range(5)]
l_d = []
for i in l:
  if i % 10 == 0:
    l_d.append(0)
  else:
    n = (i//10+1)*10 - i
    l_d.append(n)
c = []
for i, j in zip(l_d, l):
  c.append([i, j])
  
from operator import itemgetter
c.sort(key=itemgetter(0))
a, b = zip(*c)
d = list(b)
for n, i in enumerate(list(d[:-1])):
  if i % 10 == 0:
    continue
  else:
    d[n] = (i//10+1)*10    
print(sum(d))

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=[input() for i in range(5)]
a=[0, 0, 0, 0, 0]
e=9
for i in range(5):
  if e >= int(l[i][-1]) and not(int(l[i][-1]) == 0):
      a[4] = l[i]

l.remove(a[4])
l = [int(i) for i in l]
for j in range(4):
  while(not(int(l[j]) % 10 is 0)):
    l[j]+=1
  a[j] = int(l[j])
a[4] = int(a[4])
print(sum(a))
print(a[4])

l=[input() for i in range(5)]
a=[0, 0, 0, 0, "9"]

for i in range(5):
  if int(a[4][-1]) >= int(l[i][-1]) and not(int(l[i][-1]) == 0):
      a[4] = l[i]

if a[4] is "9":
  a[4] = l[0]

l.remove(a[4])
l = [int(i) for i in l]
l.sort()
for j in range(4):
  while(not(int(l[j]) % 10 is 0)):
    l[j]+=1
  a[j] = int(l[j])
  
a[4] = int(a[4])
print(sum(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):
def ceil(v):
	if v % 10 == 0:
		return v
	else:
		return (v // 10+1) *10

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

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

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

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

print(times)
print(sum(times))

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

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

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

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

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

print(sum(times))

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 _ in range(5)]
b = min([i%10 for i in a if i%10 != 0],0)
print(sum([((i + 9)//10 *10) for  i in a]) - (10-b) )

a = [int(input()) for _ in range(5)]
b = [i%10 for i in a if i%10 !=0]
if len(b)==0:
  b=0
else:
  b= 10 - min(b)
print(sum([((i + 9)//10 *10) for  i in a]) - b)

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

a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
a_div=math.floor(a/10)
a_res = a%10
if a_res == 0:
    a_res=10

b_div=math.floor(b/10)
b_res = b%10
if b_res == 0:
    b_res=10

c_div=math.floor(c/10)
c_res = c%10
if c_res == 0:
    c_res=10

d_div=math.floor(d/10)
d_res = d%10
if d_res == 0:
    d_res=10

e_div=math.floor(e/10)
e_res = e%10
if e_res == 0:
    e_res=10

#print(a_div)
print(int(10*(a_div+b_div+c_div+d_div+e_div+4)+min(a_res,b_res,c_res,d_res,e_res)))







import math
nums=[]
round_nums=[]
for i in range(5):
    k=int(input())
    nums.append(k)
    round_nums.append(math.ceil(k/10.0)*10)

dist=0
for i in range(5):
    if round_nums[i]-nums[i]>dist:
        dist=round_nums[i]-nums[i]

#print(nums)
print(int(sum(round_nums)-dist))







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

for i in range(5):
  tot = (an[i] // 10) * 10
  an[i] -= tot
  total += tot
  if an[i] == 0:
    del an[i]
if an:
  total += min(an) + (len(an) - 1)*10
print(total)

an = [int(input()) for i in range(5)]
total = 0

for i in range(5):
  tot = (an[i] // 10) * 10
  an[i] -= tot
  total += tot
  if an[i] == 0:
    del an[i]
    
total += min(an) + (len(an) - 1)*10
print(total)

an = [int(input()) for i in range(5)]
total = 0

for i in range(5):
  tot = (an[i] // 10) * 10
  an[i] -= tot
  total += tot
  if an[i] == 0:
    del an[i]
if len(an) > 0:
  total += min(an) + (len(an) - 1)*10
print(total)

li = [int(input()) for i in range(5)]
al = []
ans = 0
for i in li:
  if i % 10 != 0:
    al.append(i % 10) 
  ans += i // 10
ans *= 10
if len(al) > 0:
  ans += min(al) + (len(al) - 1)*10
print(ans)

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):
dishes=[]
mindiv=10

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

for j in range(len(dishes)):
  k= dishes[j]
  if(k%10 ==0 ):
    continue
  if(k%10 <mindiv):
    mindiv= k%10
  if(k%10 <5 ):
    k += 5
  dishes[j]= round(k,-1)
  
print(dishes)
print(mindiv)
print(sum(dishes)-(10-mindiv))

dishes=[]
mindiv=10

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

for j in range(len(dishes)):
  k= dishes[j]
  if(k%10 ==0 ):
    continue
  if(k%10 <mindiv):
    mindiv= k%10
  if(k%10 <=5 ):
    k += 5
  dishes[j]= round(k,-1)
  
# print(dishes)
# print(mindiv)
print(sum(dishes)-(10-mindiv))

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()) for i in range(5)]
l = [n % 10 % 100 for n in L]
i = l.index(min(l))

ans = sum([n + (10 - ((n % 10) % 100)) for n in L]) - ((10 - ((L[i] % 10) % 100)) + L[i]) + L[i]
print(ans)


L = [int(input()) for i in range(5)]
l = [n % 10 if not (n % 10 == 0) else 100 for n in L]
i = l.index(min(l))
I = 10 - (L[i] % 10) + L[i] if not(L[i] % 10 == 0) else L[i]
SUM = sum([n + 10 - (n % 10) if not (n % 10 == 0) else n for n in L])
# print(i, I, SUM)
ans = SUM - I + L[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):
A=[]
for i in range(5):
  A.append(input())
A.sort(key=lambda x:x[-1])
ans=0
A=[int(x) for x in A]
for i in range(1,5):
  ans+=A[i]//10*10
  ans+=0 if A[i]%10==0 else 10
print(ans+A[0])

A=[]
for i in range(5):
  A.append(input())
A.sort(key=lambda x:(int(x[-1])-1)%10)
ans=0
A=[int(x) for x in A]
for i in range(1,5):
  ans+=A[i]//10*10
  ans+=0 if A[i]%10==0 else 10
print(ans+A[0])

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):
array1 = [int(input()) for i in range(5)]
array2 = [i % 10 for i in array1]
array3 = [i for i in array2 if i != 0]
idx = array3.index(min(array3))
sum1 = 0
sum2 = sum(array2)
for k, i in enumerate(array3):
  if (k == idx):
    sum1 += i
  else:
    sum1 += i + (10 - i % 10)
print(sum1 + sum2)

array = [int(input()) for i in range(5)]
array_sub = [i % 10 for i in array]
new_lst = [i for i in array_sub if i != 0]
minimum = min(new_lst)
sum = 0
for i in array:
  if (i % 10 == minimum):
    sum += i
  else 
  	sum += i + (10 - i % 10)
print(sum)
 


array1 = [int(input()) for i in range(5)]
array2 = [i for i in array1 if i % 10 == 0]
array3 = [i for i in array1 if i % 10 =! 0]
array4 = [i % 10 for i in array3]
idx = array4.index(min(array4))
sum1 = 0
sum2 = sum(array2)
for k, i in enumerate(array3):
  if (k == idx):
    sum1 += i
  else:
    sum1 += i + (10 - i % 10)
print(sum1 + sum2)

array1 = [int(input()) for i in range(5)]
array2 = [i for i in array1 if i % 10 == 0]
array3 = [i for i in array1 if i % 10 =! 0]
array4 = [i % 10 for i in array3]
sum1 = 0
sum2 = sum(array2)
if (len(array3) != 0):
  idx = array4.index(min(array4))
  for k, i in enumerate(array3):
    if (k == idx):
      sum1 += i
    else:
      sum1 += i + (10 - i % 10)
print(sum1 + sum2)


array = [int(input()) for i in range(5)]
array_sub = [i % 10 for i in array]
new_lst = [i for i in array_sub if i != 0]
minimum = min(new_lst)
sum = 0
for i in array:
  if (i % 10 == minimum):
    sum += i
  else:
    sum += i + (10 - i % 10)
print(sum)
 

array1 = [int(input()) for i in range(5)]
array2 = [i for i in array1 if i % 10 == 0]
array3 = [i for i in array1 if i % 10 != 0]
array4 = [i % 10 for i in array3]
sum1 = 0
sum2 = sum(array2)
if (len(array3) != 0):
  idx = array4.index(min(array4))
  for k, i in enumerate(array3):
    if (k == idx):
      sum1 += i
    else:
      sum1 += i + (10 - i % 10)
print(sum1 + sum2)

Verdicts: Runtime Error

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):
a=[int(input()) for i in range(5)]
ans = 0
d1 = 9
for i in range(5):
  ans += a[i]//10*10
  d1=min(d1,a[i]%10)
print(ans+40+d1)

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

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

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):
li = []
for i in range(5):
  li.append(int(input()))
mi = 1e10
ans = 0
for i in range(5):
  ans+=(li[i]//10+1)*(10)
  mi = min(mi,li[i]%10)
print(ans - 10 + mi)


li = []
for i in range(5):
  li.append(int(input()))
mi = 1e10
ans = 0
for i in range(5):
  ans+=(li[i]//10)*(10+(li[i]%10!=0))
  if li[i]%10 != 0:
    mi = min(mi,li[i]%10)
print(ans - 10 + mi)

li = []
for i in range(5):
  li.append(int(input()))
mi = 1e10
ans = 0
for i in range(5):
  ans+=(li[i]//10)*(11)
  mi = min(mi,li[i]%10)
print(ans - 10 + mi)


li = []
for i in range(5):
  li.append(int(input()))
mi = 1e10
ans = 0
for i in range(5):
  ans+=(li[i]//10+(li[i]%10!=0))*(10)
  mi = min(mi,li[i]%10+(li[i]%10==0)*10)
print(ans - 10 + mi)


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):
import numpy as np

i = 0
j = 0

nums = []
first_digits = []
min_first_digit = 9
index = 0
sum = 0

while i < 5:
  x = int(input())
  nums.append(x)
  
  if x % 10 <= min_first_digit and x % 10 != 0:
    min_first_digit = x % 10
    index = i
  i += 1
  
while j < 5:
  if j == index:
    sum += nums[j]
  else:
    sum += (nums[j] + 10 - (nums[j] % 10))
  j += 1
    
print(sum)

  


import numpy as np

i = 0
j = 0

nums = []
first_digits = []
min_first_digit = 9
index = 0
sum = 0

while i < 5:
  x = int(input())
  nums.append(x)
  
  if x % 10 <= min_first_digit and x % 10 != 0:
    min_first_digit = x % 10
    index = i
  i += 1
  
while j < 5:
  if j == index:
    sum += nums[j]
  else:
    if nums[j] % 10 == 0:
      sum += nums[j]
    else:
      sum += (nums[j] + 10 - (nums[j] % 10))
  j += 1
    
print(sum)

  


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, b, c, d, e = [int(input()) for i in range(5)]
list = [a, b, c, d, e]
nlist = [a%10, b%10, c%10, d%10, e%10]
nlist.remove('0')


nlist.sort() 
nlist.remove(0)
mlist = map(10 - nlist)
Sum = sum(list) + sum(mlist)
print (Sum)

l = list(int(input()) for i in range(5))
nlist = []
Sum = 0

for i in range(5):
    if l[i]%10 == 0:
        nlist.append(0)
    else:
        nlist.append(10 - (l[i]%10))
        
if nlist[0] == nlist[1] == nlist[2] == nlist[3] == nlist[4] == 0:
    print(l[0]+l[1]+l[2]+l[3]+l[4])
else:
    
    for i in range(5):
        Sum += l[i] + nlist[i]
    print(Sum - max(nlist))

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):
list = [int(input()) for n in range(5)]
min = 100
for i in range(5):
  if min > list[i] % 10:
    min = list[i] % 10
    min_arg = i
ans = 0
for i in range(5):
  if ans == 0 and i != min_arg:
    ans += list[i]
    continue
  if i == min_arg:
    continue
  ans = ((ans - (ans % 10) + 10) + list[i])
  print(ans)
ans = ((ans - (ans % 10) + 10) + list[min_arg])
print(ans)

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

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

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

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

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):
from math import ceil
ts = [int(input()) for _ in range(5)]
m = 10 - min([t % 10 for t in ts])
tss = [ceil(t / 10) * 10 for t in ts]
print(sum(tss) - m)



from math import ceil
ts = [int(input()) for _ in range(5)]
m = 10 - min([t % 10 for t in ts if not t % 10 == 0] + [10])
tss = [ceil(t / 10) * 10 for t in ts]
print(sum(tss) - m)



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
menu = []
for i in range(0, 5):
        menu.append(int(input()))
df = max([10 - i % 10 for i in menu if i%10!=0 ])
print(df)
sum = 0
for i in menu:
        sum += ((i + 9) // 10) * 10
print(sum-10+df)

import math
menu = []
for i in range(0, 5):
        menu.append(int(input()))
df = max([10 - i % 10 for i in menu if i % 10 != 0 ])
sum = 0
for i in menu:
        sum += ((i + 9) // 10) * 10
if(len(df) == 0):
        print(sum)
else:
        print(sum-df)

import math
menu = []
for i in range(0, 5):
        menu.append(int(input()))
df = max([10 - i % 10 for i in menu if i % 10 != 0 ],default=0)
sum = 0
for i in menu:
        sum += ((i + 9) // 10) * 10
if(df == 0):
        print(sum)
else:
        print(sum-df)

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




def order(order_list):
    t1 = math.ceil(order_list[0] / 10) * 10
    t2 = t1 + math.ceil(order_list[1] / 10) * 10
    t3 = t2 + math.ceil(order_list[2] / 10) * 10
    t4 = t3 + math.ceil(order_list[3] / 10) * 10
    t5 = t4 + order_list[4]
    return t5


if __name__ == '__main__':
    a = int(input())
    b = int(input())
    c = int(input())
    d = int(input())
    e = int(input())

    all_order = sorted([a, b, c, d, e])

    all_cases = list(itertools.permutations(all_order))

    min_time = sys.maxsize

    for e in all_cases:
        print(e)
        time = order(e)
        print(time)
        if time < min_time:
            min_time = time

    print("---------------")
    print(min_time)


import sys
import itertools
import math




def order(order_list):
    t1 = math.ceil(order_list[0] / 10) * 10
    t2 = t1 + math.ceil(order_list[1] / 10) * 10
    t3 = t2 + math.ceil(order_list[2] / 10) * 10
    t4 = t3 + math.ceil(order_list[3] / 10) * 10
    t5 = t4 + order_list[4]
    return t5


if __name__ == '__main__':
    a = int(input())
    b = int(input())
    c = int(input())
    d = int(input())
    e = int(input())

    all_order = sorted([a, b, c, d, e])

    all_cases = list(itertools.permutations(all_order))

    min_time = sys.maxsize

    for e in all_cases:
        time = order(e)
        if time < min_time:
            min_time = time

    print(min_time)


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,b,c = map(int,inpput().split(" "))
#n = int(input())
#print(a,b,c)
t=[]
for i in range(5):
    t.append(int(input()))
#n = int(input())
def dif(x):
    s = int(x/10)
    return (s+1)*10 -x

def comp(a,b):
    a1 = dif(a)
    b1 = dif(b)
    return a1 < b1
d = sorted(t, key=lambda x: dif(x), reverse=True)

sum = 0
for i in range(4):
    if int(d[i]/10)*10 ==d[i]:
        sum = sum+d[i]
    else:
        sum += (int(d[i]/10)+1)*10
print(sum + d[4])

#a,b,c = map(int,inpput().split(" "))
#n = int(input())
#print(a,b,c)
t=[]
for i in range(5):
    t.append(int(input()))
#n = int(input())
def dif(x):
    s = int(a/10)
    return (s+1)*10 -x

def comp(a,b):
    a1 = dif(a)
    b1 = dif(b)
    return a1 < b1
d = sorted(t, cmp=dif(a,b), reverse=True)

sum = 0
for i in range(4):
    if int(d[i]/10)*10 ==d[i]:
        sum = sum+d[i]
    else:
        sum += (int(d[i]/10)+1)*10
print(sum + d[4])

#a,b,c = map(int,inpput().split(" "))
#n = int(input())
#print(a,b,c)
t=[]
for i in range(5):
    t.append(int(input()))
#n = int(input())
def dif(x):
    s = int(x/10)
    if s * 10 == x:
        return 0
    else:
        return (s+1)*10 -x

def comp(a,b):
    a1 = dif(a)
    b1 = dif(b)
    return a1 < b1
d = sorted(t, key=lambda x: dif(x))

sum = 0
for i in range(4):
    if int(d[i]/10)*10 ==d[i]:
        sum = sum+d[i]
    else:
        sum += (int(d[i]/10)+1)*10
print(sum + d[4])

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 = [int(input()) for i in range(5)]
t = 0
for i in range(5):
 t = t + (a[i]//10)*10 +10
print(t + min(a[0]%10,a[1]%10,a[2]%10,a[3]%10,a[4]%10))

a,b,c,d,e = [int(input()) for i in range(5)]
count = a + b + c + d + e
l = [a%10,b%10,c%10,d%10,e%10]
s = [a%10,b%10,c%10,d%10,e%10]
m = [a%10,b%10,c%10,d%10,e%10]
for x in range(len(l)):
    if l[x] == 0:
        m.remove(0)
for i in range (len(s)):
    count = count -s[i]
if len(m) == 0:
    ans= count
    print(ans)
else:
    ans = count + 10*len(m) + min(m) -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):
a = list(map(int,[input() for i in range(5)]))
b = []
c =[]
d = False
for i in a:
	b.append(10-i % 10)
for i,j in zip(b,a):
	if max(b) != i:
		c.append(i+j)
	elif not d:
		c.append(j)
	else:
		c.append(i+j)
print(sum(c))


a = list(map(int,[input() for i in range(5)]))
b = []
c =[]
for i in a:
	b.append(10 - i % 10)
for i,j in zip(b,a):
	if max(b) != i:
		c.append(i+j)
print(sum(c))
	


a = list(map(int,[input() for i in range(5)]))
b = []
c = []
for i in a:
	b.append(10-i % 10)
for i,j in zip(b,a):
	if max(b) != i:
		c.append(i+j)
	else:
		c.append(j)
print(sum(c))


a = list(map(int,[input() for i in range(5)]))
b = []
c =[]
for i in a:
	b.append(10-i % 10)
for i,j in zip(b,a):
	if max[b] != i:
		c.append(i+j)
print(sum(c))
	


a = list(map(int,[input() for i in range(5)]))
b = []
c =[]
for i in a:
	b.append(10 - i % 10)
for i,j in zip(b,a):
	if max(b) != i:
		c.append(i+j)
    else:
        c.append(j)
print(sum(c))
	


b = []
c = []
for i in a:
	b.append(10-i % 10)
for i,j in zip(b,a):
	if max(b) != i:
		c.append(i+j)
	else:
		c.append(j)
print(sum(c))

a = list(map(int,[input() for i in range(5)]))
b = []
c = []
d = False
for i in a:
	b.append(10-i % 10)
for i,j in zip(b,a):
	if max(b) != i:
		c.append(i+j)
	elif not d:
		c.append(j)
    else:
        c.append(i+j)
print(sum(c))


a = list(map(int,[input() for i in range(5)]))
b = 10
c = 0
d = False
for i in a:
	if i % 10 > 0:
		c += i + 10 - i % 10
		print("i: {}, c: {}".format(i,c))
		if b > i % 10:
			b = i % 10
	else:
		c += i
print(c-10+b)


a = list(map(int,[input() for i in range(5)]))
b = 10
c = 0
d = False
for i in a:
	c += i + 10 - i % 10
	print("i: {}, c: {}".format(i,c))
	if b > i % 10:
		b = i % 10
print(c-10+b)


a = list(map(int,[input() for i in range(5)]))
b = 10
c = 0
for i in a:
	if i % 10 > 0:
		c += i + 10 - i % 10
		if b > i % 10:
			b = i % 10
	else:
		c += i
print(c-10+b)


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Runtime Error

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 itertools

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

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

def calc_time(cand):
  tm = 0
  for i in range(len(cand)):
    tm += cand[i]
    if i < 4:
      if tm % 10 != 0:
        tm += 10 - tm % 10
  return(tm)

res = 100000
for cand in itertools.permutations(X):
  tm = calc_time(cand)
  if tm < res:
    res = tm

print(int(tm))

import itertools

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

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

def calc_time(cand):
  tm = 0
  for i in range(len(cand)):
    tm += cand[i]
    if i < 4:
      if tm % 10 != 0:
        tm += 10 - tm % 10
  return(tm)

res = 10000
for cand in itertools.permutations(X):
  tm = calc_time(cand)
  if tm < res:
    res = tm
print(tm)

import itertools

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

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

def calc_time(cand):
  tm = 0
  for i in range(len(cand)):
    tm += cand[i]
    if i < 4:
      if tm % 10 != 0:
        tm += 10 - (tm % 10)
  return(tm)

res = 100000
for cand in itertools.permutations(X):
  tm = calc_time(cand)
  if tm < res:
    res = tm

print(res)

Verdicts: Wrong Answer

Wrong Answer

Accepted