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):
dishes = [int(input()) for i in range(5)]
min_dish = dishes.pop(dishes.index(min(dishes)))
sum = 0
for d in dishes:
  sum += -int(-d / 10) * 10
print(sum + min_dish)


dishes = [int(input()) for i in range(5)]
min_dish = dishes.pop(dishes.index(min(dishes)))
sum = 0
for d in dishes:
  sum += -int(-d)
print(sum + min_dish)

dishes = [int(input()) for i in range(5)]
ceil_time = [-(-d//10)*10 for d in dishes]
diff = [c - d for c, d in zip(ceil_time, dishes)]
di = diff.index(max(diff))
print(sum(ceil_time) - diff[di])

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):
from math import ceil
tmp1 = list(map(int,input().split()))
tmp2 = list()
for j in range(5):
    if tmp1[j]%10 == 0:
        tmp2.append(0)
    else:
        tmp2.append(10 - tmp1[j]%10)
for i in range(5):
    tmp1[i] = ceil(tmp1[i]/10)*10
print(tmp1)
print(tmp2)
print(sum(tmp1)-max(tmp2))

from math import ceil
tmp1 = list(map(int,input().split()))
tmp2 = list()
for j in range(5):
    if tmp1[j]%10 == 0:
        tmp2.append(float("inf"))
    else:
        tmp2.append(tmp1[j]%10)
for i in range(5):
    tmp1[i] = ceil(tmp1[i]/10)*10
print(tmp1)
print(tmp2)
print(sum(tmp1)-min(tmp2))

from math import ceil
tmp1 = list(map(int,input().split()))
tmp2 = list()
for j in range(5):
    if tmp1[j]%10 == 0:
        tmp2.append(0)
    else:
        tmp2.append(10 - tmp1[j]%10)
for i in range(5):
    tmp1[i] = ceil(tmp1[i]/10)*10
print(sum(tmp1)-max(tmp2))

A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
from math import ceil
tmp1 = [A,B,C,D,E]
tmp2 = list()
for j in range(5):
    if tmp1[j]%10 == 0:
        tmp2.append(0)
    else:
        tmp2.append(10 - tmp1[j]%10)
for i in range(5):
    tmp1[i] = ceil(tmp1[i]/10)*10
print(sum(tmp1)-max(tmp2))

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

x=0
y=9
for _ in range(5):
  i=int(input())
  x+=math.ceil(i/10)*10
  if i%10<y:
    y=i%10
print(x+y-10)


import math

x=0
y=0
for _ in range(5):
  i=int(input())
  x+=math.ceil(i/10)*10
  if i%10>y:
    y=i%10
print(x+y-10)


import math

x=0
y=0
for _ in range(5):
  i=int(input())
  x+=math.ceil(i)
  if i%10>y:
    y=i%10
print(x+y-10)


import math
a=list[int(input()) for _ in range(5)]
x=0
y=0
for i in a:
  x+=math.ceil(i)
  if i%10>y:
    y=i%10
print(x+y-10)

from math import ceil
a=[int(input()) for i in range(5)]
ans=9
for i in a:
  ans=min(ans,(i-1)%10+1)
map(lambda x:ceil(x/10)*10,a)
print(sum(a)-ans)

from math import ceil
a=[int(input()) for i in range(5)]
ans=10
sum=0
for i in a:
  x=(i-1)%10+1
  ans=min(ans,x)
  sum+=ceil(i/10)*10
if ans==10:
  print(sum)
else:
  print(sum+ans-10)

Verdicts: Wrong Answer

Wrong Answer

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):
with open("td3") as f:
    open0read = f.read()
