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

Submission attempts (in order):
a = []
b = []
for i in range(5):
    n = int(input())
    b.append(n % 10)
    while n % 10 != 0:
        n = n + 1
    a.append(n)

if min(b) == 0:
    print(a[0] + a[1] + a[2] + a[3] + a[4])
else:
    print(a[0] + a[1] + a[2] + a[3] + a[4] - 10 + min(b))

a = []
b = []
for i in range(5):
    n = int(input())
    b.append(n % 10)
    while n % 10 != 0:
        n = n + 1
    a.append(n)

if max(b) == 0:
    print(a[0] + a[1] + a[2] + a[3] + a[4])
else:
    print(a[0] + a[1] + a[2] + a[3] + a[4] - 10 + min(b))

a = []
b = []
for i in range(5):
    n = int(input())
    if n % 10 == 0:
        b.append(10)
    else:
        b.append(n % 10)
    while n % 10 != 0:
        n = n + 1
    a.append(n)

print(a[0] + a[1] + a[2] + a[3] + a[4] - 10 + min(b))

Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
import math

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

A=B=C=D=E=11

if a%10!=0:
  A=a%10
if b%10!=0:
  B=b%10
if c%10!=0:
  C=c%10
if d%10!=0:
  D=d%10
if e%10!=0:
  E=e%10

k=min(A,B,C,D,E)
if A=B=C=D=E=0:
  k=10
sum=(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)

print(sum-10+k)

import math

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

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

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

print(sum-10+k)

Verdicts: Runtime Error

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

Submission attempts (in order):
import math
ans=0
A=[int(input()) for i in range(5)]
a=10
for i in range(5):
  if a>A[i]:
    p=i
    a=A[i]
for i in range(5):
  if i==p:
    ans+=A[i]
  else:
    ans+=10*(math.ceil(A[i]/10))
print(ans)

import math
ans=0
A=[int(input()) for i in range(5)]
a=0
for i in range(5):
  if (A[i]%10)>a:
    p=i
    a=A[i]
for i in range(5):
  if i==p:
    ans+=A[i]
  else:
    ans+=10*(math.ceil(A[i]/10))
print(ans)

import math
ans=0
A=[int(input()) for i in range(5)]
a=10
for i in range(5):
  if a>(A[i]%10):
    p=i
    a=A[i]
for i in range(5):
  if i==p:
    ans+=A[i]
  else:
    ans+=10*(math.ceil(A[i]/10))
print(ans)

import math
ans=0
A=[int(input()) for i in range(5)]
a=0
p=0
for i in range(5):
  if (A[i]%10)>a:
    p=i
    a=A[i]
for i in range(5):
  if i==p:
    ans+=A[i]
  else:
    ans+=10*(math.ceil(A[i]/10))
print(ans)

import math
ans=0
A=[int(input()) for i in range(5)]
a=10
p=0
for i in range(5):
  if a>(A[i]%10) and A[i]%10!=0:
    p=i
    a=A[i]%10
for i in range(5):
  if i==p:
    ans+=A[i]
  else:
    ans+=10*(math.ceil(A[i]/10))
print(ans)

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

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

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

