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):
m = 9
l = []
r = []
for i in range(5):
  a = int(input())
  if a % 10 != 0:
    m = 10 - a % 10
    b = a + a % 10
    l.append(b)
    r.append(m)
  else:
    l.append(a)
    r.append(0)
r.sort()
print(sum(l) - r[-1])
      


m = 9
l = []
r = []
for i in range(5):
  a = int(input())
  if a % 10 != 0:
    m = 10 - a % 10
    b = a + a % 10
    l.append(b)
    r.append(m)
  else:
    l.append(a)
r.sort()
print(sum(l) - r[-1])
      

m = 9
l = []
r = []
for i in range(5):
  a = int(input())
  if a % 10 != 0:
    m = 10 - a % 10
    b = a + m
    l.append(b)
    r.append(m)
  else:
    l.append(a)
    r.append(0)
r.sort()
print(sum(l) - r[-1])
      


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())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
aa = 10 * ((a + 9) // 10)
bb = 10 * ((b + 9) // 10)
cc = 10 * ((c + 9) // 10)
dd = 10 * ((d + 9) // 10)
ee = 10 * ((e + 9) // 10)
x = min(set([a%10,b%10,c%10,d%10,e%10]) - {0})
print(x)
print(aa+bb+cc+dd+ee-(10-x))


a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
aa = 10 * ((a + 9) // 10)
bb = 10 * ((b + 9) // 10)
cc = 10 * ((c + 9) // 10)
dd = 10 * ((d + 9) // 10)
ee = 10 * ((e + 9) // 10)
if len(set([a%10,b%10,c%10,d%10,e%10]) - {0}) > 0:
    x = min(set([a%10,b%10,c%10,d%10,e%10]) - {0})
else:
    x = 10
# print(x)
print(aa+bb+cc+dd+ee-(10-x))


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):
r=[int(input()) for _ in range(5)]
#print(r)

ans=0
rowMin=0

for item in r:
  ans+=(((-1*item)//10)*(-10))
  if item%10 !=0 and item%10<rowMin%10:
    rowMin=item
    

ans=ans+rowMin-(((-1*rowMin)//10)*(-10))
print(ans)

r=[int(input()) for _ in range(5)]
#print(r)

ans=0
rowMin=-9

for item in r:
  ans+=(((-1*item)//10)*(-10))
  if item%10 !=0 and item%10<rowMin%10:
    rowMin=item
    
if rowMin>0:
  ans=ans+rowMin-(((-1*rowMin)//10)*(-10))
else:
  ans=ans
print(ans)

r=[int(input()) for _ in range(5)]
#print(r)

ans=0
rowMin=9

flag=0
for item in r:
  ans+=(((-1*item)//10)*(-10))
  if item%10 !=0 and item%10<=rowMin%10:
    rowMin=item
    flag=1
if flag==1:
  ans=ans+rowMin-(((-1*rowMin)//10)*(-10))
else:
  ans=ans
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 = [0] * 5
for i in range(5):
  A[i] = int(input())
A.sort(reversed=True, key=lambda x: x % 10)
t = 0
for a in A[:4]:
  a += 9
  t += a - a % 10
print(t + a[4])

A = [0] * 5
for i in range(5):
  A[i] = int(input())
A.sort(reverse=True, key=lambda x: x % 10)
for i in range(5):
  if A[4] % 10 == 0:
    A = [A[4]] + A[:4]
  else:
    break
t = 0
for a in A[:4]:
  a += 9
  t += a - a % 10
print(t + A[4])

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):
n = [int(input()) for _ in range(5)]
minNum = 9
x = 0
for i in n:
    if i % 10 < minNum and i % 10 != 0:
        minNum = i % 10
        x = i
n.pop(n.index(x))
total = x
print(total)
for j in n:
    total += ((j + 9) // 10) * 10
print(total)

n =  [int(input()) for x in range(5)]
minNum = 10
array = 0
for i in range(len(n)):
    num = i % 10
    if(num <= minNum):
        minNum = num
        array = i
numList = []
a = n[array]
n[array] = 0
for x in n:
    k = ((x + 9) // 10) * 10
    numList.append(k)
    
print(sum(numList) + a)

n = [int(x) for x in input().split()]
minNum = 10
array = 0
for i in range(len(n)):
	num = n[i] % 10
	if(num <= minNum):
		minNum = num
		array = i

arraySum = []
for j in n:
	k = ((j + 9) // 10) * 10
	arraySum.append(k)
	
print(sum(arraySum) + n[array])

n =  [int(input()) for x in range(5)]
minNum = 10
array = 0
for i in range(len(n)):
    num = n[i] % 10
    print(num)
    if((num <= minNum) and (num != 0)):
        minNum = num
        array = i
        
numList = []
a = n[array]
n[array] = 0

for x in n:
    k = ((x + 9) // 10) * 10
    numList.append(k)
print(numList)    
print(sum(numList) + a)

n = []
n[0] = int(input())
n[1] = int(input())
n[2] = int(input())
n[3] = int(input())
n[4] = int(input())

minNum = 10
array = 0
for i in range(len(n)):
	num = n[i] % 10
	if(num <= minNum):
		minNum = num
		array = i

arraySum = []
for j in n:
	k = ((j + 9) // 10) * 10
	arraySum.append(k)
	
print(sum(arraySum) + n[array])


ls = [int(input()) for i in range(5)]
ans = []
num = 0
minNum = 10
flag = True
    
for j in ls:
    x = j % 10
    if x < minNum and x > 0:
        num = j
        minNum = x
    elif minNum == 10 and j == ls[-1]:
        flag = False
if flag:
    ans.append(num)
    ls.pop(ls.index(num))

for i in ls:
    y = ((i + 9) // 10) * 10
    ans.append(y)

print(sum(ans))

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

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

Submission attempts (in order):
times = [int(input()) for _ in range(5)]
fraction = max([10 - t % 10 for t in times])
if fraction == 10:
    fraction = 0
print(sum([(t - t % 10) + ((t % 10 + 9) // 10) * 10 for t in times]) - fraction)



times = [int(input()) for _ in range(5)]
fractions = [10 - t % 10 for t in times if t % 10 != 0]
if fractions:
    fraction = max(fractions)
else:
    fraction = 0
print(sum([(t + 9) // 10 * 10 for t in times]) - fraction)


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 _ in range(5)]

a = list(map(lambda x: x % 10, l))
for i in range(len(a)):
    if a[i] == 0:
        a[i] = 10
a
mini = min(a)
index = a.index(mini)
def calc(x):
    if x % 10 == 0:
        return x
    else:
        return 10 + (x // 10) * 10
ans = 0
for i in range(len(l)):
    if i == index:
        print(l[i])
        ans += l[i]
    else:
        add = calc(l[i])
        print(add)
        ans += add
print(ans)

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

a = list(map(lambda x: x % 10, l))
for i in range(len(a)):
    if a[i] == 0:
        a[i] = 10
a
mini = min(a)
index = a.index(mini)
def calc(x):
    if x % 10 == 0:
        return x
    else:
        return 10 + (x // 10) * 10
ans = 0
for i in range(len(l)):
    if i == index:
        #print(l[i])
        ans += l[i]
    else:
        add = calc(l[i])
        #print(add)
        ans += add
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 = [int(input())  for i in range(5)]
def amari(num):
    return num % 10
b = list(map(amari, a))
d = min(b)
c = sum(a) - sum(b) + 40 + d
print(c)

a = [int(input())  for i in range(5)]
def amari(num):
    return num % 10
b = list(map(amari, a))
b_r = [10 if i == 0 else i for i in b]
d = min(b_r)
c = sum(a) - sum(b_r) + 40 + d
print(c)

Verdicts: Wrong Answer

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

Submission attempts (in order):
arr = []
for _ in range(5):
  x = int(input())
  if 0 < x <= 10:arr.append(10)
  else:
    x//=10
    arr.append(x*10)
    
print(sum(arr))

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

for x in parr:    
    if x%10 == 0:
        arr.append([0,x,x])
    else:
        arr.append([x%10, (x//10 + 1)*10,x])

arr.sort()

found = False
ans = 0
for cur in arr:
    r,v,o = cur
    if r == 0:
        ans += v
    else:
        if found:
            ans += v
        else:
            ans+= o
            found = True

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):
# -*- coding: utf-8 -*-
dct = {}
d = {}
d2 = {}
ll = [0,1,2,3,4]

for i in range(5):
    inp = int(input())
    dct[i] = int(inp/10)*10+10
    d[i] = inp % 10
    d2[i] = inp

last = sorted(d.items(), key=lambda x: x[1])[0][0]

ll.remove(last)

ans = d2[last]

for i in ll:
    ans += dct[i]

print(ans)


# -*- coding: utf-8 -*-
dct = {}
d = {}
d2 = {}
ll = [0,1,2,3,4]

for i in range(5):
    inp = int(input())
    dct[i] = int(inp/10)*10+10
    d[i] = inp % 10
    d2[i] = inp

last = sorted(d.items(), key=lambda x: x[1])[0][0]

ll.remove(last)

ans = d2[last]

for i in ll:
    print(dct[i])
    ans += dct[i]

print(ans)


# -*- coding: utf-8 -*-
dct = {}
d = {}
d2 = {}
ll = [0,1,2,3,4]

for i in range(5):
    inp = int(input())
    if inp % 10 != 0:
        d[i] = inp % 10
        d2[i] = inp
        dct[i] = int(inp/10)*10+10
    else:
        dct[i] = inp

if len(d) == 0:
    ans = 0
else:
    last = sorted(d.items(), key=lambda x: x[1])[0][0]
    ll.remove(last)
    ans = d2[last]

for i in ll:
    ans += dct[i]

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):
def comTime(x):
  return (x//10)*10 + 10

def solve(_l):
  s = 0
  l =sorted(_l, key=lambda x: x % 10 if x % 10 != 0 else 10)
  s += sum(map(comTime,l[1:])) + l[0]
  return s
  
_l = [int(input()) for _ in range(5)]
print(solve(_l))

def comTime(x):
  return (x//10)*10 + 10

def solve(_l):
  s = 0
  l =sorted(_l, key=lambda x: x % 10)
  s += sum(map(comTime,l[1:])) + l[0]
  return s
  
_l = [int(input()) for _ in range(5)]
print(solve(_l))

from math import *

def comTime(x):
  return ceil(x/10) * 10

def solve(_l):
  s = 0
  l =sorted(_l, key=lambda x: x % 10)
  s += sum(map(comTime,l[1:])) + l[0]
  return s
  
_l = [int(input()) for _ in range(5)]
print(solve(_l))

from math import *

def comTime(x):
  return ceil(x/10) * 10

def solve(_l):
  s = 0
  l =sorted(_l, key=lambda x: (10-x) % 10, reverse=True)
  s += sum(map(comTime,l[1:])) + l[0]
  return s
  
_l = [int(input()) for _ in range(5)]
print(solve(_l))


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

num = [] 
total = 0
mini = 10
for i in range(5): 
    a = input()
    a = int(a)
    b = a % 10 
    total += a - b + 10
    if b == 0:
        total -=10
    else:
        if b < mini:
            mini=b

total -=10
if mini= 10:
    print(total)
else:
    print(total + mini)

import numpy as np

num = [] 
total = 0
mini = 10
b = 1
for i in range(5): 
    a = input()
    a = int(a)
    b = a % 10 
    total += a - b
    if b != 0:
        total+=10
        if b < mini:
            mini=b


if mini== 10:
    print(total)
else:
    print(total -(10-mini))

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):
x,y=[],[]
t=10
for i in range(5):
    x.append(int(input()))
    y.append(x[i]%10)
    if 0<y[i]<t:
        t=y[i]
    if x[i]%10!=0:
        x[i]=((x[i]//10)+1)*10
    y[i]=x[i]

print(x)
print(y)
print(t)
print(sum(y)+t-10)

x,y=[],[]
t=10
for i in range(5):
    x.append(int(input()))
    y.append(x[i]%10)
    if 0<y[i]<t:
        t=y[i]
    if x[i]%10!=0:
        x[i]=((x[i]//10)+1)*10
    y[i]=x[i]
print(sum(y)+t-10)

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):
# B - Five Dishes
import numpy as np
n=[]
for i in range(5):
    t = int(input())
    n.append(t)
n = np.array(n)

m = [e for e in n%10 if e not in dl]
s = np.ceil(n/10)*10
print(int(np.sum(s)-min(m)))

# B - Five Dishes
import numpy as np
n=[]
for i in range(5):
    t = int(input())
    n.append(t)
n = np.array(n)

m = [e for e in n%10 if e not in dl]
s = np.ceil(n/10)*10
print(int(np.sum(s)-min(m))

# B - Five Dishes
import numpy as np
n=[]
for i in range(5):
    t = int(input())
    n.append(t)
n = np.array(n)

m = [e for e in n%10 if e not in dl]
s = np.ceil(n/10)*10
print(np.sum(s)-min(m))

# B - Five Dishes
import numpy as np
n=[]
for i in range(5):
    t = int(input())
    n.append(t)
n = np.array(n)

m = [e for e in n%10 if e not in dl]
s = np.ceil(n/10)*10
print(int(np.sum(s)-min(m)))

# B - Five Dishes
import numpy as np
n=[]
for i in range(5):
    t = int(input())
    n.append(t)
n = np.array(n)
dl = [0]
s = np.ceil(n/10)*10

if max(n%10)==0:
    print(int(np.sum(s)))
    exit()
m = [e for e in n%10 if e not in dl]
print(int(np.sum(s)-(10-min(m))))

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

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

Submission attempts (in order):
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
if A%10 == 0:
	aw = A
else:
	aw = int(A/10)*10 + 10
if B%10 == 0:
	bw = B
else:
	bw = int(B/10)*10 + 10
if C%10 == 0:
	cw = C
else:
	cw = int(C/10)*10 + 10
if D % 10 == 0:
	dw = D
else:
	dw = int(D/10)*10 + 10
if E % 10 == 0:
	ew = E
else:
	ew = int(E/10)*10 + 10
V1 = [A,B,C,D,E]
V2 = [aw,bw,cw,bw,ew]
V3 = [V2[j] - V1[j] for j in range(0,5)]
mx = V3.index(max(V3))
print(aw + bw + cw + dw + ew - V2[mx] + V1[mx])


A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
aw = int(A/10)*10 + 10
bw = int(B/10)*10 + 10
cw = int(C/10)*10 + 10
dw = int(D/10)*10 + 10
ew = int(E/10)*10 + 10
V1 = [A,B,C,D,E]
V2 = [aw,bw,cw,bw,ew]
V3 = [V2[j] - V1[j] for j in range(0,5)]
mx = V3.index(max(V3))
print(aw + bw + cw + dw + ew - V2[mx] + V1[mx])

A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
if A % 10 == 0:
	aw = A
else:
	aw = int(A/10)*10 + 10
if B % 10 == 0:
	bw = B
else:
	bw = int(B/10)*10 + 10
if C % 10 == 0:
	cw = C
else:
	cw = int(C/10)*10 + 10
if D % 10 == 0:
	dw = D
else:
	dw = int(D/10)*10 + 10
if E % 10 == 0:
	ew = E
else:
	ew = int(E/10)*10 + 10
V1 = [A,B,C,D,E]
V2 = [aw,bw,cw,dw,ew]
V3 = [V2[j] - V1[j] for j in range(0,5)]
mx = V3.index(max(V3))
print(aw + bw + cw + dw + ew - V2[mx] + V1[mx])



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 = A % 10
b = B % 10
c = C % 10
d = D % 10
e = E % 10

if a == 0:
  a = 10
elif b == 0:
  b = 10
elif c == 0:
  c = 10
elif d == 0:
  d = 10
elif e = 10:
  e = 10
  
list1 = [a,b,c,d,e]
list1.sort(reverse = True)
key = {a:A,b:B,c:C,d:D,e:E}
i = 0
sum = 0
while i < 4:
  sum += key[list1[i]]
  while not sum % 10 == 0:
    sum += 1
  i += 1
  
sum += list1[4]
print(sum)
  

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

if a == 0:
    a = 10
elif b == 0:
    b = 10
elif c == 0:
    c = 10
elif d == 0:
    d = 10
elif e == 0:
    e = 10


key = {a:A,b:B,c:C,d:D,e:E}
list_ = [a,b,c,d,e]
list_.sort(reverse = True)


i = 0
sum = 0
while i < 4:
    sum += key[list_[i]]
    while not sum % 10 == 0:
        sum += 1
    i += 1

sum += key[list_[4]]
print(sum)

B = [int(input()) for _ in range(5)]
A = [10-int(str(B[i])[-1]) for i in range(5) if str(B[i])[-1] != "0"]
if len(A) != 0:
	A.remove(max(A))
print(sum(B)+sum(A))


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

hasuu = [item % 10 if item % 10 != 0 
         for item in [A, B, C, D, E]]

for item in [A, B, C, D, E]:
  if item % 10 == 0:
    result += item 
  else:
    result += (item // 10 + 1) * 10
    
result = int(result - 10 + min(hasuu))
print(result)
    

    

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

result = 0

hasuu = [item % 10 for item in [A, B, C, D, E] if item % 10 != 0]

for item in [A, B, C, D, E]:
  if item % 10 == 0:
    result += item 
  else:
    result += (item // 10 + 1) * 10
    
if hasuu != []:
  result = int(result - 10 + min(hasuu))

print(result)

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

ans = a//10*10 + b//10*10 + c//10*10 + d//10*10 + e//10*10 + 50

for i in range(1, 10):
    for j in [a, b, c, d, e]:
        if str(j)[-1] == str(i):
            ans += i - 10
            print(ans)
            exit()
print(ans)

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

ans = 0
for i in [a, b, c, d, e]:
    ans += i//10*10 + (i%10>0)*10

for i in range(1, 10):
    for j in [a, b, c, d, e]:        
        if str(j)[-1] == str(i):
            ans += i - 10
            print(ans)
            exit()
print(ans)

Verdicts: Wrong Answer

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

Submission attempts (in order):
import math


def main():
    items = []

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

    maxi = 0
    for i in range(5):
        if items[i] % 10 < items[maxi] % 10 and items[i] % 10 != 0:
            maxi = i

    ret = 0
    for i in range(5):
        if i != maxi:
            if items[i] % 10 != 0:
                ret += int(math.floor(items[i] / 10) + 1) * 10
            else:
                ret += int(math.floor(items[i] / 10)) * 10
            print(items[i], int(math.floor(items[i] / 10) + 1) * 10)
            continue
        ret += items[i]

    print(ret)


main()


import math


def main():
    items = []

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

    maxi = 0
    for i in range(5):
        if items[i] % 10 < items[maxi] % 10 and items[i] % 10 != 0:
            maxi = i

    ret = 0
    for i in range(5):
        if i != maxi:
            if items[i] % 10 != 0:
                ret += int(math.floor(items[i] / 10) + 1) * 10
            else:
                ret += int(math.floor(items[i] / 10)) * 10
            continue
        ret += items[i]

    print(ret)


main()


Verdicts: Wrong Answer

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

Submission attempts (in order):
A=[int(input()) for _ in range(5)]
ans=0
for i in range(4):
  if A[i]%10==0:
    ans+=A[i]
  else:
    ans+=((A[i]//10)+1)*10
print(ans+A[-1])

A=[int(input()) for _ in range(5)]
ans=0
B=[a%10 for a in A]
m=1001001001
s=0
for i in range(5):
  if B[i]!=0 and m>B[i]:
    s=i
    m=B[i]
U=A[s]
del A[s]
for i in range(4):
  if A[i]%10==0:
    ans+=A[i]
  else:
    ans+=((A[i]//10)+1)*10
print(ans+U)

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
dishes = [int(input()) for _ in range(5)]
lead_times = [int(math.ceil(t/10))*10 - t in dishes]
max_idx = lead_times.index(max(lead_times))
result = 0
for i in range(5):
  result += dishes[i]
  if i != max_idx:
    result += lead_times[i]
print(result)

import math
dishes = [int(input()) for _ in range(5)]
lead_times = [int(math.ceil(t/10))*10 - t for t in dishes]
max_idx = lead_times.index(max(lead_times))
result = 0
for i in range(5):
  result += dishes[i]
  if i != max_idx:
    result += lead_times[i]
print(result)

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=map(int,open(0))
while len(l)==0:
	ans=max(ans,max(l))
	l.remove(max(l))
	map(lambda x:x+10,l)
print(ans)

l=sorted(list(map(int,open(0))),key=lambda x:x%10)
print(sum([i+10-i%10 for i in l])-l[-1]%10)

l=sorted(list(map(int,open(0))),key=lambda x:x%10)
print(sum([i+10-i%10*(i%10!=0) for i in l])-l[-1]%10*(l[-1]%10!=0))

l=sorted(list(map(int,open(0))),key=lambda x:-x%10)
print(sum([i+(-i%10) for i in l[:4]])+l[4])

Verdicts: 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):
n=int(input())
ss=n
l=[]
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
t=0
bb,cc,dd,ee,ff=0,0,0,0,0
while ff==0:
    if ee>0:
        ff+=min(ee,e)
        ee-=min(ee,e)
    if dd>0:
        ee+=min(dd,d)
        dd-=min(dd,d)
    if cc>0:
        dd+=min(cc,c)
        cc-=min(cc,c)
    if bb>0:
        cc+=min(bb,b)
        bb-=min(bb,b)
    if n>0:
        bb+=min(n,a)
        n-=min(n,a)
    t+=1
if ss==ff:
    print(t)
else:
    print(ss//ff+t)


l=[]
l.append(int(input()))
l.append(int(input()))
l.append(int(input()))
l.append(int(input()))
l.append(int(input()))
t=[]
for e in l:
    t.append(e%10)
s=0
i=0
while 0 in t:
    j=t.index(0)
    t[j]=-1
    s+=l[j]
    i+=1
while i<4:
    j=t.index(max(t))
    t[j]=-1
    s+=l[j]-l[j]%10+10
    i+=1
if i==4:
    j=t.index(max(t))
    s+=l[j]
print(s)

    


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):
array=[int(input()) for i in range(5)]
n=10
sum=0

for i in range(5): 
    if array[i]%10<n and n!=0: n=array[i]
for i in range(5): sum += int(array[i]/10)+1
print(sum*10-(10-n%10))

array=[int(input()) for i in range(5)]
n=10
sum=0

for i in range(5): 
    if array[i]%10<n and n!=0: n=array[i]
for i in range(5): sum += int(array[i]/10)+1
if n!=10: print(sum*10-(10-n%10))
else: print(sum*10)

array=[int(input()) for i in range(5)]
array2=[array[i]%10 for i in range(5)]
n=10
sum=0
for i in range(5): 
    if array2[i]<n and array2[i]!=0: n=array2[i]
    if array2[i]!=0: sum += int(array[i]/10)+1
    else: sum += int(array[i]/10)
if n!=10: print(sum*10-(10-n))
else: print(sum*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):

import numpy as np
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
ls=[a,b,c,d,e]
ls_1=[]
for i in range(len(ls)):
    ls_1.append(int(str(ls[i])[-1]))
ls_1=np.array(ls_1)
ls_1_10=10-ls_1
ls_1_10[ls_1==10]=0

a=np.argmax(ls_1_10)
ls_non=np.delete(ls_1_10, a, 0)

ls=np.array(ls)
ans=np.sum(ls) + np.sum(ls_non)
print(ans)


import numpy as np
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
ls=[a,b,c,d,e]
ls_1=[]
for i in range(len(ls)):
    ls_1.append(int(str(ls[i])[-1]))
ls_1=np.array(ls_1)
ls_1_10=10-ls_1
ls_1_10[ls_1_10==10]=0

a=np.argmax(ls_1_10)
ls_non=np.delete(ls_1_10, a, 0)

ls=np.array(ls)
ans=np.sum(ls) + np.sum(ls_non)
print(ans)

Verdicts: Wrong Answer

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

Submission attempts (in order):
import math
cooks = [int(input()) for _ in range(5)]
sorted_cooks = sorted(cooks, key=lambda x: -int(str(x)[-1]))
ans = 0
for i in range(len(sorted_cooks)):
  if(i < len(sorted_cooks) - 1):
    ans += math.ceil(sorted_cooks[i] / 10) * 10
  else:
    ans += sorted_cooks[i]
print(ans)

import math
cooks = [int(input()) for _ in range(5)]
sorted_cooks = sorted(cooks, key=lambda x: int(str(x)[-1]))
ans = 0
last_order = False
for i in range(len(sorted_cooks)):
  if(last_order == False and int(str(sorted_cooks[i])[-1]) != 0 ):
    ans += sorted_cooks[i]
    last_order = True
  else:
    ans += math.ceil(sorted_cooks[i] / 10) * 10

print(ans)

Verdicts: Wrong Answer

Accepted