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

Submission attempts (in order):
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

m = 9
a = [A, B, C, D, E]

for i in range(len(a)):

 if a[i] % 10 <= m and a[i] % 10 != 0:
    m = a[i] % 10


for j in range(len(a)):
  if a[j] % 10 != 0:
     a[j] = a[j] + (10 - a[j] % 10)

print(m)

print(sum(a) - (10 - m))

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

m = 10
a = [A, B, C, D, E]

for i in range(len(a)):

 if a[i] % 10 <= m and a[i] % 10 != 0:
     m = a[i] % 10


for j in range(len(a)):
  if a[j] % 10 != 0:
     a[j] = a[j] + (10 - a[j] % 10)

print(sum(a) - (10 - m))

Verdicts: Wrong Answer

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

Submission attempts (in order):
l = [int(input()) for i in range(5)]
time = 0
for v in l:
  if v %10 == 0:
    time += v
    l.remove(v)
if l == []:
  print(time)
  return
m = min(list(map(lambda x:x%10,l)))
find_min = False
for v in l:
  if v %10 == m && not find_min:
    time += v
  else:
    time += calc_time(v)
print(time)

def calc_time(t):
  return (int(t/10)+1 )*10

l = [int(input()) for i in range(5)]
rest = []
time = 0
for v in l:
  if v %10 == 0:
    time += v
  else:
    time += int(v/10)*10
    rest.append(v%10)
if rest != []:
  time += (len(rest)-1)
  time += min(rest)
print(time)

l = [int(input()) for i in range(5)]
time = 0
for v in l:
  if v %10 == 0:
    time += v
    l.remove(v)
if l != []:
  m = min(list(map(lambda x:x%10,l)))
  find_min = False
  for v in l:
    if v %10 == m and not find_min:
      time += v
    else:
      time += calc_time(v)
print(time)

def calc_time(t):
  return (int(t/10)+1 )*10



l = [int(input()) for i in range(5)]
rest = []
time = 0
for v in l:
  if v %10 == 0:
    time += v
  else:
    time += int(v/10)*10
    rest.append(v%10)
#print(rest)
if rest != []:
  time += ((len(rest)-1)*10)
  time += min(rest)
print(time)

Verdicts: Runtime Error

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):
import math
src = [input() for _ in range(5)]
k_li = []
v_li = []
for s in src:
    k_li.append(int(s[-1]))
    v_li.append(int(s))
m = min(k_li)
flag = False
sum = 0
for k,v in zip(k_li,v_li):
    if k == m and flag == False:
        sum += v
        flag = True
    else:
        sum += math.ceil(v/10)*10
print(sum)

import math
src = [input() for _ in range(5)]
k_li = []
v_li = []
sum = 0
for s in src:
    if int(s[-1]) != 0:
        k_li.append(int(s[-1]))
        v_li.append(int(s))
    else:
        sum += int(s)
flag = False
if len(k_li)>0:
    m = min(k_li)
    for k,v in zip(k_li,v_li):
        if k == m and flag == False:
            sum += v
            flag = True
        else:
            sum += math.ceil(v/10)*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):
def resolve():
    a = list(int(input()) for _ in range(5))
    mint = 1000
    ans = 0
    for i in range(5):
        ans += math.ceil(a[i]/10)*10
        if a[i]%10 == 0: continue
        mint = min(mint,a[i]%10)
    print(ans+mint-10)

resolve()

import math
def resolve():
    a = list(int(input()) for _ in range(5))
    mint = 1000
    ans = 0
    for i in range(5):
        ans += math.ceil(a[i]/10)*10
        if a[i]%10 == 0: continue
        mint = min(mint,a[i]%10)
    if mint == 1000:
        print(ans)
    else:
        print(ans+mint-10)
resolve()

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 i in range(5)]
m = 9


for i in n:
  if int(str(i)[-1]) < m:
    m = int(str(i)[-1])
    x = i

n.remove(x)
    
for i in range(len(n)):
  if n[i]%10 != 0:
    n[i] = n[i] + 10 - int(str(n[i])[-1])

print(sum(n) + x)

n = [int(input()) for i in range(5)]
m = 10
x = n[0]


for i in n:
  if int(str(i)[-1]) < m and int(str(i)[-1]) > 0:
    m = int(str(i)[-1])
    x = i



