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):
import numpy as np
A=[int(input()) for i in range(5)]
B=[]
for i in range(5):
    if int(str(A[i])[-1])!=0 and len(str(A[i]))>2:
        B.append(int(str(A[i])[:-3]+str(A[i]+1)+'0'))
    elif int(str(A[i])[-1])!=0 and len(str(A[i]))==2:
        B.append(int(str(int(str(A[i])[0])+1)+'0'))
    elif int(str(A[i])[-1])!=0 and len(str(A[i]))==1:
        B.append(10)
    else:
        B.append(int(A[i]))
a=np.array(A)
b=np.array(B)
np.array(B)-np.array(A)
tmp=np.sort(b-a)
return sum(tmp)+sum(a)-tmp[-1]

import numpy as np
A=[int(input()) for i in range(5)]
B=[]
for i in range(5):
    if int(str(A[i])[-1])!=0 and len(str(A[i]))>2:
        B.append(int(str(A[i])[:-2]+str(int(str(A[i])[-2])+1)+'0'))
    elif int(str(A[i])[-1])!=0 and len(str(A[i]))==2:
        B.append(int(str(int(str(A[i])[0])+1)+'0'))
    elif int(str(A[i])[-1])!=0 and len(str(A[i]))==1:
        B.append(10)
    else:
        B.append(int(A[i]))
a=np.array(A)
b=np.array(B)
np.array(B)-np.array(A)
tmp=np.sort(b-a)
print(sum(tmp)+sum(a)-tmp[-1])

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())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

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

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

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

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

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

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

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

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

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

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

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

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

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

Verdicts: Runtime Error

Wrong Answer

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

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

import math
a=int(input());b=int(input());c=int(input());d=int(input());e=int(input())

N=math.ceil(a/10)*10+math.ceil(b/10)*10+math.ceil(c/10)*10+math.ceil(d/10)*10+math.ceil(e/10)*10
X=[a%10,b%10,c%10,d%10,e%10]
print(N-(10-min(X)))

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

import math
a=int(input());b=int(input());c=int(input());d=int(input());e=int(input())

N=math.ceil(a/10)*10+math.ceil(b/10)*10+math.ceil(c/10)*10+math.ceil(d/10)*10+math.ceil(e/10)*10
X=[a%10,b%10,c%10,d%10,e%10]
n=0
while(n!=5):
  if X[n]==0:
    X[n]==9
  n+=1
if a==b==c==d==e:
  print(N-min(X))
else:
  print(N-(10-min(X)))

import math
a=int(input());b=int(input());c=int(input());d=int(input());e=int(input())

N=math.ceil(a/10)*10+math.ceil(b/10)*10+math.ceil(c/10)*10+math.ceil(d/10)*10+math.ceil(e/10)*10
X=[a%10,b%10,c%10,d%10,e%10]
X.remove([i for i, x in enumerate(X) if x == 0])
if a==b==c==d==e:
  print(N-min(X))
else:
  print(N-(10-min(X)))

import math
a=int(input());b=int(input());c=int(input());d=int(input());e=int(input())

N=math.ceil(a/10)*10+math.ceil(b/10)*10+math.ceil(c/10)*10+math.ceil(d/10)*10+math.ceil(e/10)*10
X=[a%10,b%10,c%10,d%10,e%10]
if a==b==c==d==e:
  print(N-min(X))
else:
  print(N-(10-min(X)))

import math
a=int(input());b=int(input());c=int(input());d=int(input());e=int(input())

N=math.ceil(a/10)*10+math.ceil(b/10)*10+math.ceil(c/10)*10+math.ceil(d/10)*10+math.ceil(e/10)*10
X=[a%10,b%10,c%10,d%10,e%10]
n=0
while(n!=5):
  if X[n]==0:
    X[n]=10
  n+=1

else:
  print(N-(10-min(X)))

Verdicts: Runtime Error

Wrong Answer

Runtime Error

