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:
n = [int(input()) for _ in range(5)]
first_digit = []
for num in n:
    z = int(str(num)[-1])
    if z > 0:
        first_digit.append(z)

# print(first_digit)
t = 0
for i in range(len(n)):
    t += -(-n[i] // 10) * 10
print(t - (10 - min(first_digit)))

Submission status: Runtime Error

Solution code:
m=[int(input()) for i in range(5)]
k = []
j=[]
for i in range(5):
    j.append(-(-m[i]//10)*10)
    t = m[i] - (m[i]//10)*10
    if t>0:
      k.append(t)
if min(k) == 0:
    print(sum(j))
else:
    print(sum(j)-(10-min(k)))

Submission status: Runtime Error

Solution code:
m=[int(input()) for i in range(5)]
k=[]
j=[]
for i in range(5):
    j.append(-(-m[i]//10)*10)
    t = m[i] - (m[i]//10)*10
    if t>0:
      k.append(t)
    
print(sum(j)-(10-min(k)))

Submission status: Runtime Error

Solution code:
T=[]
t=[]
for i in range(5):
    T.append(int(input()))
    t.append(T[i]%10)
while 0 in t :
    t.remove(0)
ans = sum(T)+10*len(t)-sum(t)-10+min(t)
print(ans)

Submission status: Runtime Error

Solution code:
lis = [str(input()) for i in range(5)]

m = 10
ss = 0
for i in range(5):
      if 0 != int(lis[i][-1]) < m:
            idx = i
            m =  int(lis[i][-1])
            ss = lis[i]

for i in range(5):
      if int(lis[i][-1]) != 0:
            lis[i] = (int(lis[i])//10)*10 + 10
      else:
            lis[i] = int(lis[i])

lis[idx] = int(ss)

print(sum(lis))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
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)
m = min(k_li)
flag = False
if len(k_li)>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)

Submission status: Runtime Error

Solution code:
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)
m = min(k_li)
flag = False
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)

Submission status: Runtime Error

Solution code:
L = [int(input()) for i in range(5)]
a =[]
ans = sum(L)
for i in range(5):
    if L[i]%10>0:
        a.append(10-L[i]%10)
#print(a)
print(sum(L)+sum(a)-max(a))

Submission status: Runtime Error

Solution code:
dish_list = [int(input()) for _ in range(5)]
last_num_list = [int(str(dish_i)[-1]) for dish_i in dish_list]
target_index =min(list(filter(lambda x: x>0, last_num_list)))

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

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

Submission status: Runtime Error

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

X = [A, B, C, D, E]
Y = [[x, 10-x%10] for x in X]
acc = 0
for y in Y:
    if y[1] == 10:
        acc += y[0]
    else:
        acc += y[0] + y[1]
Z = [10-a%10 for a in X if (10-a%10) < 10]
acc -= max(Z)
print(acc)

Submission status: Runtime Error

Solution code:
x=[]
total=[]
for i in range(5):
  t=list(input())
  if t[-1]=='0':
    total.append(t)
  else:
    x.append(t)
x=sorted(x, key=lambda x: x[-1])
for i in range(1,len(x)):
  total.append(x[i])
last=int(''.join(x[0]))
for i in range(4):
  total[i]=int(''.join(total[i]))
  total[i]=-(-total[i]//10)*10

print(sum(total)+last)

Submission status: Runtime Error

Solution code:
a = [int(input()) for _ in range(5)]
b = 10-min([a[i]%10 for i in range(5) if 0 < a[i]%10] or 10)
print(sum([(-(-a[i]//10)) for i in range(5)])*10-b)

Submission status: Runtime Error

Solution code:
a = [int(input()) for _ in range(5)]
b = 10-min([a[i]%10 for i in range(5) if 0 <a[i]%10])
print(sum([(-(-a[i]//10)) for i in range(5)])*10-b)

Submission status: Runtime Error

Solution code:
t = [int(input()) for _  in range(5)]
total = 0
amari = []

for ti in t:
    d, m = divmod(ti, 10)
    total += ti - m
    if m > 0:
        amari.append(m)
total += min(amari) + 10 * (len(amari) - 1)
print(total)

Submission status: Runtime Error

Solution code:
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(sum(b) + min(c) -10)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
a = 0
b = 0
c = 0
d = 0
e = 0
ls = [a,b,c,d,e]
for i in range(len(ls)):
    ls[i] = int(input())
for i in ls:
    if i > 9:
        i = i/10
ans = 0
for i in ls:
    ans += math.ceil(i)

one = 0
lsls = []
for i in range(len(ls)):
    ls_one = str(ls[i])
    one += int(ls_one[-1])
    if int(ls_one[-1]) > 0:
    	lsls.append(10-int(ls_one[-1]))
    
lsls.remove(max(lsls))
print(ans+sum(lsls))

Submission status: Runtime Error

Solution code:
import math
a = 0
b = 0
c = 0
d = 0
e = 0
ls = [a,b,c,d,e]
for i in range(len(ls)):
    ls[i] = int(input())
for i in ls:
    if i > 9:
        i = i//10
ans = 0
for i in ls:
    ans += math.ceil(i)

one = 0
lsls = []
for i in range(len(ls)):
    ls_one = str(ls[i])
    one += int(ls_one[-1])
    if int(ls_one[-1]) > 0:
    	lsls.append(10-int(ls_one[-1]))
    
lsls.remove(max(lsls))
print(ans+sum(lsls))

Submission status: Runtime Error

Solution code:
import sys
import os
f = open('input.txt','r')
sys.stdin = f

import math

times = [0]*5
for i in range(5):
    times[i] = int(input())

#1桁目が一番小さいものを判断する
mini = 9
idx = 9
for time in times:
    if time%10 < mini and time%10 > 0:
        mini = min(mini,time%10)
        idx = times.index(time)

total = 0
for i in range(5):
    if i == idx:
        total += times[i]
    else:
        total += math.ceil(times[i]/10)*10
print(total)

Submission status: Runtime Error

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

S = [a, b, c, d, e]
R = [a%10, b%10, c%10, d%10, e%10]
C = []
for i in R:
  if i > 0:
    C.append(i)
    
min = S[R.index(min(C))]

sum = 0
for i in S:
  sum += -(-i//10)*10
  
print(sum - (-(-min//10)*10) + min)

Submission status: Runtime Error

Solution code:
if __name__ == '__main__':
    T = [int(input()) for _ in range(5)]
    
    del_max = -1
    idx_max = None
    for i in range(5):
        if T[i]%10 == 0:
            pass
        elif 10 - T[i]%10 > del_max:
            del_max = 10 - T[i]%10
            idx_max = i
    
    count = 0
    for i in range(5):
        if i != idx_max:
            time = (T[i]//10)*10
            if time < T[i]:
                time += 10
            count += time
    count += T[idx_max]
    
    print(count)

Submission status: Runtime Error

Solution code:
if __name__ == '__main__':
    T = [int(input()) for _ in range(5)]
    
    del_max = 0
    idx_max = None
    for i in range(5):
        if T[i]%10 == 0:
            pass
        elif 10 - T[i]%10 > del_max:
            del_max = max(T[i]%10 - 5, 5 - T[i]%10)
            idx_max = i
    
    count = 0
    for i in range(5):
        if i != idx_max:
            time = (T[i]//10)*10
            if time < T[i]:
                time += 10
            count += time
    count += T[idx_max]
    
    print(count)

Submission status: Runtime Error

Solution code:
import math
a,b,c,d,e = map(int, open(0).read().split())
an = -(-a//10)*10
bn = -(-b//10)*10
cn = -(-c//10)*10
dn = -(-d//10)*10
en = -(-e//10)*10
total = math.ceil(an+bn+cn+dn+en)
tt=[]
ap = a%10
bp = b%10
cp = c%10
dp = d%10
ep = e%10
ff = [ap,bp,cp,dp,ep]
for i in ff:
  if i !=0:
    tt.append(i) 
  if ff[0] ==0 and ff[1]==0 and ff[2]==0 and ff[3]==0 and ff[4]==0
    tt.append(0)
print(total-10+min(tt))

Submission status: Runtime Error

Solution code:
import math
a,b,c,d,e = map(int, open(0).read().split())
an = -(-a//10)*10
bn = -(-b//10)*10
cn = -(-c//10)*10
dn = -(-d//10)*10
en = -(-e//10)*10
total = math.ceil(an+bn+cn+dn+en)
tt=[]
ap = a%10
bp = b%10
cp = c%10
dp = d%10
ep = e%10
ff = [ap,bp,cp,dp,ep]
for i in ff:
  if i !=0:
    tt.append(i) 
print(total-10+min(tt))

Submission status: Runtime Error

Solution code:
lis = []
for _ in range(5):
  lis.append(int(input()))
mod = []
for i in lis:
  mod.append(i%10)
k = min(mod) if min(mod) != 0 else sorted(set(mod))[1]
ans = 0
for i in range(5):
  if i == mod.index(k):
    ans += lis[i]
  else:
    ans += ((lis[i]+9)//10)*10
print(ans)

Submission status: Runtime Error

Solution code:
import math

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

A=B=C=D=E=11

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

k=min(A,B,C,D,E)
if A=B=C=D=E=0:
  k=10
sum=(math.ceil(a/10)*10+math.ceil(b/10)*10+math.ceil(c/10)*10+math.ceil(d/10)*10+math.ceil(e/10)*10)

print(sum-10+k)

Submission status: Runtime Error

Solution code:
L = [input() for i in range(1, 6)]

li = list(filter(lambda x: x[-1] != "0", L))
last = int(sorted(li, key=lambda x: x[-1])[0])

t = sum(map(int, L)) - last
print(t + (10 - (t % 10)) + last)

Submission status: Runtime Error

Solution code:
Z=[]
Y=[]
for i in range(5):
    a=int(input())
    if a% 10!=0:
        Z.append(10-a % 10+a)
        Y.append(a % 10)
    else:
        Z.append(a)

print(sum(Z)-(10-min(Y)))

Submission status: Runtime Error

Solution code:
Z=[]
Q=[]
Y=[]
for i in range(5):
    a=int(input())
    Q.append(a)
    if a% 10!=0:
        Z.append(10-a % 10+a)
        Y.append(a % 10)
    else:
        Z.append(a)

print(sum(Z)-(10-min(Y)))

Submission status: Runtime Error

Solution code:
sum_div = 0
M = []
for i in range(5):
    num = int(input())
    sum_div += num // 10
    mod = num % 10
    if mod != 0:
        M.append(mod)

waiting = 10*(len(M)-1) + min(M)
total = sum_div*10 + waiting
print(total)

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
a1=a%10
b1=b%10
c1=c%10
d1=d%10
e1=e%10
ar=[a1,b1,c1,d1,e1]
a2=a//10
b2=b//10
c2=c//10
d2=d//10
e2=e//10
k=10
s=0
for i in ar:
    if i==0:
        s+=10
        continue
    minimini=min(i,k)
    if minimini==i:
        k=i
    else:
        s+=10
print((a2+b2+c2+d2+e2)*10+minimini+s)

Submission status: Runtime Error

Solution code:
#! python3
# coding:utf-8

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


a_a = a%10
b_a = b%10
c_a = c%10
d_a = d%10
e_a = e%10

a_s = int(a/10) +1 
b_s = int(b/10) +1 
c_s = int(c/10) +1 
d_s = int(d/10) +1 
e_s = int(e/10) +1 

list=[a_a,b_a,c_a,d_a,e_a]
list2=[]
for i in range(len(list)):
    if not list[i] == 0:
        list2.append(list[i])
amari = min(list2)

kiriage = (a_a+b_a+c_a+d_a+e_a)*10
ans = amari + kiriage
print(ans)

Submission status: Runtime Error

Solution code:
l = [int(input()) for i in range(5)]
ll = []
ans = -10
for i in range(5):
    if l[i] % 10 ==0:
        ans += l[i]
    else:
        ll.append(l[i]%10)
        ans += (l[i]//10 + 1)*10
ans += min(ll)
print(ans)

Submission status: Runtime Error

Solution code:
#B - Five Dishes(ABC123)
B=[]
C=[]
for i in range(5):
    S=int(input())
    if S%10==0:
        C.append(S)
    else:
        C.append(S+(10-S%10))
    if S%10!=0:
        B.append(S%10)
print(sum(C)-(10-min(B)))

Submission status: Runtime Error

Solution code:
myArray = list()
for n in range(5):
    myArray.append(int(input()))
Jouyo  = 9

for i,j in enumerate(myArray):
    if 0 < j % 10 <= Jouyo:
        Jouyo = j % 10
        jouyoi = i

times = 0
for i,j in enumerate(myArray):
    if i != jouyoi:
        if j % 10 != 0:
            times += ((j // 10) + 1) * 10
        else:
            times += j
    else:
        times += j
print(times)

Submission status: Runtime Error

Solution code:
import math


def solve():
    abcde = [int(input()) for _ in range(5)]
    last = min([i for i in abcde if not str(i)[-1] == "0"], key=lambda x: abs(int(str(x)[-1])))
    hoge = sum([math.ceil(i / 10) * 10 for i in abcde]) - (math.ceil(last / 10) * 10)
    print(hoge + last)


if __name__ == "__main__":
    solve()

Submission status: Runtime Error

Solution code:
L = []
L2 = []
for _ in range(5):
    a = input()
    if a[-1] == "0":
        L.append(int(a))
    else:
        last = int(a[-1])
        L.append(int(a) + 10 - last)
        L2.append(last)
print(sum(L) + min(L2) - 10)

Submission status: Runtime Error

Solution code:
import math
dishes =[0]*5
for i in range(5):
  dishes[i]=math.celi(int(input()))

print(sum(dishes))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math


def solve():
    abcde = [int(input()) for _ in range(5)]
    last = min([i for i in abcde if not str(i)[-1] == "0"], key=lambda x: abs(int(str(x)[-1])))
    hoge = sum([math.ceil(int(i) / 10) * 10 for i in abcde if not i == last])
    print(hoge + last)


if __name__ == "__main__":
    solve()

Submission status: Runtime Error

Solution code:
n = [int(input()) for _ in range(5)]
k = []
g = []

for i in range(len(n)):
    if n[i] % 2 == 0:
        g.append(n[i])
    else:
        k.append(n[i])

km = []
for i in range(len(k)):
    km.append(k[i]%10)

m_number = km.index(min(km)) 
kk = k[m_number]
k.remove(k[m_number])

for j in range(len(k)):
    k[j] = round(k[j],-1)

for l in range(len(g)):
    g[l] = round(g[l],-1)

print(kk+sum(k)+sum(g))

Submission status: Runtime Error

Solution code:
a = [int(input()) for i in range(5)]
ans = 0
cnt = []
for i in a:
  if i % 10 !=0:
    ans += i + (10-i%10)
    cnt.append(10-i%10)
  else:
    ans += i
print(ans-max(cnt))

Submission status: Runtime Error

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

T = M[:]
tmp = 10
for i in range(5):
  if tmp > M[i] % 10 > 0:
    tmp = M[i] % 10
    c = i
  M[i] = ((M[i] - 1) // 10 + 1) * 10
M[c] = T[c]
print(sum(M))

Submission status: Runtime Error

Solution code:
M = [int(input()) for i in range(5)]
T = M[:]
tmp = 10
for i in range(5):
    if tmp > M[i] % 10 > 0:
        tmp = M[i] % 10
        c = i
    M[i] = ((M[i] - 1) // 10 + 1) * 10
M[c] = T[c]
print(sum(M))

Submission status: Runtime Error

Solution code:
M = [int(input()) for i in range(5)]
T = M[:]
tmp = 10
for i in range(5):
  if tmp > M[i] % 10 > 0:
    tmp = M[i] % 10
    c = i
  if M[i] % 10 != 0:
    M[i] += 10 - (M[i] % 10)
M[c] = T[c]
print(sum(M))

Submission status: Runtime Error

Solution code:
M = [int(input()) for i in range(5)]
tmp = 10
for i in range(5):
  if tmp > M[i] % 10 > 0:
    tmp = M[i] % 10
    c = i
for i in range(5):
  if i != c and M[i] % 10 != 0:
    M[i] += 10 - (M[i] % 10)
print(sum(M))

Submission status: Runtime Error

Solution code:
li=[]
li2=[]
ans=0
for i in 5:
  li.append(int(input()))
for i in 5:
  li2.append=(li[i]-1)%10
for i in 5:
  ans+=(li[i]//10)*10
print(ans+min(li2)+1)

Submission status: Runtime Error

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

temp = 10
for i in range(5):
    if li[i]%10 != 0 and li[i]%10 < temp:
        temp = li[i]%10
        s = i
else:
    t = li.pop(s)
    
ans = 0

for i in li:
    if i%10 == 0:
        ans += i//10
    else:
        ans += 1 + i//10
        
print(ans * 10 + t)

Submission status: Runtime Error

Solution code:
import math

menu = [int(input()) for i in range(5)]
last_menu_index = min([[i, x % 10 ] for i, x in enumerate(menu) if x % 10 != 0 ], key=lambda x: x[1])[0]
print(sum([math.ceil(x / 10) * 10 if last_menu_index != i else menu[last_menu_index] for i, x in enumerate(menu)]))

Submission status: Runtime Error

Solution code:
a = []
b = []
min = 10
minutes = 0

for i in range(5):
    a.append(int(input()))
    amari = a[i] % 10
    if amari < min and 0 < amari:
        min = amari
        min_index = i

a[4], a[min_index] = a[min_index], a[4]

for i in range(4):
    if a[i] % 10 != 0:
        minutes += (a[i] // 10 + 1) * 10
    else:
        minutes += a[i]

minutes += a[4]

print(minutes)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
m=map;l=lambda;*a=m(int,open(0));b=m(l x:-x%10,a);c=m(l x:--x//10,a);print(sum(c)+min(b))

Submission status: Runtime Error

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

for i in minutes:
  amari = i % 10
  if amari != 0:
    amaritati.append(10 - amari)
amaritati.sort(reverse = True)
amaritati.pop(0)
answer = sum(minutes) + sum(amaritati)
print(int(answer))

Submission status: Runtime Error

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

for i in minutes:
  amari = i % 10
  if amari != 0:
    amaritati.append(10 - amari)
amaritati.sort(reverse = True)
amaritati.pop(0)
answer = sum(minutes) + sum(amaritati)
print(answer)

Submission status: Runtime Error

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

for i in minutes:
  amari = i % 10
  if amari != 0:
    amaritati.append(10 - amari)

answer = sum(minutes) + sum(amaritati) - max(amaritati)
print(int(answer))

Submission status: Runtime Error

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

for i in minutes:
  amari = i % 10
  if amari != 0:
    amaritati.append(10 - amari)

answer = sum(minutes) + sum(amaritati) - max(amaritati)
print(answer)

Submission status: Runtime Error

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

for i in minutes:
  amari = i % 10
  if amari != 0:
    amaritati.append(10 - amari)

answer = sum(minutes) + sum(amaritati) - max(amaritati)*2
print(answer)

Submission status: Runtime Error

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

for i in minutes:
  amari = i % 10
  if amari != 0:
    amaritati.append(10 - amari)

answer = sum(minutes) + sum(amaritati) - max(amari) * 2
print(answer)

Submission status: Runtime Error

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

for i in minutes:
  amari = i % 10
  if amari != 0:
    amaritati.append(10 - amari)

answer = sum(minutes) + sum(amaritati) - max(amaritati) * 2
print(answer)

Submission status: Runtime Error

Solution code:
N = [int(input()) for i in range(5)] 
list_sho = []
list_amari = []

for i in range(len(N)):
  list_sho.append(N[i]//10)
  list_amari.append(N[i]%10)
  
min1 = list_amari.index(min(list_amari))#あまりが最小になるうち一つの位置を取得
sum1 = 0

for i in range(len(N)):
  if N[i] % 10 == 0:
    sum1 += N[i]
  else:
    sum1 += ((N[i]//10) + 1) * 10

if N[min1]%10 == 0:
  while min(list_amari) == 0:
    list_amari.remove(0)
  sum1 =  sum1 - 10 +  min(list_amari)
  print(sum1)
else:
  sum1 = sum1 - 10 +  N[min1]%10
  print(sum1)

Submission status: Runtime Error

Solution code:
T = list(map(int, (input() for _ in range(5))))
T2 = [math.ceil(t / 10) * 10 for t in T]
m = max(t2 - t for t, t2 in zip(T, T2))
print(sum(T2) - m)

Submission status: Runtime Error

Solution code:
def round_up(n: int) -> int:
    if n%10 != 0:
        return n + 10 - (n%10)
    else:
        return n

def round_up_count(n: int) -> int:
    if n%10 != 0:
        return 10 - n%10
    else:
        return 0

orders = []

max_rc: int = 0
last_order_index: int = 0
last_order_time: int = 0

for i in range(5):
    order = int(input())
    orders.append(order)
    last_order_time += round_up(order)
    rc = round_up_count(order)
    if max_rc <= rc:
        last_order_index = i
        max_rc = rc

print(last_order_time - round_up_count(orders[last_order_index]))

Submission status: Runtime Error

Solution code:
import numpy as np 
x =[]
for i in range(5):
    x.append(int(input()))
x = np.array(x)
y = x.copy()
z = x%10
y[y%10 !=0] = y[y%10 !=0] + 10 - y[y%10 !=0]%10
minz = min(z[z%10!=0])

print(sum(y)-10+minz)

Submission status: Runtime Error

Solution code:
nums = [int(input()) for _ in range(5)]
l = map(int,filter(lambda x:x !="0",[str(n)[-1] for n in nums]))
r = [(n+9) // 10 for n in nums]
print(sum(r)*10-(10-min(l))) if len(l) != 0 else print(sum(r)*10)

Submission status: Runtime Error

Solution code:
nums = [int(input()) for _ in range(5)]
l = map(int,filter(lambda x:x !="0",[str(n)[-1] for n in nums]))
r = [(n+9) // 10 for n in nums]
print(sum(r)*10-(10-min(l)))

Submission status: Runtime Error

Solution code:
# 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

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)

Submission status: Runtime Error

Solution code:
# coding: utf-8
# Your code here!

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

minr = 9
minf = 0
for f in food:
    if f % 10 != 0 :
        if f % 10 < minr :
            minr = f % 10
            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)

Submission status: Runtime Error

Solution code:
t = 0
l = [int(input()) for i in range(5)]
min1 = 9
minN = 0
for i in l:
    if i%10 != 0:
        if i%10 < min1:
            min1 = i%10
            minN = i
l.remove(minN)
l.append(minN)

for i in range(5):
    if(l[i]%10 != 0 and i != 4):
        t += int(l[i]/10) * 10 + 10

    elif l[i]%10 == 0 or i == 4:
        t += l[i]
    
print(t)

Submission status: Runtime Error

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

l = [a, b, c, d, e]
s = []
for i in l:
    if i % 10 > 0:
        s.append(10 - (i % 10))    
s.sort()
del s[-1]
ans = sum(l) + sum(s)
print(ans)

Submission status: Runtime Error

Solution code:
dishes = [int(input()) for i in range(5)]

ans = 0
min_digits = 10
digits_idx = 0
for idx, dish in enumerate(dishes):
  ans += dish + 10 - dish%10
  if dish%10 < min_digits:
    digits_idx = idx
  	min_digits = dish%10
ans -= (10 - dishes[digits_idx]%10)
print(ans)

Submission status: Runtime Error

Solution code:
dishes = [int(input()) for i in range(5)]

ans = 0
min_digits = 10
digits_idx = 0
for idx, dish in enumerate(dishes):
  ans += round(dish, -1)
  if dish%10 < mindigits:
    digits_idx = idx
  	min_digits = dish%10
ans = ans + dishes[digits_idx] - round(dishes[digits_idx], -1)
print(ans)

Submission status: Runtime Error

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

L = [A, B, C, D, E]
S = []
for l in L:
    if l % 10 != 0:
        S.append(l % 10)
min_s = min(S)

s = 0
flag = True
for l in L:
    if flag and min_s == l % 10:
        s += l
        flag = False
    elif 0 == l % 10:
        s += l
    else:
        s += 10 * (l // 10) + 10
print(s)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = [int(input()) for _ in range(5)]
b = min([i%10 for i in a if i%10 != 0])
print(sum([((i + 9)//10 *10) for  i in a]) - (10-b) )

Submission status: Runtime Error

Solution code:
sum = 0
time_list = []
for i in range(5):
    time = int(input())
    if time%10 == 0:
        sum += time
    else:
        time_list.append([time, time-time%10+10, time%10])

time_list.sort(key=lambda x: x[2])
sum += time_list.pop(0)[0]
for t in time_list:
    sum += t[1]

print(sum)

Submission status: Runtime Error

Solution code:
a = [int(input()) for i in range(5)] 
b=[]
c=[]
d=0
t=0
sum=0
for i in range(5):
  if a[i]%10==0:
    b.append((a[i]//10)*10)
    c.append(10) 
  else:
    b.append((a[i]//10+1)*10)
    c.append(a[i]%10) 
for i in range(5):
  if (c[i]!=min(c) or t=1):
    sum+=b[i]
  else:
    d+=i
    t+=1
print(sum+a[d])

Submission status: Runtime Error

Solution code:
a = [int(input()) for i in range(5)] 
b=[]
c=[]
d=0
t=0
sum=0
for i in range(5):
  if a[i]%10==0:
    b.append((a[i]//10)*10)
    c.append(10) 
  else:
    b.append((a[i]//10+1)*10)
    c.append(a[i]%10) 
for i in range(5):
  if c[i]!=min(c):
    sum+=b[i]
  else:
    d+=i
    t+=1
print(sum+a[d])

Submission status: Runtime Error

Solution code:
a = [int(input()) for i in range(5)] 
b=[]
c=[]
d=0
t=0
sum=0
for i in range(5):
  if a[i]%10==0:
    b.append((a[i]//10)*10)
    c.append(10) 
  else:
    b.append((a[i]//10+1)*10)
    c.append(a[i]%10) 
for i in range(5):
  if c[i]!=min(c):
    sum+=b[i]
  else:
    d+=i
print(sum+a[d])

Submission status: Runtime Error

Solution code:
a = [int(input()) for i in range(5)] 
b=[]
c=[]
d=0
t=0
sum=0
for i in range(5):
  if a[i]%10==0:
    b.append((a[i]//10)*10)
    c.append(10) 
  else:
    b.append((a[i]//10+1)*10)
    c.append(a[i]%10) 
for i in range(5):
  if c[i]!=min(c) or t=1:
    sum+=b[i]
  else:
    d+=i
    t+=1
print(sum+a[d])

Submission status: Runtime Error

Solution code:
a = [int(input()) for i in range(5)] 
b=[]
c=[]
d=0
t=0
sum=0
for i in range(5):
  if a[i]%10==0:
    b.append((a[i]//10)*10)
    c.append(10) 
  else:
    b.append((a[i]//10+1)*10)
    c.append(a[i]%10) 
for i in range(5):
  if c[i]!=min(c) or t=1:
    sum+=b[i]
  else:
    d+=1
    t+=1
print(sum+a[d])

Submission status: Runtime Error

Solution code:
a = [int(input()) for i in range(5)] 
b=[]
c=[]
d=0
t=0
sum=0
for i in range(5):
  if a[i]%10==0:
    b.append((a[i]//10)*10)
    c.append(10) 
  else:
    b.append((a[i]//10+1)*10)
    c.append(a[i]%10) 
for i in range(5):
  if c[i]!=min(c) or t=1:
    sum+=b[i]
  else:
     d+=i
      t+=1
print(sum+a[d])

Submission status: Runtime Error

Solution code:
a = [int(input()) for i in range(5)] 
b=[]
c=[]
d=0
sum=0
for i in range(5):
  if a[i]%10==0:
    b.append(a[i])
    c.append(10) 
  else:
    b.append(a[i]+(10-(a[i]%10)))
    c.append(a[i]%10) 
for i in range(5):
  if c[i]!=min(c) or t=1:
    sum+=b[i]
  else:
      d+=i
      t=1
print(sum+a[d])

Submission status: Runtime Error

Solution code:
a = [int(input()) for i in range(5)] 
b=[]
c=[]
d=0
t=0
sum=0
for i in range(5):
  if a[i]%10==0:
    b.append(a[i])
    c.append(10) 
  else:
    b.append(a[i]+(10-(a[i]%10)))
    c.append(a[i]%10) 
for i in range(5):
  if c[i]!=min(c) or t=1:
    sum+=b[i]
  else:
      d+=i
      t+=1
print(sum+a[d])

Submission status: Runtime Error

Solution code:
a = [int(input()) for i in range(5)] 
b=[]
c=[]
d=0
t=0
sum=0
for i in range(5):
  if a[i]%10==0:
    b.append(a[i])
    c.append(10) 
  else:
    b.append(a[i]+(10-(a[i]%10)))
    c.append(a[i]%10) 
for i in range(5):
  if c[i]!=min(c) or t=1:
    sum+=b[i]
  else:
     d+=i
     t+=1
print(sum+a[d])

Submission status: Runtime Error

Solution code:
a = [int(input()) for i in range(5)] 
b=[]
c=[]
d=0
sum=0
t=0
for i in range(5):
  if a[i]%10==0:
    b.append(a[i])
    c.append(10) 
  else:
    b.append(a[i]+(10-(a[i]%10)))
    c.append(a[i]%10) 
for i in range(5):
  if c[i]=min(c) and t!=4:
      d+=i
      t+=1
  else:
     sum+=b[i]
print(sum+a[d])