n.remove(x)
    
for i in range(len(n)):
  if n[i]%10 != 0:
    n[i] = n[i] + 10 - int(str(n[i])[-1])

print(sum(n) + 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):
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
ansa=0
ansb=0
ansc=0
ansd=0
anse=0

if str(a)[-1]=="0":
  ansa=0
else:
  ansa=str(a)[-1]
  ansa=10-int(ansa)
  
if str(b)[-1]=="0":
  ansb=0
else:
  ansb=str(b)[-1]
  ansb=10-int(ansb)
  
if str(c)[-1]=="0":
  ansc=0
else:
  ansc=str(c)[-1]
  ansc=10-int(ansc)
  
if str(d)[-1]=="0":
  ansd=0
else:
  ansd=str(d)[-1]
  ansd=10-int(ansd)
  
if str(e)[-1]=="0":
  anse=0
else:
  anse=str(e)[-1]
  anse=10-int(anse)
  
sum1=ansa,ansb,ansc,ansd,anse
ans1=sum(sum1)-max(sum1)

ans2=a+b+c+d+e

a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
ansa=0
ansb=0
ansc=0
ansd=0
anse=0

if str(a)[-1]=="0":
  ansa=0
else:
  ansa=str(a)[-1]
  ansa=10-int(ansa)
  
if str(b)[-1]=="0":
  ansb=0
else:
  ansb=str(b)[-1]
  ansb=10-int(ansb)
  
if str(c)[-1]=="0":
  ansc=0
else:
  ansc=str(c)[-1]
  ansc=10-int(ansc)
  
if str(d)[-1]=="0":
  ansd=0
else:
  ansd=str(d)[-1]
  ansd=10-int(ansd)
  
if str(e)[-1]=="0":
  anse=0
else:
  anse=str(e)[-1]
  anse=10-int(anse)
  
sum1=ansa,ansb,ansc,ansd,anse
ans1=sum(sum1)-max(sum1)

ans2=a+b+c+d+e
print(int(ans1)+int(ans2))

Verdicts: Wrong Answer

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

Submission attempts (in order):
A,B,C,D,E = [int(input()) for _ in range(5)]
a = A % 10
b = B % 10
c = C % 10
d = D % 10
e = E % 10
if a == b == c == d == e == 0:
  print(A+B+C+D+E)
else:
  print(A-a+B-b+C-c+D-d+E-e-max(10-a,10-b,10-c,10-d,10-e))

A,B,C,D,E = [int(input()) for _ in range(5)]
a = A % 10
b = B % 10
c = C % 10
d = D % 10
e = E % 10
if a == b == c == d == e == 0:
  print(A+B+C+D+E)