Wrong Answer

Runtime Error

Wrong Answer

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

Submission attempts (in order):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
dishes = [a,b,c,d,e]
ans = 0
for i in range(5):
  if dishes[i]%10=0:
    ans += dishes[i]//10
  else:
    ans += dishes[i]//10+1
print(ans*10)

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
dishes = [a,b,c,d,e]
ans = 0
for i in range(5):
  if dishes[i]%10==0:
    ans += dishes[i]//10
  else:
    ans += dishes[i]//10+1
print(ans*10)

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
dishes = [a,b,c,d,e]
n = []
ans = 0
for i in range(5):
  if dishes[i]%10==0:
    ans += dishes[i]//10
  else:
    ans += dishes[i]//10+1
    n.append(dishes[i]%10)
if len(n)==0:
  print(ans*10)
else:
ans = ans*10-10+min(n)
print(ans)


a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
dishes = [a,b,c,d,e]
n = []
ans = 0
for i in range(5):
  if dishes[i]%10==0:
    ans += dishes[i]//10
  else:
    ans += dishes[i]//10+1
    n.append(dishes[i]%10)
n.append(0)
ans = ans*10-10+min(n)
print(ans)

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
dishes = [a,b,c,d,e]
n = []
ans = 0
for i in range(5):
  if dishes[i]%10==0:
    ans += dishes[i]//10
  else:
    ans += dishes[i]//10+1
    n.append(dishes[i]%10)
if len(n)==0:
  print(ans*10)
else:
  ans = ans*10-10+min(n)
  print(ans)

Verdicts: Runtime Error

Wrong Answer

Runtime Error

Wrong Answer

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

