Problem:


Score: 200 points

Problem Statement

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.

Constraints

A, B, C, D and E are integers between 1 and 123 (inclusive).

Input

Input is given from Standard Input in the following format:

A
B
C
D
E

Output

Print the earliest possible time for the last dish to be delivered, as an integer.

Sample Input 1

29
20
7
35
120

Sample Output 1

215

If we decide to order the dishes in the order ABC Don, ARC Curry, AGC Pasta, ATC Hanbagu, APC Ramen, the earliest possible time for each order is as follows:

Order ABC Don at time 0, which will be delivered at time 29.

Order ARC Curry at time 30, which will be delivered at time 50.

Order AGC Pasta at time 50, which will be delivered at time 57.

Order ATC Hanbagu at time 60, which will be delivered at time 180.

Order APC Ramen at time 180, which will be delivered at time 215.

There is no way to order the dishes in which the last dish will be delivered earlier than this.

Sample Input 2

101
86
119
108
57

Sample Output 2

481

If we decide to order the dishes in the order AGC Pasta, ARC Curry, ATC Hanbagu, APC Ramen, ABC Don, the earliest possible time for each order is as follows:

Order AGC Pasta at time 0, which will be delivered at time 119.

Order ARC Curry at time 120, which will be delivered at time 206.

Order ATC Hanbagu at time 210, which will be delivered at time 267.

Order APC Ramen at time 270, which will be delivered at time 378.

Order ABC Don at time 380, which will be delivered at time 481.

There is no way to order the dishes in which the last dish will be delivered earlier than this.

Sample Input 3

123
123
123
123
123

Sample Output 3

643

This is the largest valid case.



Sample input:
29
20
7
35
120


Sample output:
215

Submission status: Runtime Error

Solution code:
time = [int(input()) for _ in range(5)]

import math
ans = 0
minmod = 10
for i in range(n):
  if time[i]%10!=0:
    minmod = min(minmod,time[i]%10)
  else:
    minmod = min(minmod,10)
  ans += math.ceil(time[i]/10)*10

ans -= (10-minmod)
print(ans)

Submission status: Runtime Error

Solution code:
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
List =[A,B,C,D,E]
ans = 0
for i in range(5):
  if l[i] % 10 != 0:
    mini = min(9,l[i])
print(a+b+c+d+e+A+B+C+D+E-(10-mini))

Submission status: Runtime Error

Solution code:
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
list =[a,b,c,d,e]
ans = 0
for i in range(5):
  if l[i] % 10 != 0:
    mini = min(9,l[i])
print(a+b+c+d+e+A+B+C+D+E-mini)

Submission status: Runtime Error

Solution code:
a = [int(input()) for _ in range(5)]

maxv = 0
b = 5
for i in range(5):
    if maxv < 10 - (a[i]%10) and a[i] % 10 != 0:
        maxv, b = 10 - (a[i]%10), i

ans = 0

for i in range(5):
    if i != b:
        ans += a[i]

    if ans % 10 != 0:
        for j in range(10):
            ans += 1
            if ans % 10 == 0:
                break

ans += a[b]
print(ans)

Submission status: Runtime Error

Solution code:
a = [int(input()) for _ in range(5)]

maxv = 0
for i in range(5):
    if maxv < 10 - (a[i]%10) and a[i] % 10 != 0:
        maxv, b = 10 - (a[i]%10), i

ans = 0

for i in range(5):
    if i != b:
        ans += a[i]

    if ans % 10 != 0:
        for j in range(10):
            ans += 1
            if ans % 10 == 0:
                break

ans += a[b]
print(ans)

Submission status: Runtime Error

Solution code:
t=0
menor = 11
v = []
while t<=4:
    x = int(input())
    v.append(x)
    menor_tempo = x%10
    if menor_tempo<=menor and menor_tempo!=0:
        menor = menor_tempo
        interador = t
        m = x
    t = t+1
i=4
soma= 0
while i>=0:
    if i != interador and v[i]%10!=0:
        resto = v[i]%10
        comp_resto = 10 - resto
        v[i] = v[i] + comp_resto
    soma = soma + v[i]
    i = i-1
print(soma)

Submission status: Runtime Error

Solution code:
menu = [int(input()) for _ in range(5)]
ans = 0
mod = []
for time in menu:
    if time % 10 == 0:
        ans += time
    else:
        ans += time
        mod.append(10 - time % 10)