n=list(map(int,open0read.split()))
n.sort(key=lambda x:-((x-1)%10))
print(sum([((x-1)//10+1)*10 for x in n[:-1]]+[n[-1]]))


n=list(map(int,open(0).read().split()))
n.sort(key=lambda x:-((x-1)%10))
print(sum([((x-1)//10+1)*10 for x in n[:-1]]+[n[-1]]))


Verdicts: Runtime Error

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

Submission attempts (in order):
a=list(int(input()) for i in range(5))

b=[-(-a[i]//10)*10 for i in range(5)]
c=[a[i]%10 for i in range(5) if a[i]%10 != 0]
print(b)

print(sum(b) + min(c) -10)


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

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


Verdicts: Runtime Error

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

Submission attempts (in order):
List= [int(input()) for i in range(5)]
amari =9
time = 0
flag = False;
for i in List:
    if(i%10 != 0):
        time += 10 - i%10
        amari = min(amari,i%10)
        flag = True
output = sum(List) + time
if(flag):
    output += amari
print(output)

List= [int(input()) for i in range(5)]
amari =9
time = 0
flag = False;
for i in List:
    if(i%10 != 0):
        time += 10 - i%10
        amari = min(amari,i%10)
        flag = True
output = sum(List) + time
if(flag = True):
    output += amari
print(output)

ans = 0
y = []
z = []
for i in range(5):
    X = int(input())
    if X % 10 != 0:
        y.append(10 - X%10)
    z.append(X)

if len(y)>0:
    print(sum(z) + sum(y) - max(y))
else:
    print(sum(z))

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=[]
for i in range(5):
  a.append(int(input()))
a=sorted(a,key=lambda x: x%10)
c=0
for i in a[0:-1]:
  c+=round(i/10)*10
print(c+a[-1])


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

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):
lis = []
cnt = 0
for i in range(5):
    val = 0
    a = int(input())
    while a % 10 != 0:
        a += 1
        val += 1
    lis.append(a)
    if val > cnt:
        cnt = val
print(cnt)
ans = sum(lis)
print(ans - cnt)

lis = []
cnt = 0
for i in range(5):
    val = 0
    a = int(input())
    while a % 10 != 0:
        a += 1
        val += 1
    lis.append(a)
    if val > cnt:
        cnt = val
#print(cnt)
ans = sum(lis)
print(ans - cnt)

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 abc(n):
    if n % 10 == 0:
        return n
    else:
        return n + 10 - (n%10)

ans = 0
mods = []

for _ in range(5):
    tmp = int(input())
    ans += abc(tmp)
    mods.append(tmp%10)

if not set(mods) == {0}:
    ans -= 10
    ans += min(mods)

print(ans)

def abc(n):
    if n % 10 == 0:
        return n
    else:
        return n + 10 - (n%10)

ans = 0
mods = []

for _ in range(5):
    tmp = int(input())
    ans += abc(tmp)
    mods.append(tmp%10)

if not set(mods) == {0}:
    while 0 in mods:
        mods.remove(0)
    ans -= 10
    ans += min(mods)

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):
sum = 0
for i in range(5):
        sum += int(input())
print((sum+1)//10)

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
lst_1 = sorted([(a - 1) % 10, (b - 1) % 10, (c - 1) % 10, (d - 1) % 10, (e - 1) % 10])
print(lst_1[0])
print(((a+9)//10)*10 + ((b+9)//10)*10 + ((c+9)//10)*10 + ((d+9)//10)*10 + ((e+9)//10)*10 - (10 - (lst_1[0] + 1) if lst_1[0] != 9 else 0))

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
lst_1 = sorted([(a - 1) % 10, (b - 1) % 10, (c - 1) % 10, (d - 1) % 10, (e - 1) % 10])
print(((a+9)//10)*10 + ((b+9)//10)*10 + ((c+9)//10)*10 + ((d+9)//10)*10 + ((e+9)//10)*10 - (10 - (lst_1[0] + 1) if lst_1[0] != 9 else 0))

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):
num=[]
a=[] 
time = 0 
for i in range(5):
    num.append(int(input()))
    if num[i]%10 == 0:
        a.append(0)
    else:
        a.append(10 - num[i]%10)
    time += num[i] + a[i]

time -= max(a)
time

num=[]
a=[] 
time = 0 
for i in range(5):
    num.append(int(input()))
    if num[i]%10 == 0:
        a.append(0)
    else:
        a.append(10 - num[i]%10)
    time += num[i] + a[i]

time -= max(a)

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):
from itertools import*
*a,=map(int,open(0).read().split())
b=[i%10for i in a]
c=a.pop(b.index(min(b)))
ans=0
#print(a)
for i in a:
    #print((i//10*10+(i%10>0)*10))
    ans+=(i//10*10+(i%10>0)*10)
print(ans+c)

*a,=map(int,open(0).read().split())
b=[i%10 if i%10!=0 else 99 for i in a ]
c=a.pop(b.index(min(b)))
ans=0
#print(a)
for i in a:
    #print((i//10*10+(i%10>0)*10))
    ans+=(i//10*10+(i%10>0)*10)
print(ans+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):
li = []
lis = []
time = 0
for i in range(5):
    li.append(int(input()))
    lis.append(li[i] % 10)
last = lis.index(min(lis))
for i in range(5):
    if i == last:
        continue
    elif lis[i] == 0:
        time += li[i]
    elif 1 <= li[i] <= 9:
        time += 10
    else:
        time += int(li[i] / 10) * 10 + 10
print(time + li[last])

import itertools
C = []
for i in range(5):
    C.append(int(input()))

ans = float("inf")
for order in itertools.permutations(C, 5):
    total = 0
    for c in order:
        if total % 10 != 0:
            total = (total // 10 + 1) * 10
        total += c

    ans = min(total, ans)

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):
# nabc123_b.py

dishes = [int(input()) for i in range(5)]
lest_time = 0
ans = 0
for dish in dishes:
    if dish%10==0:
        ans += (dish)
    else:
        ans += (dish+10-dish%10)
    if lest_time < 10-dish%10 and dish%10!=0:
        lest_time = 10-dish%10
    print(ans,dish,lest_time)
print(ans-lest_time)    


# nabc123_b.py

dishes = [int(input()) for i in range(5)]
lest_time = 0
ans = 0
for dish in dishes:
    if dish%10==0:
        ans += (dish)
    else:
        ans += (dish+10-dish%10)
    if lest_time < 10-dish%10 and dish%10!=0:
        lest_time = 10-dish%10
print(ans-lest_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):
t=[int(input()) for _ in range(5)]
s=[]
for i in range(5):
    s.append(t[i]%10)
    t[i]=-(-t[i]//10)*10
S=sorted(s)[-5+s.count(0)]
if S==0:
    print(sum(t))
else:print(sum(t-10+S))

t=[int(input()) for _ in range(5)]
s=[]
for i in range(5):
    s.append(t[i]%10)
    t[i]=-(-t[i]//10)*10
s=sorted(s)
ans=sum(t)-10
cnt=0
for i in range(len(s)):
    if s[i]!=0:
        ans+=s[i]
        break
    else:cnt+=1
if cnt>0:
    ans+=10
print(ans)

t=[int(input()) for _ in range(5)]
s=[]
for i in range(5):
    s.append(t[i]%10)
    t[i]=-(-t[i]//10)*10
S=sorted(s)[-5+s.count(0)]
if S==0:
    print(sum(t))
else:print(sum(t)-10+S)

Verdicts: Runtime Error

Wrong Answer

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

Submission attempts (in order):
a=[int(input()) for _ in range(5)]
d=[]
for j in a:
  while j%10!=0:
    j+=1
  d.append(j)
b=[]
c=0
for i in range(5):
  c=a[i]%10
  b.append(c)
e=b.index(min(b))
d.pop(e)
print(sum(d)+a[e])

a=[int(input()) for _ in range(5)]
b=[]
ans=0
for j in a:
  while j%10!=0:
    j+=1
  b.append(j)
for i in range(5):
  if b[i]-a[i]>ans:
    ans=b[i]-a[i]
    
print(sum(b)-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):
*t, = map(int, open(0).read().split())
try:
    m = 10 - min([i%10 for i in t if i%10])
except Value Error:
    m = 0
print(sum([-(-j // 10) for j in t])*10 - m)

*t, = map(int, open(0).read().split())
try:
    m = 10 - min([i%10 for i in t if i%10])
except ValueError:
    m = 0
print(sum([-(-j // 10) for j in t])*10 - m)

Verdicts: Runtime Error

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

Submission attempts (in order):
a=[int(input()) for _ in range(5)]
ans=sum(a)
b=10
for i in range(5):
    ans+=10-a[i]%10
    b=min(b,a[i]%10)
print(ans-10+b)

a=[int(input()) for _ in range(5)]
ans=sum(a)
b=10
for i in range(5):
    if a[i]%10!=0:
        ans+=10-a[i]%10
        b=min(b,a[i]%10)
print(ans-10+b)

Verdicts: Wrong Answer

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

Submission attempts (in order):
a = input()[::-1]
b = input()[::-1]
c = input()[::-1]
d = input()[::-1]
e = input()[::-1]

total = 0

menu_list = []

menu_list.append(a)
menu_list.append(b)
menu_list.append(c)
menu_list.append(d)
menu_list.append(e)

menu_list2 = []

for i in range(len(menu_list)):
    if menu_list[i][:1] == '0':
        total += int(menu_list[i][::-1])
    else:
        menu_list2.append(menu_list[i])

menu_list2.sort()
menu_list2.reverse()

menu_time = 0

j = 0

for menu2 in menu_list2:
    menu_time = int(menu2[::-1])
    print(menu_time)
    if j == len(menu_list2)-1:
        total += menu_time
    else:
        total += menu_time + 10 - menu_time % 10

    j += 1

print(total)

a = input()[::-1]
b = input()[::-1]
c = input()[::-1]
d = input()[::-1]
e = input()[::-1]

total = 0

menu_list = []

menu_list.append(a)
menu_list.append(b)
menu_list.append(c)
menu_list.append(d)
menu_list.append(e)

menu_list2 = []

for i in range(len(menu_list)):
    if menu_list[i][:1] == '0':
        total += int(menu_list[i][::-1])
    else:
        menu_list2.append(menu_list[i])

menu_list2.sort()
menu_list2.reverse()

menu_time = 0

j = 0

for menu2 in menu_list2:
    menu_time = int(menu2[::-1])

    if j == len(menu_list2)-1:
        total += menu_time
    else:
        total += menu_time + 10 - menu_time % 10

    j += 1

print(total)

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=[int(input()) for i in range(5)]
R=list(S)
for i in range(5):
    R[i]=R[i]%10
L=sorted(R)[::-1]

total=S[0]+S[1]+S[2]+S[3]+S[4]
mati=(10-L[0])+(10-L[1])+(10-L[2])+(10-L[3])
print(total+mati)

S=[int(input()) for i in range(5)]
R=list(S)
for i in range(5):
    R[i]=R[i]%10
L=sorted(R)[::-1]

for i in range(5):
    if L[i]!=0:
        L[i]=10-L[i]
W=sorted(L)

total=S[0]+S[1]+S[2]+S[3]+S[4]
mati=W[0]+W[1]+W[2]+W[3]
print(total+mati)

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

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

print(ans)

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

# ans = max(a%10, b%10, c%10, d%10, e%10) + (a+(10-a%10)) + (b+(10-b%10))+(c+(10-c%10))+(d+(10-d%10))+(e+(10-e%10)) -10

min_amari = 10
lis = [a,b,c,d,e]
ans = -10
for e in lis:
    ama = e % 10
    if ama == 0:
        ans += e
    else:
        ans += e + (10-e%10)
        if min_amari > ama:
            min_amari = ama
ans += min_amari 

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 = list(map(int,open(0).read().split()))
Lm = min([i//10 for i in L])
print(sum([10*math.ceil(i/10) for i in L])-Lm)
import math
L = list(map(int,open(0).read().split()))
Lm = max([10-(i//10) for i in L])
print(sum([10*math.ceil(i/10) for i in L])-Lm)





import math
L = [int(input()) for _ in range(5)]
Lm = []
for i in range(len(L)):
    if i%10 == 0:
        Lm.append(0)
    else:
        Lm.append(10-i%10)
print(sum([10*math.ceil(i/10) for i in L])-max(Lm))





import math
L = [int(input()) for _ in range(5)]
Lm = []
for i in L:
    if i%10 == 0:
        Lm.append(0)
    else:
        Lm.append(10-i%10)
print(sum([10*math.ceil(i/10) for i in L])-max(Lm))





Verdicts: Runtime Error

Wrong Answer

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

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

key=[]
sums=0

for num in nums:
  key.append(num%10)

flag=True

for i in range(len(nums)):
  if nums[i]==nums[key.index(min(key))] and flag:
    flag=False
    continue
  sums+=((10-key[i])+nums[i])
  
print(sums+nums[key.index(min(key))])

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

key=[]
sums=0

for num in nums:
  if num%10==0:
    key.append(10)
  else:
    key.append(num%10)

flag=True

for i in range(len(nums)):
  if nums[i]==nums[key.index(min(key))] and flag:
    flag=False
    continue
  sums+=((10-key[i])+nums[i])
  
print(sums+nums[key.index(min(key))])

Verdicts: Wrong Answer

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

Submission attempts (in order):
# coding: utf-8
# Your code here!

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

minr = 10
minf = 0
for f in food:
    if f % 10 != 0 :
        if f % 10 < minr :
            minr = f % 10
            minf = f
    else:
        minf = f

food.remove(minf)
food.append(minf)

sumf = 0
i = 0
for f in food:
    if i == 4:
        sumf += f
    elif f % 10 != 0:
        sumf += int(f/10) * 10 + 10
    else:
        sumf += f
    i+=1
print(sumf)


# coding: utf-8
# Your code here!

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

minr = 10
minf = 0
for f in food:
    if f % 10 != 0 :
        if f % 10 < minr :
            minr = f % 10
            minf = f
if minf == 0:
    minf = food[0]
        

food.remove(minf)
food.append(minf)

sumf = 0
i = 0
for f in food:
    if i == 4:
        sumf += f
    elif f % 10 != 0:
        sumf += int(f/10) * 10 + 10
    else:
        sumf += f
    i+=1
print(sumf)


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

sum = 0
edge = 10

for ele in lst:
    if ele % 10 == 0:
        # do something
        sum += ele
    else:
        sum += ((ele - 1) // 10 + 1) * 10
        edge = min(edge, ele % 10)
print(sum + edge % 10)


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

sum = 0
edge = 10

for ele in lst:
    if ele % 10 == 0:
        # do something
        sum += ele
    else:
        sum += ((ele - 1) // 10 + 1) * 10
        edge = min(edge, ele % 10)

print(sum + edge - 10)


Verdicts: Wrong Answer

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

Submission attempts (in order):
s=[int(input()) for _ in range(5)]
k=[s[i]%10 for i in range(5)]
l=[]
for i in range(5):
    if k[i] !=0:
        l.append(10-k[i])
    else:
        l.append(0)
p=max(k)
m=sum(s)
n=sum(l)
print(int(m+n-p))

s=[int(input()) for _ in range(5)]
k=[s[i]%10 for i in range(5)]
l=[]
for i in range(5):
    if k[i] !=0:
        l.append(10-k[i])
    else:
        l.append(0)
l=max(k)
m=sum(s)
n=sum(k)
print(int(m+n-l))

s=[int(input()) for _ in range(5)]
k=[(10-s[i]%10) for i in range(5)]
l=max(k)
m=sum(s)
n=sum(k)
print(int(m+n-l))


s=[int(input()) for _ in range(5)]
k=[s[i]%10 for i in range(5)]
l=[]
for i in range(5):
    if k[i] !=0:
        l.append(10-k[i])
    else:
        l.append(0)
p=max(k)
m=sum(s)
n=sum(l)
print(int(m+n-l))

s=[int(input()) for _ in range(5)]
k=[s[i]%10 for i in range(5)]
l=[]
for i in range(5):
    if k[i] !=0:
        l.append(10-k[i])
    else:
        l.append(0)
l=max(k)
m=sum(s)
n=sum(l)
print(int(m+n-l))

s=[int(input()) for _ in range(5)]
k=[s[i]%10 for i in range(5)]
l=[]
for i in range(5):
    if k[i] !=0:
        l.append(10-k[i])
    else:
        l.append(0)
p=max(l)
m=sum(s)
n=sum(l)
print(int(m+n-p))

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

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

c=[0]
for i in range(5):
    if lst[i]%10!=0:
        c.append(lst[i]%10)
        lst[i]=(lst[i]//10+1)*10


print(sum(lst)+min(c)-10)

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

c=[]
for i in range(5):
    if lst[i]%10!=0:
        c.append(lst[i]%10)
        lst[i]=(lst[i]//10+1)*10

if not c:
    print(sum(lst))
else:
    print(sum(lst)+min(c)-10)

Verdicts: Wrong Answer

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

Submission attempts (in order):
import sys
from collections import defaultdict


def input():
    return sys.stdin.readline().rstrip()


def main():
    a = int(input())
    b = int(input())
    c = int(input())
    d = int(input())
    e = int(input())

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

    d = 0
    p = []

    for i in range(5):
        x, y = divmod(W[i], 10)
        if y == 0:
            d += x
            p.append(y)
        else:
            d += x + 1
            p.append(y)

    print(d * 10 + min(p)-10)


if __name__ == "__main__":
    main()


import sys
from collections import defaultdict


def input():
    return sys.stdin.readline().rstrip()


def main():
    a = int(input())
    b = int(input())
    c = int(input())
    d = int(input())
    e = int(input())

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

    d = 0
    p = []

    for i in range(5):
        x, y = divmod(W[i], 10)
        if y == 0:
            d += x
            p.append(10)
        else:
            d += x + 1
            p.append(y)

    print(d * 10 + min(p)-10)


if __name__ == "__main__":
    main()


Verdicts: Wrong Answer

Accepted