Submission attempts (in order):
l = [ int(input()) for _ in range(5) ]
r = sorted([ 10-((10-i)%10) for i in l ])
print()
u = [ -(-i//10) for i in l ]
print(sum(u)-(10-r[0]))

l = [ int(input()) for _ in range(5) ]
r = sorted([ 10-((10-i)%10) for i in l ])
u = [ -(-i//10)*10 for i in l ]
print(sum(u)-(10-r[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):
 mod0 = []
lst = []
for i in range(5):
    inp = int(input())
    if inp % 10 == 0:
        mod0.append(inp)
    else:
        lst.append(inp)

ans = sum(mod0)
last = 0
for n, i in enumerate(lst):
    for nn, ii in enumerate(lst):
        if i % 10 < ii % 10:
            last = i
        else:
            last = ii

for i, ii in enumerate(lst):
    if ii == last:
        continue
    ans += (ii // 10 + 1) * 10

print(ans+last)


mod0 = []
lst = []
for i in range(5):
    inp = int(input())
    if inp % 10 == 0:
        mod0.append(inp)
    else:
        lst.append([inp, inp % 10])
ans = sum(mod0)
lst.sort(key= lambda x :x[1])

if len(lst) != 0:
    last = lst.pop(0)
    ans = sum(mod0)
    for i,imod in lst:
        ans += (i//10 +1)*10
    ans+=last[0]

print(ans)


Verdicts: Runtime Error

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

Submission attempts (in order):
a=[int(input()) for i in range(5)]
b=[a[i]//10*10 for i in range(5)]
c=min([a[i]%10 for i in range(5)])
print(c+40+sum(b))


a=[int(input()) for i in range(5)]
b=[(a[i]-1)//10*10 for i in range(5)]
c=[a[i]%10 for i in range(5)]
for i in range(5):
	if a[i]%10==0:
		c[i]=10
d=min(c)
print(d+40+sum(b))

Verdicts: Wrong Answer

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

Submission attempts (in order):
from itertools import permutations
import math
menu = 5
times = [int(input()) for i in range(menu)]
orders = list(permutations(times,menu))
minimum = sum(math.ceil(time/10)*10 for time in times)
for order in orders:
  total = order[0]
  for i in range(1,menu):
    total = math.ceil(order[i]/10)*10
  minimum = min(minimum,total)
print(minimum)

from itertools import permutations
import math
menu = 5
times = [int(input()) for i in range(menu)]
orders = list(permutations(times,menu))
minimum = sum(math.ceil(time/10)*10 for time in times)
for order in orders:
  total = 0
  for i in range(menu-1):
    total += math.ceil(order[i]/10)*10
  total += order[4]
  minimum = min(minimum,total)
  
print(minimum)
  
      
      

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 numpy as np
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

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

r = np.array([a, b, c, d, e])
k = (r > 0).sum()
l = r[r != 0].min()
print(A + B + C + D + E + 10*(k-1) + l)

import numpy as np
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
 
a = A % 10
b = B % 10
c = C % 10
d = D % 10
e = E % 10
 
aa = A // 10
bb = B // 10
cc = C // 10
dd = D // 10
ee = E // 10
 
r = np.array([a, b, c, d, e])
k = (r > 0).sum()
if k > 0:
  l = r[r != 0].min()
  print((aa + bb + cc + dd + ee) * 10 + 10*(k-1) + l)
else:
  print(A + B + C + D + E)

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

ans = a[0]
for i in a[1:]:
  ans += i if i%10==0 else i+10-i%10

print(ans)

a = [ int(input()) for _ in range(5) ]
a = sorted(a,key=lambda x: x%10)

ans = a[0]
for i in a[1:]:
  ans += i + 10-i%10

print(ans)

a = [ int(input()) for _ in range(5) ]
a = sorted(a,key=lambda x: (x-1)%10)

ans = a[0]
for i in a[1:]:
  ans += i if i%10==0 else i+10-i%10
 
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):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

a_s = a + (10 - a%10)
a_a = a%10
b_s = b + (10 - b%10)
b_a = b%10
c_s = c + (10 - c%10)
c_a = c%10
d_s = d + (10 - d%10)
d_a = d%10
e_s = e + (10 - e%10)
e_a = e%10

answer = (a_s + b_s + c_s + d_s + e_s)

List =[]
List.append(a_a)
List.append(b_a)
List.append(c_a)
List.append(d_a)
List.append(e_a)
List.sort()

for i in range(5):
    if(List[i] != 0):
        answer = answer - (10-List[i])
        break

print(answer)

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

a_s = (a + (10 - a%10) if (a%10 != 0) else a)
a_a = a%10
b_s = (b + (10 - b%10) if (b%10 != 0) else b)
b_a = b%10
c_s = (c + (10 - c%10) if (c%10 != 0) else c)
c_a = c%10
d_s = (d + (10 - d%10) if (d%10 != 0) else d)
d_a = d%10
e_s = (e + (10 - e%10) if (e%10 != 0) else e)
e_a = e%10

answer = (a_s + b_s + c_s + d_s + e_s)

List =[]
List.append(a_a)
List.append(b_a)
List.append(c_a)
List.append(d_a)
List.append(e_a)
List.sort()

for i in range(5):
    if(List[i] != 0):
        answer = answer - (10-List[i])
        break

print(answer)

Verdicts: Wrong Answer

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

Submission attempts (in order):
from itertools import permutations

D = [int(input()) for _ in range(5)]
ans = 650

for d in list(permutations(D)):
  sum = 0
  for i in range(5):
    sum += d[i]
    if (i != 4):
      sum += 10 - (d[i] % 10)
  if sum < ans:    
    ans = sum

print(ans)  

from itertools import permutations

D = [int(input()) for _ in range(5)]
ans = 650

for d in list(permutations(D)):
  sum = 0
  for i in range(5):
    sum += d[i]
    if D[i] % 10 > 0:
      sum += 10 - (D[i] % 10)
    else:
      sum += 0
  if sum < ans:    
    ans = sum

print(ans)  

from itertools import permutations

D = [int(input()) for _ in range(5)]
ans = 650

for d in list(permutations(D)):
  sum = 0
  for i in range(5):
    sum += d[i]
    if (i != 4):
      if D[i] % 10 > 0:
        sum += 10 - (D[i] % 10)
      else:
        sum += 0
  if sum < ans:    
    ans = sum

print(ans)  


from itertools import permutations

D = [int(input()) for _ in range(5)]
ans = 650

for d in list(permutations(D)):
  sum = 0
  for i in range(5):
    sum += d[i]
    if (i < 4):
      if d[i] % 10 > 0:
        sum += 10 - (d[i] % 10)
      else:
        sum += 0
  if sum < ans:    
    ans = sum

print(ans)

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):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

list = []
list.append(a)
list.append(b)
list.append(c)
list.append(d)
list.append(e)

for i in range(5):
    for j in range(i,5):
        if int(list[i])%10 != 0 and int(list[i])%10<int(list[j])%10:
            temp = list[i]
            list[i] = list[j]
            list[j] = temp
        
s = 0
for i in range(3):
    if int(list[i])%10 != 0:
        s += int(list[i])-int(list[i])%10+10
    else:
        s += int(list[i])

s += int(list[4])

print(s)

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

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

list2 = [a%10,b%10,c%10,d%10,e%10]   
for i in range(5):
    if list2[i] == 0:
        list2[i] += 10


for i in range(5):
    for j in range(4,i,-1):
        if list2[i]<list2[j]:
            temp = list[i]
            list[i] = list[j]
            list[j] = temp
            print(list)
            

s = 0
for i in range(4):
    if int(list[i])%10 != 0:
        s += int(list[i])-int(list[i])%10+10
    else:
        s += int(list[i])

s += int(list[4])

print(s)


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

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

list2 = [a%10,b%10,c%10,d%10,e%10]  

for i in range(5):
    if list2[i] == 0:
        list2[i] += 10


for i in (range(4)):
        for j in range(4,i,-1):
            if list2[j] > list2[j-1]:
                list2[j],list2[j-1] = list2[j-1],list2[j]
                list1[j], list1[j-1] = list1[j-1], list1[j]

s = 0
for i in range(4):
    if int(list1[i])%10 != 0:
        s += int(list1[i])-int(list1[i])%10+10
    else:
        s += int(list1[i])

s += int(list1[4])

print(s)

Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
a = []
b = []
min = 10
minutes = 0

for i in range(5):
    a.append(int(input()))
    if 0 < a[i] % 10 < min:
        min = a[i] % 10
        min_index = i
    else:
        min_index = 1

a[4], a[min_index] = a[min_index], a[4]

for i in range(4):
    if a[i] % 10 != 0:
        minutes += (a[i] // 10 + 1) * 10
    else:
        minutes += a[i]

minutes += a[4]

print(minutes)

menu = []

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

from itertools import permutations
from math import ceil

min_sum = 10**10
for i in permutations(menu, 5):
    sum = 0
    for j in range(4):
        sum += ceil(i[j]/10) * 10
    sum += i[4]
    if sum < min_sum:
        min_sum = sum

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

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
A = a % 10
B = b % 10
C = c % 10
D = d % 10
E = e % 10
L = list[A,B,C,D,E]
min_ = L.index(min(L)
A = math.ceil(a)
B = math.ceil(b)
C = math.ceil(c)
D = math.ceil(d)
E = math.ceil(e)
m = A+B+C+D+E
if min_ == 0:
  m = m - A + a
elif min_ == 1:
  m = m - B + b
elif min_ == 2:
  m = m - C + c
elif min_ == 3:
  m = m - D + d
elif min_ == 4:
  m = m - E + e
print(m)

               

import math
 
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
A = a % 10
B = b % 10
C = c % 10
D = d % 10
E = e % 10
L = [A,B,C,D,E]
L = [10 if i == 0 else i for i in L]
min_ = L.index(min(L))
A = math.ceil(a*0.1)*10
B = math.ceil(b*0.1)*10
C = math.ceil(c*0.1)*10
D = math.ceil(d*0.1)*10
E = math.ceil(e*0.1)*10
m = A+B+C+D+E
if min_ == 0:
  m = m - A + a
elif min_ == 1:
  m = m - B + b
elif min_ == 2:
  m = m - C + c
elif min_ == 3:
  m = m - D + d
elif min_ == 4:
  m = m - E + e
print(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):
l = [int(input()) for i in range(5)]

import math

sum([math.ceil(i/10) * 10 for i in l]) - max([math.ceil(i/10) * 10 - i for i in l])

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

import math

print(sum([math.ceil(i/10) * 10 for i in l]) - max([math.ceil(i/10) * 10 - i for i in l]))

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

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

res = 1 << 28
for ss in itertools.permutations(s):
    tmp = 0
    tmp += (ss[0] + 9) // 10
    tmp += (ss[1] + 9) // 10
    tmp += (ss[2] + 9) // 10
    tmp += (ss[3] + 9) // 10
    tmp += ss[4]
    res = min(res, tmp)

print(res)


import itertools

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

res = 1 << 28
for ss in itertools.permutations(s):
    tmp = 0
    tmp += (ss[0] + 9) // 10 * 10
    tmp += (ss[1] + 9) // 10 * 10
    tmp += (ss[2] + 9) // 10 * 10
    tmp += (ss[3] + 9) // 10 * 10
    tmp += ss[4]
    res = min(res, tmp)

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):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a=INT()
    b=INT()
    c=INT()
    d=INT()
    e=INT()
    ct=0
    alls=[a,b,c,d,e]
    for i in alls:
        if i%10!=0:
            ct+=(i//10+1)*10
        else:
            ct+=i
    ct=ct-(10-min(a%10,b%10,c%10,d%10,e%10))
    print(ct)
if __name__ == '__main__':
    do()

INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a=INT()
    b=INT()
    c=INT()
    d=INT()
    e=INT()
    ct=0
    alls=[a,b,c,d,e]
    for i in alls:
        if i%10!=0:
            ct+=(i//10+1)*10
        else:
            ct+=i
    f=min(a%10,b%10,c%10,d%10,e%10)
    if f!=0:
        ct=ct-(10-f)
    print(ct)
if __name__ == '__main__':
    do()

INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a=INT()
    b=INT()
    c=INT()
    d=INT()
    e=INT()
    ct=0
    alls=[a,b,c,d,e]
    for i in alls:
        if i%10!=0:
            ct+=(i//10+1)*10
        else:
            ct+=i
    f=max((10-a%10)%10,(10-b%10)%10,(10-c%10)%10,(10-d%10)%10,(10-e%10)%10,)
    ct=ct-f
        
    print(ct)
if __name__ == '__main__':
    do()

Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
a = [0]*5
a_one = [0]*5
a_ten = [0]*5
for i in range(5):
    a[i] = int(input())
    a_one[i] = a[i]%10
    a_ten[i] = abs(10-a_one[i])
min_one_index = a_one.index(min(a_one))
ans = 0
for i in range(5):
    if i != min_one_index:
        ans += a[i]+a_ten[i]
    else :
        ans += a[i]
print(ans)

a = [0]*5
a_one = [0]*5
a_ten = [0]*5
for i in range(5):
    a[i] = int(input())
    a_one[i] = a[i]%10
    if a_one[i] == 0:
        a_one[i] = 10
    a_ten[i] = abs(10-a_one[i])

min_one_index = a_one.index(min(a_one))
ans = 0
for i in range(5):
    if i != min_one_index:
        ans += a[i]+a_ten[i]
    else :
        ans += a[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):
menu = [int(input()) for i in range(5)]
dist = list(map(lambda x: x%10, menu))
idx = dist.index(min(dist))
dist.pop(idx)
inv = list(map(lambda x: 10-x, dist))
cost = sum(menu) + sum(inv)
print(cost)

dish = [0]*5
inv = [0]*5

for i in range(5):
  dish[i] = int(input())
  inv[i] = (10-dish[i]%10)%10
  
cost = sum(dish) + sum(inv) - max(inv)
print(cost)

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 numpy as np
import itertools
data = [int(input()) for _ in range(5)]

for orders in itertools.permutations(data):
    current_time = 0
    next_arrival = 0
    for i in range(5):
        next_arrival = current_time + orders[i]
        current_time = np.ceil(next_arrival/10).astype(int) *10
print(next_arrival)

import numpy as np
import itertools
data = [int(input()) for _ in range(5)]
minimum = 10**15
for orders in itertools.permutations(data):
    current_time = 0
    next_arrival = 0
    for i in range(5):
        next_arrival = current_time + orders[i]
        current_time = np.ceil(next_arrival/10).astype(int) *10

    minimum = min(minimum,next_arrival)
print(minimum)

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()) for i in range(5)]
ma = max([10-a%10 for a in A])
A = [a if a%10 == 0 else a+10-a%10 for a in A]
print(sum(A)-ma)


A = [int(input()) for i in range(5)]
ma = max([0 if a%10 == 0 else 10-a%10 for a in A])
A = [a if a%10 == 0 else a+10-a%10 for a in A]
print(sum(A)-ma)


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):
menu=[]
total=10
c=0
for i in range(5):
    a=int(input())
    b=a%10
    if 0<b<9:
        if total>b:
            total=b
            c=i
            menu.append(a)
        else:
            menu.append(a+10-b)
    else:
        menu.append(a+10-b)
print(sum(menu))

menu=[]
total=10
c=0
for i in range(5):
    a=int(input())
    b=a%10
    if 0<b<=9:
        if total>b:
            total=b
            menu.append(a)
        else:
            menu.append(a+10-b)
    else:
        menu.append(a)
print(sum(menu))

menu=[]
menu2=[]
total=False
c=0
total2=0
for i in range(5):
    a=int(input())
    menu.append(a)
    menu2.append(a%10)
    if a%10==0:
        total2+=1
if total2==5:
    print(sum(menu))
else:
    for i in range(1,10):
        for k in range(5):
            if menu2[k]==i:
                total=True
                c=k
                break
        if total==True:
            break
    print(sum(menu)+10*(4-total2)-sum(menu2)+menu2[c])

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

a = []

for i in range(5):
    a.append(int(dish[i][-1]))

r = []

for i in range(5):
    r.append(int(dish[i]))

for i in range(5):
    if i != a.index(min(a)):
    
        r[i] += 10 - a[i]

print(sum(r))
    
    

dish = [input() for i in range(5)]

a = []

for i in range(5):
    a.append(int(dish[i][-1]))

r = []

for i in range(5):
    r.append(int(dish[i]))
    
for i in range(5):
    if a[i] == 0:
        a[i] += 10

for i in range(5):
    if i != a.index(min(a)):
            r[i] += 10 - a[i]

print(sum(r))

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

def roundup(n):
    if n % 10 < 5:
        return round(n+4,-1)
    else:
        return round(n,-1)


last_index = mod.index(min(mod))
sum = 0
for j in range(5):
    if j == last_index:
        sum += ls[j]
    else:
        sum += roundup(ls[j])
print(sum)


ls = []
for i in range(5):
    ls.append(int(input()))
def roundup(n):
    if n % 10 <= 5:
        return round(n+5,-1)
    else:
        return round(n,-1)
import itertools
sum = []
for p in list(itertools.permutations(ls)):
    av = 0
    cnt = 0 

    for j in p:
        av += j
        cnt += 1

        if  cnt != 5 and av % 10 != 0:
            av = roundup(av)

    sum.append(av)
print(min(sum))

Verdicts: Wrong Answer

Accepted