mod.remove(max(mod))
ans += sum(mod)
print(ans)

Submission status: Runtime Error

Solution code:
*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)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
food = [int(input()) for i in range(5)]
a = 10

for i in range(5):
    x = food[i] % 10
    if 0 < x < a:
        a = x
        remove = food[i]
        
food.remove(remove)

ans = remove

for i in range(4):
    ans += -(-food[i]//10)*10
    
print(ans)

Submission status: Runtime Error

Solution code:
import math
ary1 = [int(input()) for x in range(5)]
ans = sum(10*math.ceil(x/10) for x in ary1) - max([10-(y % 10) for y in ary1 if y % 10 !=0])
print(ans)

Submission status: Runtime Error

Solution code:
L = [int(input()) for i in range(5)]
L1 = [x for x in L if x%10 ==0 ]
L2 = [x for x in L if x%10 !=0 ]
L3 = [x%10 for x in L2 ]

idx = L3.index(min(L3))
for i in range(len(L2)):
    if i != idx:
        L2[i] = (L2[i]//10+1)*10
if L1:
    a = sum(L1)
else:
    a =0
if L2:
    b = sum(L2)
else:
    b = 0
print(a+b)

Submission status: Runtime Error

Solution code:
L = [int(input()) for i in range(5)]
L1 = [x for x in L if x%10 ==0 ]
L2 = [x for x in L if x%10 !=0 ]
L3 = [x%10 for x in L2 ]

idx = L3.index(min(L3))
for i in range(len(L2)):
    if i != idx:
        L2[i] = (L2[i]//10+1)*10

print(sum(L1)+sum(L2))

Submission status: Runtime Error

Solution code:
n = [int(input()) for i in range(5)]
m = 10
#1の位が最も小さいものはそのまま足す・残りは1の位を切り上げて足す

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)

Submission status: Runtime Error

Solution code:
n = [int(input()) for i in range(5)]
m = 9
#1の位が最も小さいものはそのまま足す・残りは1の位を切り上げて足す

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)

Submission status: Runtime Error

Solution code:
n = [int(input()) for i in range(5)]
m = 9
#1の位が最も小さいものはそのまま足す・残りは1の位を切り上げて足す

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)

Submission status: Runtime Error

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()

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

extra_list = []

tmp = 11
for i in range(5):
    extra = order[i] % 10
    if extra != 0:
        if extra < tmp:
            tmp = extra
            extra_list.append(i)