mm = ae[0]%10
for i in range(5):
    mm = min(mm, ae[i]%10)
    ae[i] = ((ae[i]//10)+1)*10

print(sum(ae)-(10-mm))

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

nxt_time = [0]*n
for i in range(n):
    if ae[i] % 10 == 0:
        nxt_time[i] = ae[i]
    else:
        nxt_time[i] = ae[i] - ae[i] % 10 + 10
    # nxt_time[i] = (ae[i]+9) // 10 * 10
best_time = 99999999
for i in range(n):
    sumtime = 0
    for j in range(n):
        if i == j:
            sumtime += ae[i]
        else:
            sumtime += nxt_time[i]
    
    best_time = min(best_time, sumtime)

print(best_time)

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

mm = ae[0]%10
for i in range(5):
    mm = min(mm, ae[i]%10)
    if ae[i]%10 != 0:
        ae[i] = ((ae[i]//10)+1)*10
if mm != 0:
    print(sum(ae)-(10-mm))
else:
    print(sum(ae))

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

mm = ae[0]%10
for i in range(5):
    mm = min(mm, ae[i]%10)
    ae[i] = ((ae[i]//10)+1)*10
if mm != 0:
    print(sum(ae)-(10-mm))
else:
    print(sum(ae))

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

# sum_ae = 0
# g = 9
# cnt = 0  



#         sum_ae += (i//10 + 1) * 10
#         cnt += 1
#     else:
#         sum_ae += i
# if cnt != 0:
#     print(sum_ae - (10-g))
# else:
#     print(sum_ae)

nxt_time = [0]*5
for i in range(5):
    if ae[i] % 10 == 0:
        nxt_time[i] = ae[i]
    else:
        nxt_time[i] = ae[i] - ae[i] % 10 + 10
    # nxt_time[i] = (ae[i]+9) // 10 * 10
best_time = 99999999
for i in range(5):
    sumtime = 0
    for j in range(5):
        if i == j:
            sumtime += ae[i]
        else:
            sumtime += nxt_time[i]
    
    best_time = min(best_time, sumtime)

print(best_time)

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

sum_ae = 0
g = 9
cnt = 0  
for i in ae:
    if i % 10 != 0:
        g = min(g, i % 10)
        sum_ae += (i//10 + 1) * 10
        cnt += 1
    else:
        sum_ae += i
if cnt != 0:
    print(sum_ae - (10-g))
else:
    print(sum_ae)

Verdicts: Wrong Answer

Runtime Error

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())
a1 = 10 - a%10
b1 = 10 - b%10
c1 = 10 - c%10
d1 = 10 - d%10
e1 = 10 - e%10
l = [a1,b1,c1,d1,e1]

for i in range(5):
  if l[i] == 10:
    l[i] = 0
  
def max(x,y):
  if x <= y:
    return y
  else:
    return x
f = max(max(max(max(l[0],l[1]),l[2]),l[3]),l[4])

ans = (a+b+c+d+e) + (a1+b1+c1+d1+e1) - f
print(ans)


a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
a1 = 10 - a%10
b1 = 10 - b%10
c1 = 10 - c%10
d1 = 10 - d%10
e1 = 10 - e%10
def max(x,y):
  if x <= y:
    return y
  else:
    return x
f = max(max(max(max(a1,b1),c1),d1),e1)

ans = (a+b+c+d+e) + (a1+b1+c1+d1+e1) - f
print(ans)

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
a1 = 10 - a%10
b1 = 10 - b%10
c1 = 10 - c%10
d1 = 10 - d%10
e1 = 10 - e%10
l = [a1,b1,c1,d1,e1]

for i in range(5):
  if l[i] == 10:
    l[i] = 0
  
def max(x,y):
  if x <= y:
    return y
  else:
    return x
f = max(max(max(max(a1,b1),c1),d1),e1)

ans = (a+b+c+d+e) + (a1+b1+c1+d1+e1) - f
print(ans)


a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
a1 = 10 - a%10
b1 = 10 - b%10
c1 = 10 - c%10
d1 = 10 - d%10
e1 = 10 - e%10
l = [a1,b1,c1,d1,e1]

for i in range(5):
  if l[i] == 10:
    l[i] = 0
  
def max(x,y):
  if x <= y:
    return y
  else:
    return x
f = max(max(max(max(l[0],l[1]),l[2]),l[3]),l[4])

ans = (a+b+c+d+e) + (l[0]+l[1]+l[2]+l[3]+l[4]) - f
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):

import numpy as np
A = np.zeros(5)
B = np.zeros(5)
time = 0
for i in range(5):
    A[i] = int(input())
    if A[i] % 10 == 0:
        B[i] = 10
    else:
        B[i] = A[i] % 10

for j in range(5):
    for k in range(j, 4):
        if B[k] > B[k + 1]:
            B[k], B[k + 1] = B[k + 1], B[k]
            A[k], A[k + 1] = A[k + 1], A[k]
time += A[0]
for h in range(1, 5):
    time += A[h]+10-B[h]
print("{}".format(int(time)))



import numpy as np
A = np.zeros(5)
B = np.zeros(5)
time = 0
for i in range(5):
    A[i] = int(input())
    if A[i] % 10 == 0:
        B[i] = 10
    else:
        B[i] = A[i] % 10
B = np.sort(B)
for h in range(5):
    time += A[h] + 10 - B[h]
time = time-10+B[0]
print("{}".format(int(time)))


Verdicts: Wrong Answer

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

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

total = a+b+c+d+e
print(total)

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


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

def nokori(az, sitei):
	tmp = []
	flag = 0
	for a in az:
		if a == sitei and flag == 0 :
			flag = 1
		else:
			tmp.append(a)
	return tmp

def calcOrder(order):
	time = 0
	for o in order:
		if time % 10 != 0:
			time += 10 - time % 10
		time += o
	return time

time = 0
mintime = 1000
res = ''

for fst in orders:
	
	az = nokori(orders, fst)
	for sec in az:
		ax = nokori(az, sec)
		for thd in ax:
			aw = nokori(ax, thd)
			for fth in aw:
				af = nokori(aw, fth)
				for fif in af:
					time = calcOrder([fst,sec,thd,fth,fif])
					if time < mintime:
						mintime = time
						res = str([fst,sec,thd,fth,fif])

print(mintime)


Verdicts: Wrong Answer

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

Submission attempts (in order):
a=[]
for i in range(0,5):
  a.append(int(input()))
s=0
import math
for i in a:
  s=s+(math.ceil(i/10))*10
x=10
for i in a:
  if i%10==0:
    pass
  elif i%10<x:
    x=i%10
print(x)
print(s-10+x)

a=[]
for i in range(0,5):
  a.append(int(input()))
s=0
import math
for i in a:
  s=s+(math.ceil(i/10))*10
x=10
for i in a:
  if i%10==0:
    pass
  elif i%10<x:
    x=i%10
print(s-10+x)

Verdicts: Wrong Answer

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

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

dish = [a,b,c,d,e]
time = [0,0,0,0,0]
reg = 0
mini = 10

for l in range(5):
  num = dish[l]%10
  print(num)
  if num == 0:
    time[l] = dish[l]
  else:
    time[l] = (dish[l]//10+1)*10
    
  if num != 0 and num < mini:
    mini = num
    reg = l
        
if reg ==0:
  print(a+time[1]+time[2]+time[3]+time[4])
elif reg == 1:
  print(time[0]+b+time[2]+time[3]+time[4])
elif reg == 2:
  print(time[0]+time[1]+c+time[3]+time[4])
elif reg == 3:
  print(time[0]+time[1]+time[2]+d+time[4])
elif reg == 4:
  print(time[0]+time[1]+time[2]+time[3]+e)

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

dish = [a,b,c,d,e]
time = [0,0,0,0,0]
reg = 0
mini = 10

for l in range(5):
  num = dish[l]%10
  if num == 0:
    time[l] = dish[l]
  else:
    time[l] = int(((dish[l]-dish[l]%10)/10+1)*10)
    
  if num != 0 and num < mini:
    mini = num
    reg = l
        
if reg ==0:
  print(a+time[1]+time[2]+time[3]+time[4])
elif reg == 1:
  print(time[0]+b+time[2]+time[3]+time[4])
elif reg == 2:
  print(time[0]+time[1]+c+time[3]+time[4])
elif reg == 3:
  print(time[0]+time[1]+time[2]+d+time[4])
elif reg == 4:
  print(time[0]+time[1]+time[2]+time[3]+e)

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

input_mins = []
input_nums = 5
total_mins = 0

for i in range(input_nums):
  input_min = input()
  input_mins.append(input_min[::-1])
  input_mins.sort(reverse=True)

for i in range(input_nums):
  input_mins[i] = int(input_mins[i][::-1])

for i in range(input_nums-1):
  amari = input_mins[i] % 10
  if amari == 0:
    total_mins += input_mins[i]
  else:
    total_mins += input_mins[i]+(10-amari)

total_mins += input_mins[-1]
print(total_mins)


import math

input_mins = []
input_nums = 5
total_mins = 0

for i in range(input_nums):
  input_min = input()
  input_mins.append(input_min[::-1])
  input_mins.sort(reverse=True)

for i in range(input_nums):
  input_mins[i] = int(input_mins[i][::-1])

for i in range(input_nums-1):
  amari = input_mins[i] % 10
  total_mins += input_mins[i]+(10-amari)

total_mins += input_mins[-1]
print(total_mins)

input_mins = []
input_nums = 5
total_mins = []
total_min = 0

for i in range(input_nums):
  input_mins.append(input()[::-1])

input_mins.sort(reverse=True)

for i in range(input_nums):
  input_mins[i] = int(input_mins[i][::-1])

for i in range(input_nums-1):
    amari = input_mins[i] % 10
    if amari == 0:
      total_min += input_mins[i]
    else:
      total_min += input_mins[i]+(10-amari)

total_min += input_mins[-1]

print(total_min)

input_mins = []
input_nums = 5
total_mins = []
total_min = 0

for i in range(input_nums):
  input_mins.append(int(input()))


for i in range(input_nums):
  total_min = 0
  for j in range(input_nums-1):
    position = (i+j) % 5
    amari = input_mins[position] % 10
    if amari == 0:
      total_min += input_mins[position]
    else:
      total_min += input_mins[position]+(10-amari)
  total_min += input_mins[(i+4)%5]
  total_mins.append(total_min)

print(min(total_mins))

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())
cook_time = [A,B,C,D,E]
muda = [10-i%10 for i in cook_time]
cook_time_muda = list(zip(cook_time,muda))
cook_time_muda.sort(key=lambda x:x[1])
time = 0
for i in cook_time_muda:
    time = time + i[0]+i[1]
time = time - i[1]
print(time)

A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
cook_time = [A,B,C,D,E]
muda = [10-i%10 if i%10!=0 else 0 for i in cook_time]
cook_time_muda = list(zip(cook_time,muda))
cook_time_muda.sort(key=lambda x:x[1])
time = 0
for i in cook_time_muda:
    time = time + i[0]+i[1]
time = time - i[1]
print(time)

Verdicts: Wrong Answer

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

Submission attempts (in order):
ans = 0
for _ in range(4):
    _num = int(input())
    ans += _num // 10 * 10
    if _num % 10 > 0:
        ans += 10
ans += int(input())

print(ans)



ans = 0
ans2 = 0
min3 = 10
for _ in range(5):
    _num = int(input())
    ans += _num // 10 * 10
    if _num % 10 > 0:
        ans2 += 1
        if min3 > _num % 10:
            min3 = _num % 10
if ans2 > 0:
    ans += (ans2 - 1) * 10 + min3 
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
l = [int(input()) for _ in range(5)]

sorted(l, key= lambda x: (x-1)%10, reverse = True)
ans = 0

for i in range(4):
  ans += math.ceil(l[i] / 10) * 10
ans += l[-1]

print(ans)
  

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

l = sorted(l, key= lambda x: (x-1)%10, reverse = True)
ans = 0

for i in range(4):
  ans += math.ceil(l[i] / 10) * 10
ans += l[-1]

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):
x = [int(input()) for _ in range(5)]
t = 0
for i in range(x):
  t = ((t + 9) // 10) * 10
  t += x[i]
print(t)

from itertools import permutations
def solve(perm):
  t = 0
  for i in perm:
    t = ((t + 9) // 10) * 10
    t += x[i]
  return t

x = [int(input()) for _ in range(5)]
ans = min([solve(perm) for perm in permutations([i for i in range(len(x))])])
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):
k=[]

k.append(input())
k.append(input())
k.append(input())
k.append(input())
k.append(input())

m_num=9
m_index=0
for i in range(len(k)):
    if int(k[i][-1]) != 0:
        if int(k[i][-1]) < m_num:
            m_num = int(k[i][-1])
            m_index = i
            
print(m_num,m_index)
sum=0
for i in range(len(k)):
    if i==m_index:
        sum+=int(k[i])
    else:
        sum+=((int(k[i])-1)//10 + 1) * 10
    print(sum)

k=[]

k.append(input())
k.append(input())
k.append(input())
k.append(input())
k.append(input())

m_num=9
m_index=0
for i in range(len(k)):
    if int(k[i][-1]) != 0:
        if int(k[i][-1]) < m_num:
            m_num = int(k[i][-1])
            m_index = i
            
#print(m_num,m_index)
sum=0
for i in range(len(k)):
    if i==m_index:
        sum+=int(k[i])
    else:
        sum+=((int(k[i])-1)//10 + 1) * 10
    
print(sum)

Verdicts: Wrong Answer

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

Submission attempts (in order):
import math

num = list()
for ii in range(5):
    num.append(int(input()))
    
for ii in range(5):
    num[ii] = 10 * math.ceil(num[ii]/10)
    
print(sum(num))

import math

num_0 = list()
for ii in range(5):
    num_0.append(int(input()))

num_1 = list(range(5))
for ii in range(5):
    num_1[ii] = 10 * math.ceil(num_0[ii]/10)
   
num_2 = list(range(5))
for ii in range(5):
    num_2[ii] = num_1[ii] - num_0[ii]
    
num = max(num_2)
    
print(sum(num_1) - num)

Verdicts: Wrong Answer

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

Submission attempts (in order):
l = [int(input())for i in range(5)]
num = l.index(min(l))
sum = 0
for i in range(5):
    if i != num:
        ans += -(-l[i] // 10)
print(ans*10)

l = [int(input())for i in range(5)]
l1 = ['']*5
ans = 0
for i in range(5):
    l1[i] = l[i]%10
for i in range(5):
    ans += -(-l[i]//10)
print(ans*10 - 10 + min(l1))

l = [int(input())for i in range(5)]
num = l.index(min(l))
sum = 0
for i in range(5):
    if i != num:
        ans += -(-l[i] // 10)
print(ans*10 + l[num])

l = [int(input())for i in range(5)]
l1 = []*5
ans = 0
for i in range(5):
    l1[i] = l[i]%10
for i in range(5):
    ans += -(-l[i]//10)
print(ans*10 + min(l1))

l = [int(input())for i in range(5)]
num = l.index(min(l))
ans = 0
for i in range(5):
    if i != num:
        ans += -(-l[i] // 10)
print(ans*10 + l[num])

l = [int(input())for i in range(5)]
l1 = ['']*5
ans = 0
for i in range(5):
    l1[i] = l[i]%10
for i in range(5):
    ans += -(-l[i]//10)
print(ans*10 + min(l1))

l = [int(input())for i in range(5)]
num = l.index(min(l))
ans = 0
for i in range(5):
    if i != num:
        ans += -(-l[i] // 10)
print(ans*10 + l[num])

l = [int(input())for i in range(5)]
l1 = ['']*5
ans = 0
for i in range(5):
    l1[i] = l[i]%10
for i in range(5):
    ans += -(-l[i]//10)
print(ans*10 - 10 + min(l1))

l = [int(input())for i in range(5)]
l1 = ['']*5
ans = 0
for i in range(5):
    l1[i] = l[i]%10
    if l1[i] == 0:
        l1[i] = 10
for i in range(5):
    ans += -(-l[i]//10)
print(ans*10 - 10 + min(l1))

Verdicts: Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

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

Submission attempts (in order):
import math
a = input()
b = input()
c = input()
d = input()
e = input()
min_l = min(l)
p = [ a,b,c,d,e ]
o = []
len_p = len(p)
tmp_p = ''
for i in range(0, len_p):
  if p[i][-1] == min_l:
    tmp_p = int(p.pop(i))
    print(i)
    break
new_p = 0
for i in p:
  new_p += math.ceil(int(i)/10)*10
print(new_p+tmp_p)

import math
a = input()
b = input()
c = input()
d = input()
e = input()
l = []
if a[-1] != '0': l.append(a[-1])
if b[-1] != '0': l.append(b[-1])
if c[-1] != '0': l.append(c[-1])
if d[-1] != '0': l.append(d[-1])
if e[-1] != '0': l.append(e[-1])
if l == []:
  print(int(a)+int(b)+int(c)+int(d)+int(e))
else:
  min_l = min(l)
  p = [ a,b,c,d,e ]
  o = []
  len_p = len(p)
  tmp_p = ''
  for i in range(0, len_p):
    if p[i][-1] == min_l:
      tmp_p = int(p.pop(i))
      break
  new_p = 0
  for i in p:
    new_p += math.ceil(int(i)/10)*10
  print(new_p+tmp_p)

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):
dish_list = [int(input()) for _ in range(5)]
last_num_list = [int(str(dish_i)[-1]) for dish_i in dish_list]
last_num_min_index = last_num_list.index(min(last_num_list))

ceiling_dish_list = [-10* (-i//10) for i in dish_list]

print(sum(ceiling_dish_list) - ceiling_dish_list[last_num_min_index] + dish_list[last_num_min_index])

import math 

dish_list = [int(input()) for _ in range(5)]
last_num_list = [int(str(dish_i)[-1]) for dish_i in dish_list]
last_num_min_index = last_num_list.index(min(last_num_list))

ceiling_dish_list = [10* math.ceil(i/10) for i in dish_list]

print(sum(ceiling_dish_list) - ceiling_dish_list[last_num_min_index] + dish_list[last_num_min_index])

dish_list = [int(input()) for _ in range(5)]
last_num_list = [int(str(dish_i)[-1]) for dish_i in dish_list]

if sum(last_num_list) % 10 == 0:
  print(sum(dish_list))
else:  
  target_index = min(list(filter(lambda x: x>0, last_num_list)))

  last_num_min_index = last_num_list.index(target_index)
  ceiling_dish_list = [-10* (-i//10) for i in dish_list]

  print(sum(ceiling_dish_list) - ceiling_dish_list[last_num_min_index] + dish_list[last_num_min_index])

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 = []
for _ in range(5):
    b = int(input())
    t = 10 if b%10 == 0 else b%10
    a.append((t, b))
a.sort()
a.reverse()
c = 0
for i in range(4):
    c += (a[i][1] + (10 - a[i][1] % 10))
c += a[-1][1]
print(c)

a = []
for _ in range(5):
    b = int(input())
    t = 10 if b%10 == 0 else b%10
    a.append((t, b))
a.sort()
a.reverse()
c = 0
for i in range(4):
    if a[i][0] == 10:
        c += (a[i][1]  - a[i][1] % 10)
    else:
        c += (a[i][1] + (10 - a[i][1] % 10))
c += a[-1][1]
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):
list = [int(input()) for i in range(5)]
t = 0
cnt_l = []
for i in range(5):
    cnt = 0
    while list[i] % 10 != 0:
        list[i] += 1
        cnt += 1
    t += list[i]
    if cnt != 0:
        cnt_l.append(cnt)
if not cnt:
    cnt.append(0)
print(t - max(cnt_l))

list = [int(input()) for i in range(5)]
t = 0
cnt_l = []
for i in range(5):
    cnt = 0
    while list[i] % 10 != 0:
        list[i] += 1
        cnt += 1
    t += list[i]
    if cnt != 0:
        cnt_l.append(cnt)
if not cnt_l:
    cnt_l.append(0)
print(t - max(cnt_l))

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 = []
x = 2147483647
for i in range(5):
   l.append( int(input()) )
   n = int(l[i]%10)
   if n>0 and n<x:
      x = i

ans = 0
for i in range(5):
    if i == x:
        ans += l[i]
    elif l[i]%10 != 0:
        ans += int(l[i]/10)*10 +10
    else:
        ans += l[i]

print(ans)




#--import&define---------------------
import math

def yes():
    print("Yes")
def no():
    print("No")
#--my_library--------------------------------

# x,y = map(int,input().split())


#l = []

#    l.append(int(input()))


#x = 2147483647

l = []
ansL = []
x = 2147483647
index = 0
for i in range(5):
   l.append( int(input()) )
   ansL.append( int(l[i]%10) )
   if ansL[i]>0 and ansL[i]<x:
      index = i

print(l)
ans = 0
for i in range(5):
    if i == dex:
        ans += l[i]
    elif l[i]%10 != 0:
        ans += int(l[i]/10)*10 +10
    else:
        ans += l[i]
    print(ans)

print(ans)




#--import&define---------------------
import math

def yes():
    print("Yes")
def no():
    print("No")
#--my_library--------------------------------

# x,y = map(int,input().split())


#l = []

#    l.append(int(input()))


#x = 2147483647

l = []
x = 2147483647
index = 0
for i in range(5):
   l.append( int(input()) )
   n = int(l[i]%10)
   if n>0 and n<x:
      x = n
      index = i

ans = 0
for i in range(5):
    if i == index:
        ans += l[i]
    elif l[i]%10 != 0:
        ans += int(l[i]/10)*10 +10
    else:
        ans += l[i]

print(ans)


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())
sub = miin(m % 10 for m in [a,b,c,d,e] if m % 10 != 0)
time = 10 * (ciel(a / 10) + ciel(b / 10)+ ciel(b / 10)+ ciel(b / 10)+ ciel(b / 10)) - (10 - sub)
print(time)



import math

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
sub = miin(m % 10 for m in [a,b,c,d,e] if m % 10 != 0)
time = 10 * (ceil(a / 10) + ceil(b / 10)+ ceil(c / 10)+ ceil(d / 10)+ ceil(e / 10)) - (10 - sub)
print(int(time))



import math

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
sub = miin(m % 10 for m in [a,b,c,d,e] if m % 10 != 0)
time = 10 * (ciel(a / 10) + ciel(b / 10)+ ciel(c / 10)+ ciel(d / 10)+ ciel(e / 10)) - (10 - sub)
print(time)



import math

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
sub = min([m % 10 for m in [a,b,c,d,e] if m % 10 != 0] + [10])
time = 10 * (math.ceil(a / 10) + math.ceil(b / 10)+ math.ceil(c / 10)+ math.ceil(d / 10)+ math.ceil(e / 10)) - (10 - sub)
print(int(time))



Verdicts: Runtime Error

Runtime Error

Runtime Error

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

Submission attempts (in order):
# coding: utf-8

import sys
input = sys.stdin.readline

times = []
for _ in range(5):
    x = int(input())
    times.append([x, ((x + 9) // 10 * 10) - x])

times.sort(key=lambda x : x[1])

ans = 0
for i in range(4):
    ans += times[i][0] + times[i][1]

ans += times[-1][0]

print(times)
print(ans)



# coding: utf-8

import sys
input = sys.stdin.readline

times = []
for _ in range(5):
    x = int(input())
    times.append([x, ((x + 9) // 10 * 10) - x])

times.sort(key=lambda x : x[1])

ans = 0
for i in range(4):
    ans += times[i][0] + times[i][1]

ans += times[-1][0]

print(ans)



Verdicts: Wrong Answer

Accepted