else:
  print(A-a+B-b+C-c+D-d+E-e-max(10-a,10-b,10-c,10-d,10-e)

A,B,C,D,E = [int(input()) for _ in range(5)]
a = (A-10) % 10
b = (B-10) % 10
c = (C-10) % 10
d = (D-10) % 10
e = (E-10) % 10
if a == b == c == d == e == 0:
  print(A+B+C+D+E)
else:
  print(A+B+C+D+E+a+b+c+d+e-max(a,b,c,d,e))

l = []
for _ in range(5):
  l.append(int(input()))
can = []
for i in range(5):
  tmp = 0
  for j in range(5):
    if j == i:
      tmp += l[j]
    else:
      tmp += ((l[j]-1) // 10 + 1) * 10
  can.append(tmp)
print(min(can))

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

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

Submission attempts (in order):
data = [int(input()) for i in range(5)]
a = 9
ans = 0
for i in range(5):
	a = min(a,data[i]%10)
	ans = data[i]//10 +1
print((ans-1)*1+a)

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

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

data = [int(input()) for i in range(5)]
a = 10
ans = 0
for i in range(5):
	d = data[i]%10
	if d!=0 and a>d:
		a = d
	ans += (data[i]+9)//10

ans = (ans-1)*10
print(ans+a)

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())
if a%10==0:
  A=int(a//10)
else:
  A=int(a//10+1)
if b%10==0:
  B=b//10
else:
  B=b//10+1
if c%10==0:
  C=c//10
else:
  C=c//10+1
if d%10==0:
  D=d/10
else:
  D=d/10+1
if e%10==0:
  E=e//10
else:
  E=e//10+1
ans=int(A+B+C+D+E-1)*10+min(a%10,b%10,c%10,d%10,e%10)
print(int(ans))

a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
ans=(a/10+b/10+c/10+d/10+e/10+4)*10+min([a%10,b%10,c%10,d%10,e%10])
print(ans)

a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
if a%10==0:
  A=a//10
else:
  A=a//10+1
if b%10==0:
  B=b//10
else:
  B=b//10+1
if c%10==0:
  C=c//10
else:
  C=c//10+1
if d%10==0:
  D=d/10
else:
  D=d/10+1
if e%10==0:
  E=e//10
else:
  E=e//10+1
ans=int(A+B+C+D+E-1)*10+max(a%10,b%10,c%10,d%10,e%10)
print(int(ans))

a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
ans=(a/10+b/10+c/10+d/10+e/10+4)*10+min([a%10,b%10,c%10,d%10,e%10])
print(ans)


import numpy as np
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
A=(a+9)//10*10
B=(b+9)//10*10
C=(c+9)//10*10
D=(d+9)//10*10
E=(e+9)//10*10
F=max(A-a,B-b,C-c,D-d,E-e)
print(A+B+C+D+E-F)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

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

Submission attempts (in order):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
count = 10
num = 0
num1 = 0


def f(x):
    return x +10 - (x%10)


list1 = [a,b,c,d,e]
for i in range(5):
    if count > list1[i] % 10 and list1[i]%10!=0:
        count = list1[i]%10
        num = i

for j in range(5):
    if j ==num:
        num1 += list1[j]
    else:
        num1 += f(list1[j])
    
print(num1)
 
 



a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
count = 10
num = 0
num1 = 0


def f(x):
    return x + 10 - (x%10)


list1 = [a,b,c,d,e]
for i in range(len(list1)):
    if count > list1[i] % 10 and list1[i]%10 != 0:
        count = list1[i]%10
        num = i

for j in range(len(list1)):
    if j == num:
        num1 += list1[j]
    elif list1[j]%10==0:
        num1 += list1[j]        
    else:
        num1 += f(list1[j])
    
print(num1)

Verdicts: Wrong Answer

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

Submission attempts (in order):
l=[input() for _ in range(5)]
l_1=[]
for i in l:
  if i%10!=0:
    l_1.append(((i+9)//10)*10)
  else:l_1.append(i)
nnn=9999999    
for i in range(5):
  num_1=0
  for j in range(5):
    if i==j:
      num_1+=l[j]
    else:num_1+=l_1[j]
  nnn=min(nnn,num_1)
print(nnn)

l=[int(input()) for _ in range(5)]
l_1=[]
for i in l:
  if i%10!=0:
    l_1.append(((i+9)//10)*10)
  else:l_1.append(i)
nnn=9999999    
for i in range(5):
  num_1=0
  for j in range(5):
    if i==j:
      num_1+=l[j]
    else:num_1+=l_1[j]
  nnn=min(nnn,num_1)
print(nnn)

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_time = [int(input()) for i in range(5)]
A = dish_time
rest=[0,0,0,0,0]

for j in range(5):
    dish_time[j] = dish_time[j]//10*10
    rest[j]= A[j]-dish_time[j]

print(dish_time)

sum_time =  0
rest.sort()

for i in range(5):
    sum_time = sum_time + dish_time[i]

sum_time = sum_time + rest[0]

print(sum_time)

dish_time = [int(input()) for i in range(5)]
rest=[0,0,0,0,0]
last_min=[]

for j in range(5):
    rest[j] = dish_time[j] - (dish_time[j]//10*10)
    if rest[j] != 0:
        dish_time[j] = (dish_time[j]//10 + 1 ) *10   
        last_min.append(rest[j])

sum_time =  0

for i in range(5):
    sum_time = sum_time + dish_time[i]

if len(last_min) != 0:
    sum_time = sum_time + min(last_min) - 10
    print(sum_time)
else :
    sum_time = sum_time
    print(sum_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()) for i in range(5)]
n=0
ans=0

for x in a:
  if x % 10 != 0:
    t=x%10
  else:
    t=0
  ans += x+t
  n=max(n,t)
print(ans)

a = [int(input()) for i in range(5)]
n = 0
ans = 0
for x in a:
  if x % 10 != 0:
    t = 10 - x % 10
  else:
    t = 0
  ans += x + t
  n = max(n,t)
print(ans)

a = [int(input()) for i in range(5)]
n = 0
ans = 0
for x in a:
  if x % 10 != 0:
    t = 10 - x % 10
  else:
    t = 0
  ans += x + t
  n = max(n,t)
print(ans-n)

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

mi = min(t % 10 for t in [a, b, c, d, e])



# print(mi)

# print([wt + (10 - (wt % 10)) if wt % 10 != 0 else wt for wt in [a, b, c, d, e]])
w = sum([wt + (10 - (wt % 10)) if wt % 10 != 0 else wt for wt in [a, b, c, d, e]])

if mi > 0:
    w = w - 10 + mi
print(w)

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


ar = [t % 10 for t in [a, b, c, d, e] if t % 10 != 0]
if len(ar) == 0:
    ar.append(0)
mi = min(ar)


# print(mi)

# print([wt + (10 - (wt % 10)) if wt % 10 != 0 else wt for wt in [a, b, c, d, e]])
w = sum([wt + (10 - (wt % 10)) if wt % 10 != 0 else wt for wt in [a, b, c, d, e]])

if mi > 0:
    w = w - 10 + mi
print(w)

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):
s,i=0,0
for j in range(5):
  s=s+int(input())
  if j==4:
    print(s)
    exit()
  while(s>10*i):
    i+=1
  s=10*(i)
print(s)

i=0
s,t=0,10*i
for _ in range(5):
  s=s+int(input())
  while(s>t):
    i+=1
  s=t+10
print(s)

s,i=0,0
for i in range(5):
  s=s+int(input())
  if i==4:
    print(s)
    exit()
  while(s>10*i):
    i+=1
  s=10*(i)
print(s)

t=[int(input()) for _ in range(5)]
v=[10*(i//10) if i%10==0 else 10*(i//10+1) for i in t]
w=max(x-y for x,y in zip(v,t))
print(sum(v)-w)

Verdicts: Wrong Answer

Time Limit Exceeded

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)]
ans = 0
for j in range(5):
    if 0 < l[j] % 10 and min(l % 10) == l[j]:
        ans += l[j]
    elif 0 < l[j] % 10:
        ans += (l[j] // 10 + 1) * 10
    else:
        ans += l[j]
print(ans)

l = [int(input()) for _ in range(5)]
ans = 0
p = 0
for i in l:
    if i % 10 != 0:
        p = 10 - i % 10
    else:
        p = 0
    ans += i + p
    m = max(m, p)
print(ans - m)

l = [int(i) for i in input()]
ans = 0
for j in l:
    if 0 < l[j] % 10:
        ans += (l[j] % 10 + 1) * 10
    else:
        ans += l[j]
print(ans)

l = [int(input()) for _ in range(5)]
ans = 0
for j in range(5):
    if 0 < l[j] % 10:
        ans += (l[j] // 10 + 1) * 10
    else:
        ans += l[j]
print(ans)

l = [int(input()) for _ in range(5)]
ans = 0
for j in range(5):
    if 0 < l[j] % 10:
        ans += (l[j] // 10 + 1) * 10
    else:
        ans += l[j]
l %= 10
ans -= min(l)
ans += 10
print(ans)


l = [int(input()) for _ in range(5)]
ans = 0
m = 0
for i in l:
    if i % 10 != 0:
        p = 10 - i % 10
    else:
        p = 0
    ans += i + p
    m = max(m, p)
print(ans - m)


Verdicts: Runtime Error

Runtime Error

Runtime Error

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):
from math import ceil
t = 0
a = [int(input()) for _ in range(5)]
m = min(map(lambda x: (x - 1) % 10 + 1, a))
for c in a:
    print((c + 1) % 10 + 1)
    if (c - 1) % 10 + 1 == m:
        m = c
a.remove(m)
t += sum(map(lambda x: ceil(x / 10), a))
t *= 10
print(t + m)

from math import ceil
t = 0
a = [int(input()) for _ in range(5)]
m = min(map(lambda x: (x - 1) % 10 + 1, a))
for c in a:
    if (c - 1) % 10 + 1 == m:
        m = c
a.remove(m)
t += sum(map(lambda x: ceil(x / 10), a))
t *= 10
print(t + m)

Verdicts: Wrong Answer

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

Submission attempts (in order):
a=[0,0,0,0,0]
b=[0,0,0,0,0]
time=0
cnt=0
a[0]=int(input())
a[1]=int(input())
a[2]=int(input())
a[3]=int(input())
a[4]=int(input())
for i in range(5):
  b[i]=a[i]%10
for i in range(10):
  for j in range(5):
    if b[j]==0:
      time=time+a[j]
      a[j]=0
      cnt=cnt+1
    elif b[j]==(10-i):
      time=time+a[j]+i
      cnt=cnt+1
      a[j]=0
      if cnt==5:
        time=time-i
print(time)

a=[0,0,0,0,0]
b=[0,0,0,0,0]
time=0
cnt=0
a[0]=int(input())
a[1]=int(input())
a[2]=int(input())
a[3]=int(input())
a[4]=int(input())
for i in range(5):
  b[i]=a[i]%10
for i in range(10):
  for j in range(5):
    if a[j]==0:
      c=0
    else:
      if b[j]==0:
        time=time+a[j]
        a[j]=0
        cnt=cnt+1
      elif b[j]==(10-i):
        time=time+a[j]+i
        cnt=cnt+1
        a[j]=0
        if cnt==5:
          time=time-i
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):
short = 10
ans = 0
for i in range(5):
    n = int(input())
    if short > n%10 and n%10 > 0:
        short = n%10
    ans += (n//10)*10
    if n%10 > 0:
        ans += 10
print(short,ans)
ans -= 10 if short > 0 else 0
print(ans+short)


short = 10
ans = 0
for i in range(5):
    n = int(input())
    if short > n%10 and n%10 > 0:
        short = n%10
    ans += (n//10)*10
    if n%10 > 0:
        ans += 10
ans -= 10 if short > 0 else 0
print(ans+short)


Verdicts: Wrong Answer

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

Submission attempts (in order):
import numpy as np

dish_min = []
 
for i in range(5):
   dish_min.append(int(input()))
    
p = [i%10 for i in dish_min]
pp = [(i-1)%10 for i in dish_min]
x = np.argmin(pp)

for i in range(5):
  if i != x and p[i]:
  	dish_min[i] += (10 - p[i])
print(dish_min)
print(sum(dish_min))

import numpy as np

dish_min = []
 
for i in range(5):
   dish_min.append(int(input()))
    
p = [i%10 for i in dish_min]
pp = [(i-1)%10 for i in dish_min]
x = np.argmin(pp)

for i in range(5):
  if i != x and p[i]:
  	dish_min[i] += (10 - p[i])

print(sum(dish_min))

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

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

l = [a,b,c,d,e]
m = min([i for i in l if i != 0])
n = l.count(0)
ans = (A//10 + B//10 + C//10 + D//10 + E//10)*10 + m + (5-n)*10
print(ans)


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

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

l = [a,b,c,d,e]
if len([i for i in l if i != 0]) == 0:
    m = 10
    
else:
    m = min([i for i in l if i != 0])
n = l.count(0)
ans = (A//10 + B//10 + C//10 + D//10 + E//10)*10 + m + (5-n)*10 -10
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):
import copy
li=[int(input()) for i in range(5)]

ans=10**9
temp=0

for j in li:
    temp = j
    li2 = copy.copy(li)
    li2.remove(j)
    for k in li2:
        temp += k + (10 - (k % 10))
    ans = min(ans, temp)

print(ans)

import copy
li=[int(input()) for i in range(5)]

ans=10**9
temp=0

for j in li:
    temp = j
    li2 = copy.copy(li)
    li2.remove(j)
    for k in li2:
        if k % 10 != 0:
            temp += k + (10 - (k % 10))
        else:
            temp += k
    ans = min(ans, temp)

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
T = [int(input()) for i in range(5)]
print(T)
Rest=[0]*5
for i in range(5):
    if T[i]%10 == 0:
        Rest[i] = 10
    else: Rest[i] = T[i]%10
maxrest = 10-min(Rest)
ans = 0
for i in range(5):
    ans += 10*math.ceil(T[i]/10)
print(ans-maxrest)

import math
T = [int(input()) for i in range(5)]
Rest=[0]*5
for i in range(5):
    if T[i]%10 == 0:
        Rest[i] = 10
    else: Rest[i] = T[i]%10
maxrest = 10-min(Rest)
ans = 0
for i in range(5):
    ans += 10*math.ceil(T[i]/10)
print(ans-maxrest)

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())
mozi = [a, b, c, d, e]
rup = [round(mozi[i], -1) if mozi[i] % 10 == 0 else
       round(mozi[i] + 5, -1)
       for i in range(len(mozi))]

amari = [mozi[i] % 10 for i in range(len(mozi))]

m_r_a = list(zip(mozi, rup, amari))
sorta_m_r_a =(sorted(m_r_a, key=lambda x:x[2], reverse=True))
dishes_4sum = 0
for i in range(4):
    dishes_4sum += sorta_m_r_a[i][1]
dishes_5sum = dishes_4sum + sorta_m_r_a[4][0]

print(dishes_5sum)

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
mozi = [a, b, c, d, e]
rup = [round(mozi[i], -1) if mozi[i] % 10 == 0 else
       round(mozi[i] + 5, -1)
       for i in range(len(mozi))]

amari = [mozi[i] % 10 if mozi[i] % 10 != 0 else
         10 for i in range(len(mozi))]

m_r_a = list(zip(mozi, rup, amari))
sorta_m_r_a =(sorted(m_r_a, key=lambda x:x[2], reverse=True))
print(sorta_m_r_a)
dishes_4sum = 0
for i in range(4):
    dishes_4sum += sorta_m_r_a[i][1]
dishes_5sum = dishes_4sum + sorta_m_r_a[4][0]

print(dishes_5sum)

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
mozi = [a, b, c, d, e]
rup = [round(mozi[i], -1) if mozi[i] % 10 == 0 else
       round(mozi[i] + 5, -1)
       for i in range(len(mozi))]

amari = [mozi[i] % 10 if mozi[i] % 10 != 0 else
         10 for i in range(len(mozi))]

m_r_a = list(zip(mozi, rup, amari))
sorta_m_r_a =(sorted(m_r_a, key=lambda x:x[2], reverse=True))

dishes_4sum = 0
for i in range(4):
    dishes_4sum += sorta_m_r_a[i][1]
dishes_5sum = dishes_4sum + sorta_m_r_a[4][0]

print(dishes_5sum)

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 itertools
costs = [int(x) for x in input().split()]
ans = 1000000000000
for x in itertools.permutations([0, 1, 2, 3, 4]):
  c = 0
  for i in range(0, 5):
    c += costs[x[i]]
    if i != 4 && c % 10 != 0:
      c += 10 - c % 10
  ans = min(c, ans)
print(ans)

import itertools
costs = [int(x) for x in input().split()]
ans = 1000000000000
for x in itertools.permutations([0, 1, 2, 3, 4]):
  c = 0
  for i in range(0, 5):
    c += costs[x[i]]
    if i != 4 and c % 10 != 0:
      c += 10 - c % 10
  ans = min(c, ans)
print(ans)

import itertools
costs = [int(input()) for _ in range(0, 5)]
ans = 1000000000000
for x in itertools.permutations([0, 1, 2, 3, 4]):
  c = 0
  for i in range(0, 5):
    c += costs[x[i]]
    if i != 4 and c % 10 != 0:
      c += 10 - c % 10
  ans = min(c, ans)
print(ans)


Verdicts: Runtime Error

Runtime Error

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

Submission attempts (in order):
input_li = [int(input()) for _ in range(5)]
rest_li = [_ % 10 for _ in input_li]

min_li = min(rest_li)
del rest_li[rest_li.index(min_li)]
total = 0

for i in  rest_li:
    if i != 0:
        total += 10 - i

print(sum(input_li) + total)

input_li = [int(input()) for _ in range(5)]
rest_li = [_ % 10 for _ in input_li]
rest_li = [_ for _ in rest_li if _ != 0]

if len(rest_li) != 0:
    min_li = min(rest_li)
    del rest_li[rest_li.index(min_li)]
    total = 0

    for i in  rest_li:
        if i != 0:
            total += 10 - i

    print(sum(input_li) + total)

else:
    print(sum(input_li))

Verdicts: Wrong Answer

Accepted