ans = 0
for i in range(5):
    if i == extra_list[-1]:
        continue
    if order[i] % 10 == 0:
        ans += order[i]
    else:
        ans += 10 * (order[i] // 10 + 1)

print(ans + order[extra_list[-1]])

Submission status: Runtime Error

Solution code:
x = [int(input()) for _ in range(5)]
r = list(map(lambda a: a%10,x))
min = min(filter(lambda x: x>0, r))
ans=0
for i in range(5):
    ans+=-(-x[i]//10)*10
ans+= min-10
print(ans)

Submission status: Runtime Error

Solution code:
A = 0
B = []
for i in range(5):
  I = int(input())
  A += I
  T = I % 10
  if T != 0:
    B.append(10 - T)
print(A + sum(B) - max(B))

Submission status: Runtime Error

Solution code:
A=[]
for i in range(5):
    B=int(input())
    A.append(B)
min=1000
for j in range(5):
    if A[j]%10!=0 and A[j]%10<min:
        min=A[j]%10
        index=j
time=0
for k in range(len(A)):
    if k!=index:
        time=time+A[k]
        if A[k]%10!=0:
            time=time+(10-A[k]%10)
    else:
        time=time+A[k]
print(time)

Submission status: Runtime Error

Solution code:
l = []
num = []

for i in range(5):
    menu = int(input())
    if menu%10 != 0:
        num.append(menu%10)
        menu = (menu//10+1)*10
    l.append(menu)

ans = sum(l)-(10-min(num))

print(ans)

Submission status: Runtime Error

Solution code:
import numpy as np
sho_ls = []
amari_ls = []
a_ls = []
for _ in range(5):
    a = int(input())
    a_ls.append(a)
    sho, amari = divmod(a,10)
    sho_ls.append(sho)
    amari_ls.append(amari)

amari_ls_not0 = []
for i in range(5):
    if amari_ls[i] != 0:
        amari_ls_not0.append(amari_ls[i])

amari_min_not0 = min(amari_ls_not0)
arg_min = amari_ls.index(amari_min_not0)
ans = 0
for i in range(5):
    if i != arg_min:
        if amari_ls[i] != 0:
            plus = a_ls[i] + 10 - amari_ls[i]
            ans += plus
            
        else:
            plus = a_ls[i]
            ans += plus
plus = a_ls[arg_min]
ans += plus
print(ans)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
a = []
a.append(10-(A % 10))
a.append(10-(B % 10))
a.append(10-(C % 10))
a.append(10-(D % 10))
a.append(10-(E % 10))
b = []
for i in range(5):
    if a[i] != 10:
        b.append(a[i])
c = A+B+C+D+E+sum(b)-max(b)
print(c)

Submission status: Runtime Error

Solution code:
N = 5
Dishes = [int(input()) for _ in range(N)]
Dishes_10 = [0]*N

for i in range(N):
    d = int(str(Dishes[i])[-1])
    if d!=0:
        Dishes_10[i] = Dishes[i]+10-d
    else:
        Dishes_10[i] = Dishes[i]

Max=0
for i in range(N):
    
    if (Dishes_10[i]-Dishes[i])>Max:
        posi = i
        Max = Dishes_10[i]-Dishes[i]
        
Dishes_10[posi] = Dishes[posi]

print(sum(Dishes_10))

Submission status: Runtime Error

Solution code:
N = 5
Dishes = [int(input()) for _ in range(N)]
Dishes_10 = []

for i in range(N):
    d = int(str(Dishes[i])[-1])
    if d!=0:
        Dishes_10.append(int(Dishes[i])+10-d)
    else:
        Dishes_10.append(int(Dishes[i]))

for i in range(N):
    Max=0
    if (Dishes_10[i]-Dishes[i])>Max:
        posi = i
        Max = Dishes_10[i]-Dishes[i]

Dishes_10[posi] = Dishes[posi]

print(sum(Dishes_10))

Submission status: Runtime Error

Solution code:
import numpy as np

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

M = np.array([a, b, c, d, e])
t = np.array(list(map(lambda x: x%10, M)))
tt = min(t[t != 0])

if len(M[t == tt]) != 1:
    MS = sorted(M)
    MM = [MS[0]]
    MMM = MS[1:]
else:
    MM = M[t == tt]
    MMM = M[t != tt]

s = np.array(list(map(lambda x: -(-x//10*10), MMM)))

wk = np.concatenate([MM, s])
ans = sum(wk)
print(ans)

Submission status: Runtime Error

Solution code:
#ABC123

a = [int(input()) for _ in range(5)]
b = [a[i] // 10 for i in range(5)]
c = sorted([a[i] % 10 for i in range(5) if a[i] % 10 != 0])
s = 10 * sum(b) + c[0] + (len(c)-1) * 10


print(s)

Submission status: Runtime Error

Solution code:
A=[int(input()) for i in range(5)]
ans=0
for i in range(5):
    if A[i]%10==0:
        ans+=A[i]
        A[i]=0
B=[str(i) for i in A]
C=[B[i][-1] for i in range(5)]
C=[int(C[i]) for i in range(5)]
D=[None]*5
for i in range(5):
    D[i]=int(B[i])-int(C[i])
try:
    E=list([n for n in(sorted(C,reverse=True)) if n>0])
finally:
    pass
for i in range(len(E)-1):
    ans+=10
ans=ans+E[-1]+int(sum(D))
print(ans)

Submission status: Runtime Error

Solution code:
A=[int(input()) for i in range(5)]
ans=0
for i in range(5):
    if A[i]%10==0:
        ans+=A[i]
        A[i]=0
B=[str(i) for i in A]
C=[B[i][-1] for i in range(5)]
C=[int(C[i]) for i in range(5)]
D=[None]*5
for i in range(5):
    D[i]=int(B[i])-int(C[i])
E=list([n for n in(sorted(C,reverse=True)) if n>0])
for i in range(len(E)-1):
    ans+=10
ans=ans+E[-1]+int(sum(D))
print(ans)

Submission status: Runtime Error

Solution code:
lis=[]
lis.append(int(input()))
lis.append(int(input()))
lis.append(int(input()))
lis.append(int(input()))
lis.append(int(input()))
ans=0
lis_h=[]
for i in range(5):
        hito=int(str(lis[i])[-1])
        time=lis[i]
        if hito==0:
                ans+=time
        else:
                lis_h.append([hito,time])
lis_h.sort()
ans+=lis_h[0][1]

for i in range(len(lis_h)):
        if i==0:
                continue
        num = (lis_h[i][1]//10) * 10
        if lis_h[i][0] != 0:
                num+=10
        ans+=num

print(ans)

Submission status: Runtime Error

Solution code:
#!/usr/bin/python3
# -*- coding:utf-8 -*-

from math import ceil

def main():
  s = 0
  xs = []
  for x in [int(input()) for _ in range(5)]:
    if x % 10 == 0:
      s += x
    else:
      xs.append(x)
  if len(xs) == 1:
    print(s + sum(xs))
  else:
    xs = sorted(xs, key=lambda x: x%10, reverse=True)
    print(s + sum(map(lambda x: ceil(x/10)*10, xs[:-1])) + xs[-1])

if __name__=='__main__':
  main()

Submission status: Runtime Error

Solution code:
lst = [input() for _ in range(5)]
check = float("inf")
last_num = 0

for i in lst:
    if int(i[-1]) != 0 and int(i[-1]) < check:
        check = int(i[-1])
        last_num = i

lst.remove(last_num)

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

print(sum(list(map(int,lst))) + int(last_num))

Submission status: Runtime Error

Solution code:
l = [int(input()) for _ in range(5)]
m = 100
ind = 100
res = 0
for i in range(5):
    if l[i]%10 == 0:
        continue
    if l[i]%10 < m:
        m = l[i]%10
        ind = i
for i in range(5):
    if i == ind:
        continue
    else:
        res += -(-l[i]//10)*10
res += l[ind]
print(res)

Submission status: Runtime Error

Solution code:
from itertools import permutations
A_list = []
for i in range(5):
    A = int(input())
    A_list.append(A)
nes = [0,1,2,3,4]
iterator = []
print(A_list)
for i in permutations(nes):
    iterator.append(i)
for i in iterator:
    temp = 0
    for j in i:
        if temp%10 != 0:
            temp += (10-temp%10)
        temp += A_list[j]
    if temp < min1:
        min1 = temp
print(temp)

Submission status: Runtime Error

Solution code:
from itertools import permutations
A_list = []
for i in range(5):
    A_list.append(int(input()))
nes = [0,1,2,3,4]
iterator = []
print(A_list)
for i in permutations(nes):
    iterator.append(i)
for i in iterator:
    temp = 0
    for j in i:
        if temp%10 != 0:
            temp += (10-temp%10)
        temp += A_list[j]
    if temp < min1:
        min1 = temp
print(temp)

Submission status: Runtime Error

Solution code:
a=[]
b=[]
for _ in range(5):
    a.append(int(input()))
for i in  a:
    if i%10!=0:
        b.append(10-i%10)
if b:
             
    b.remove(max(b))
c=sum(b)
print(sum(a)+c)
print(sum(l))

Submission status: Runtime Error

Solution code:
a=[]
b=[]
for _ in range(5):
    a.append(int(input()))
for i in  a:
    if i%10!=0:
        b.append(10-i%10)
b.remove(max(b))
c=sum(b)
print(sum(a)+c)

Submission status: Runtime Error

Solution code:
cook = []
for i in range(5):
    cook.append(int(input()))
mn = 10
time = 0
for i in range(5):
    if cook[i]%10 < mn and cook[i]%10!=0:
        ans = i
        mn = cook[i]%10
for i in range(5):
    if i==ans:
        continue
    else:
        if cook[i]%10==0:
            time += cook[i]
        else:
            time += cook[i] + 10-(cook[i]%10)
time += cook[ans]
print(time)

Submission status: Runtime Error

Solution code:
cook = []
for i in range(5):
    cook.append(int(input()))
mn = 10
time = 0
for i in range(5):
    if cook[i]%10 < mn and cook[i]%10!=0:
        ans = i
for i in range(5):
    if i==ans:
        continue
    else:
        if cook[i]%10==0:
            time += cook[i]
        else:
            time += cook[i] + 10-(cook[i]%10)
    print(time)
time += cook[ans]
print(time)

Submission status: Runtime Error

Solution code:
cook = []
for i in range(5):
    cook.append(int(input()))
mn = 10
time = 0
for i in cook:
    if i%10 < mn and i%10!=0:
        mn = i%10
for i in cook:
    if (i%10)==mn:
        ans = i
        continue
    else:
        if i%10==0:
            time += i
        else:
            time += i + 10-(i%10)
time += ans
print(time)

Submission status: Runtime Error

Solution code:
cook = []
for i in range(5):
    cook.append(int(input()))
mn = 10
time = 0
for i in cook:
    if i%10 < mn and i%10!=0:
        mn = i%10
for i in cook:
    if (i%10)==mn:
        ans = i
        continue
    else:
        if i%10==0:
            time += i
        else:
            time += i + 10-(i%10)
    print(time)
time += ans
print(time)

Submission status: Runtime Error

Solution code:
a = []
for i in range(5):
    a.append(int(input()))

b = []
for i in range(5):
    b.append(a[i]%10)
  
def kiriage(n):
    if n%10==0:
        return n
    else:
        amari = n%10
        n = n - amari
        return n+10

#non-zero かつ minimum
mini_amari = 9
idx = 9
for i in range(len(b)):
    if b[i]<mini_amari and b[i]!=0:
        mini_amari = b[i]
        idx = i

res = 0
for i in range(len(a)):
    if i != idx:
        res += kiriage(a[i])
res += a[idx]
print(res)

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())
time=0
menu=[A,B,C,D,E]
count=0
order=[]
kauri=[]
for i in range(5):
  if menu[i]%10==0:
      order.append(menu[i])
      count+=1
for h in range(9):
  for g in range(5):
    if menu[g]%10==9-h:
      kauri.append(menu[g])
      order.append(menu[g]+(h+1))
order[4]=kauri[4-count]      
print(sum(order))

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
lst = [a,b,c,d,e]

lst2 = []

for x in lst:
    amari = x % 10
    if amari == 0:
        pass
    else:
        lst2.append(10 - amari)

lst2.remove(max(lst2))
print(sum(lst)+sum(lst2))

Submission status: Runtime Error

Solution code:

dishes = [input() for _ in range(5)]

sum_dishes = 0
last_dish = 0
last_tmp = 0
for idx, dish in enumerate(dishes):
    tmp = 10 - int(dish[-1])
    dish = int(dish)
    if tmp == 10:
        sum_dishes += dish
    elif tmp > last_tmp:
        sum_dishes += last_dish + last_tmp
        last_dish = dish
        last_tmp = tmp
        last_idx = idx
    else:
        sum_dishes += dish + tmp

print(sum_dishes + int(dishes[last_idx]))

Submission status: Runtime Error

Solution code:

dishes = [input() for _ in range(5)]

sum_dishes = []
last_dish = 0
last_tmp = 0
for idx, dish in enumerate(dishes):
    tmp = 10 - int(dish[-1])
    dish = int(dish)
    if tmp == 10:
        sum_dishes.append(dish)
    elif tmp > last_tmp:
        sum_dishes.append(last_dish + last_tmp)
        last_dish = dish
        last_tmp = tmp
        last_idx = idx
    else:
        sum_dishes.append(dish + tmp)

print(sum(sum_dishes) + int(dishes[last_idx]))

Submission status: Runtime Error

Solution code:
A = list(map(int, open(0).read().split()))
A = [(a, a%10) for a in A]
zeros = list(filter((lambda x: x[1] == 0), A))
A = list(filter((lambda x: x[1] != 0), A))
m = min(A, key=(lambda x: x[1]))[0]
A = list(filter((lambda x: x[0] != m), A))

s = sum([z[0] for z in zeros])
for a in A:
    a = a[0]
    t = (a//10+1)*10
    s += t

print(s + m)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
m=[]
cnt=0
for i in range(5):
    x=int(input())
    m.append(x)
m10=[i % 10 for i in m if i %10 >=1]
if n10:
    t=min(m10)
    for i in m:
        if i %10==0:
            cnt += i
        else:
            cnt += ((i//10)+1)*10
    print(cnt-10+t)
else:
    print(sum(m))

Submission status: Runtime Error

Solution code:
m=[]
cnt=0
for i in range(5):
    x=int(input())
    m.append(x)
m10=[i % 10 for i in m if i %10 >=1]
t=min(m10)
for i in m:
    if i %10==0:
        cnt += i
    else:
        cnt += ((i//10)+1)*10
print(cnt-10+t)

Submission status: Runtime Error

Solution code:
m=[]
cnt=0
for i in range(5):
    x=int(input())
    menu.append(x)
m10=[i % 10 for i in m if i %10 >=1]
t=min(m10)
for i in m:
    if i %10==0:
        cnt += i
    else:
        cnt += ((i//10)+1)*10
print(cnt-10+t)

Submission status: Runtime Error

Solution code:
m=[]
cnt=0
for i in range(5):
    x=int(input())
    m.append(x)
m10=[i % 10 for i in m if i %10 >=1]
t=min(m10)
for i in m:
    if i %10==0:
        cnt += i
    else:
        cnt += ((i//10)+1)*10
print(cnt-t)

Submission status: Runtime Error

Solution code:
m=[]
cnt=0
for i in range(5):
    x=int(input())
    menu.append(x)
m10=[i % 10 for i in m if i %10 >=1]
t=min(m10)
for i in m:
    if i %10==0:
        cnt += i
    else:
        cnt += ((i//10)+1)*10
print(cnt-t)

Submission status: Runtime Error

Solution code:
dish = [int(input()) for x in range(5)]
hitoketa = list(map(int, [str(x)[-1] for x in dish]))

last = 999
for i in hitoketa:
    if not i % 10 == 0:
        last = min(last, i)

last = dish[hitoketa.index(last)]
ans = last
skip = False
for i in dish:
    if i == last and not skip:
        skip = True
    elif i % 10 == 0:
        ans += i
    else:
        ans += (i // 10 + 1) * 10

print(ans)

Submission status: Runtime Error

Solution code:
a=[int(input()) for _ in [0]*5]
b=[-(-a//10)*10-i for i in a]
print(sum(b)+sum(a)-max(b))

Submission status: Runtime Error

Solution code:
L = []
for i in range(5):
    L.append(int(input()))

L1 = [x for x in L if x%10 == 0]
L2 = [x for x in L if x%10 != 0]
L3 = [(x%10,x//10) for x in L2]

ans = sum(L1)
if len(L3)>0:
	L3.sort(reverse = True)
	for i in range(len(L3)-1):
    	ans += (L3[i][1]+1)*10
	ans += L3[-1][1]*10+L3[-1][0]
print(ans)

Submission status: Runtime Error

Solution code:
L = []
for i in range(5):
    L.append(int(input()))

L1 = [x for x in L if x%10 == 0]
L2 = [x for x in L if x%10 != 0]
L3 = [(x%10,x//10) for x in L2]

ans = sum(L1)
L3.sort(reverse = True)

for i in range(len(L3)-1):
    ans += (L3[i][1]+1)*10
ans += L3[-1][1]*10+L3[-1][0]
print(ans)

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())

dish = [a,b,c,d,e]
result=0

mx=-1

def dtime(a):
    for i in range(9):
        if a%10==0:
            return a
        else:
            a+=1

for dd in dish:
    for i in range(0,10):
        if (dd+i) % 10 == 0:
            tmp=i
            break
    if tmp > mx:
        mx = tmp
        buf=dd

dish.remove(buf)

for dd in dish:
    result+=dtime(dd)

print(result+buf)

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())

dish = [a,b,c,d,e]
result=0

mx=-1

def dtime(a):
    for i in range(9):
        if a%10==0:
            return a
        else:
            a+=1

for dd in dish:
    for i in range(1,10):
        if (dd+i) % 10 == 0:
            tmp=i
            break
    if tmp > mx:
        mx = tmp
        buf=dd

dish.remove(buf)

for dd in dish:
    result+=dtime(dd)

print(result+buf)

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())

dish = [a,b,c,d,e]
result=0

mx=-1

for dd in dish:
    for i in range(1,10):
        if (dd+i) % 10 == 0:
            tmp=i
            break
    if tmp > mx:
        mx = tmp
        buf=dd

dish.remove(buf)

for dd in dish:
    result+=dd
    for j in range(1,10):
        if result % 10 ==0:
            break
        result+=1

print(result+buf)

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())

dish = [a,b,c,d,e]
result=0

mx=-1

for dd in dish:
    for i in range(1,10):
        if (dd+i) % 10 == 0:
            tmp=i
            break
    if tmp >= mx:
        mx = tmp
        buf=dd

dish.remove(buf)

for i in range(4):
    result+=dish[i]
    for j in range(1,10):
        if result % 10 ==0:
            break
        result+=1

print(result+buf)

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())

dish = [a,b,c,d,e]
result=0

mx=-1

for dd in dish:
    for i in range(1,10):
        if (dd+i) % 10 == 0:
            tmp=i
            break
    if tmp > mx:
        mx = tmp
        buf=dd

dish.remove(buf)

for i in range(4):
    result+=dish[i]
    for j in range(1,10):
        if result % 10 ==0:
            break
        result+=1

print(result+buf)

Submission status: Runtime Error

Solution code:
l = [input() for _ in [0] * 5]
keta =[]
for i in l:
    keta.append(i)
#print(keta)
xxx = []
for j in keta:
    if int(j[-1]) != 0:
        xxx.append(int(j) + (10 - int(j[-1])))
    else:
        xxx.append(int(j))
#print(xxx)
yyy = []
for k in keta:
    yyy.append(int(k[-1]))
#print(yyy)
zzz = []
for m in yyy:
    if int(m) > 0:
        zzz.append(m)
#print(zzz)
p = min(zzz)
print(sum(xxx) - (10 - p))

Submission status: Runtime Error

Solution code:
l = [input() for _ in [0] * 5]
keta =[]
for i in l:
    keta.append(i)
#print(keta)
xxx = []
for j in keta:
    if int(j[-1]) != 0:
        xxx.append(int(j) + (10 - int(j[-1])))
    else:
        xxx.append(int(j))
#print(xxx)
yyy = []
for k in keta:
    yyy.append(int(k[-1]))
zzz = []
for l in yyy:
    if int(l) > 0:
        zzz.append(l)
#print(zzz)
p = min(zzz)
print(sum(xxx) - (10 - p))

Submission status: Runtime Error

Solution code:
l = [input() for _ in [0] * 5]
keta =[]
for i in l:
    keta.append(i)
xxx = []
for j in keta:
    if int(j[-1]) != 0:
        xxx.append(int(j) + (10 - int(j[-1])))
    else:
        xxx.append(int(j))

yyy = []
for k in keta:
    yyy.append(int(k[-1]))
zzz = []
for l in yyy:
    if int(l) > 0:
        zzz.append(l)
p = min(zzz)
print(sum(xxx) - p)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

arr = [A, B, C, D, E]
arr_s = sorted(set(list(map(lambda x: x%10, arr))))
if arr_s[0] == 0:
    mn = arr_s[1]
else:
    mn = arr_s[0]

b = 0
for a in arr:
    b += (a//10)*10
    if a%10 != 0:
        b += 10
ans = b - 10 + mn
print(ans)

Submission status: Runtime Error

Solution code:
X=[int(input()) for i in range(5)]
Y=[]
for i in X:
  Y.append(-(-x//10)*10)
print(sum(Y)-(max(Y-X)))

Submission status: Runtime Error

Solution code:
list=[int(input()) for i in range(5)]
S=sum(list)
Z=0
for x in list:
  y = -(-x//10)*10
  Z=(y-x, Z)
  print(S-Z)

Submission status: Runtime Error

Solution code:
list=[int(input()) for i in range(5)]
sum=sum(list)
max=0
for x in list:
  y = -(-x//10)*10
  max=(y-x, max)
  print(sum-max)

Submission status: Runtime Error

Solution code:
list=[int(input()) for i in range(5)]
sum=sum(list)
max=0
for x in list:
  y = -(-x//10)*10
  max=(y-x, max)
print(sum-max)

Submission status: Runtime Error

Solution code:
list=[int(input()) for i in range(5)]
sum=0
max=0
for x in list:
  y = -(-x//10)*10
  sum+=y
  max=(y-x, max)
print(sum/max)

Submission status: Runtime Error

Solution code:
list=[int(input()) for i in range(5)]
sum=0
max=0
for x in list:
  y = -(-x//10)*10
  sum+=y
  max=(y-x, max)
print(sum-max)

Submission status: Runtime Error

Solution code:
list=[int(input()) for i in range(5)]
sum=0
max=0
for x in list:
  y = -(-x//10)*10
  sum+=y
  max=(y-x, max)
  print(sum-max)

Submission status: Runtime Error

Solution code:
list=[int(input()) for i in range(5)]
sum=0
max=0
for x in list:
  y = -(-x//10)*10
  sum+=y
  max=(y-x, max)
print(int(sum-max))

Submission status: Runtime Error

Solution code:
list=[int(input()) for i in range(5)]
sum=0
max=0
for x in list:
  y = -(-x//10)*10
  sum+=y
  max=((y-x), max)
print(sum-max)

Submission status: Runtime Error

Solution code:
sum=0
max=0
list=[int(input()) for i in range(5)]
for i in list:
  x = int(input()）
  y = -(-x//10)*10
  sum+=y
  max=(y-x, max)
print(sum-max)

Submission status: Runtime Error

Solution code:
for i in range(5):

Submission status: Runtime Error

Solution code:
sum=0
max=0
for i in range(5):

Submission status: Runtime Error

Solution code:
sum=0
max=0
for i in range(5):
  x = int(input()）

Submission status: Runtime Error

Solution code:
sum=0
max=0
for i in range(5):
  x = int(input()）
  y = -(-x//10)*10

Submission status: Runtime Error

Solution code:
sum=0
max=0
for i in range(5):
  x = int(input()）
  y = -(-x//10)*10
  sum+=y
  max=(y-x, max)
print(sum-max)

Submission status: Runtime Error

Solution code:
sum=0
max=0
for i in range(5):
  x = int(input()）
  y = -(-x//10)

Submission status: Runtime Error

Solution code:
sum=0
max=0
for i in range(5):
  x = int(input()）
  y = -(-x//10)
  sum+=y
  max=(y-x, max)
print(sum-max)

Submission status: Runtime Error

Solution code:
sum=0
max=0
for i in range(5):
  x = int(input()）
  y = -(-x)//10
  sum+=y
  max=(y-x, max)
print(sum-max)

Submission status: Runtime Error

Solution code:
sum=0
min=9
for i in range(5):
  y=int(input())
  x=y%10
  if x==0:
    sum+=y
  else:
    min=min(x, min)
    if x==min:

Submission status: Runtime Error

Solution code:
sum=0
min=9
for i in range(5):
  y=int(input())
  x=y%10
  if x==0:
    sum+=y
  else:
    min=min(x, min)
    if x==min:
      sum+=y
    else:
      sum+=(y+10-x)
print(sum)

Submission status: Runtime Error

Solution code:
sum=0
for i in range(5):
  y=int(input())
  x=y%10
  if x==0:
    sum+=y
  else:
    min=min(x, 9)

Submission status: Runtime Error

Solution code:
sum=0
for i in range(5):
  y=int(input())
  x=y%10
  if x==0:
    sum+=y
  else:
    min=min(x, 9)
    if x==min:
      sum+=y
    else:
      sum+=(y+10-x)
print(sum)

Submission status: Runtime Error

Solution code:
sum=0
for i in range(5):
  y=int(input())
  x=y%10
  if x==0:
    sum+=y
  else:
    min=min(x, 9)
    if x==min:
      sum+=y

Submission status: Runtime Error

Solution code:
sum=0
for i in range(5):
  y=int(input())
  x=y%10
  if x==0:
    sum+=y
  else:
    min=min(x, 9)
    if x==min:
      sum+=y
    else:
      sum+=y+10-x
print(sum)

Submission status: Runtime Error

Solution code:
min=10
sum=0
for i in range(5):
  y=int(input())
  x=y%10
  if x==0:
    sum+=y
  else:
    min=min(x, 9)
    if x==min:
      sum+=y
    else:
      sum+=y+10-x
print(sum)

Submission status: Runtime Error

Solution code:
min=10
sum=0
for i in range(5):
  y=int(input())
  x=y%10
  min != 0
  min=min(min, x)
  if x==min:
    sum+=y
  else:
    sum+=y+10-x
print(sum)

Submission status: Runtime Error

Solution code:
min=10
sum=0
for i in range(5):
  y=int(input())
  x=10-y%10
  min=min(min, x)
  if x==min:
    sum+=y
  else:
    sum+=y+x
print(sum)