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:
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) and i!=4:
    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
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) and i!=5:
    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
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):
    sum+=b[i]
  else:
     d+=i
print(sum+a[d])

Submission status: Runtime Error

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

n_ = []
for i in n:
    if i % 10 == 0:
        continue
    n_.append(10 - i % 10)

print(sum(n) + sum(n_) - max(n_))

Submission status: Runtime Error

Solution code:
ABCDE=[]
modABCDE=[]
for i in range(5):
  ABCDE+=[int(input())]
  if ABCDE[i]%10!=0:
    modABCDE+=[ABCDE[i]%10]  
MIN=min(modABCDE)
ans=sum(ABCDE)-sum(modABCDE)+(len(modABCDE)-1)*10+MIN
print(ans)

Submission status: Runtime Error

Solution code:
# coding: utf-8
import time
import re
import math
import fractions

def main():
    lst=[int(input()) for a in range(5)]
    lst2=[]
    index=0
    mx=0
    total=0
    for a in range(len(lst)):
        if math.ceil(list[a]/10)*10-list[a]>mx:
            mx=math.ceil(list[a])-list[a]
            index=a
    for a in range(len(lst)):
        if a==index:
            total+=lst[a]
        else:
            total+=math.ceil(lst[a]/10)*10
    print(total)
    
start=time.time()
main()
#print("処理速度 {}sec".format(time.time()-start))
#"YNeos"[True::2]
#A=list(map(int,input().split()))
#A,B,C=map(int,input().split())
#n=int(input())
# global n,A,s,memo,mx,mn,L,B

Submission status: Runtime Error

Solution code:
# coding: utf-8
import time
import re
import math
import fractions

def main():
    lst=[int(input()) for a in range(5)]
    index=0
    mn=1e9
    for a in range(len(lst)):
        if lst[a]<mn:
            mn=lst[a]
            index=a
    print(sum(list(map(lambda x:math.ceil(x/10)*10,lst))-(10-mn%10)))

    
    
start=time.time()
main()
#print("処理速度 {}sec".format(time.time()-start))
#"YNeos"[True::2]
#A=list(map(int,input().split()))
#A,B,C=map(int,input().split())
#n=int(input())
# global n,A,s,memo,mx,mn,L,B

Submission status: Runtime Error

Solution code:
# coding: utf-8
import time
import re
import math
import fractions

def main():
    list=[int(input()) for a in range(5)]
    index=0
    mn=1e9
    for a in range(len(list)):
        if list[a]<mn:
            mn=list[a]
            index=a
    print(sum(list(map(lambda x:math.ceil(x/10)*10,list))-(10-mn%10)))

    
    
start=time.time()
main()
#print("処理速度 {}sec".format(time.time()-start))
#"YNeos"[True::2]
#A=list(map(int,input().split()))
#A,B,C=map(int,input().split())
#n=int(input())
# global n,A,s,memo,mx,mn,L,B

Submission status: Runtime Error

Solution code:
# coding: utf-8
import time
import re
import math
import fractions

def main():
    list=[int(input()) for a in range(5)]
    index=0
    mn=1e9
    for a in range(len(list)):
        if list[a]<mn:
            mn=list[a]
            index=a
    print(sum(list(map(lambda x:math.ceil(x/10)*10),list))-(10-mn%10))

    
    
start=time.time()
main()
#print("処理速度 {}sec".format(time.time()-start))
#"YNeos"[True::2]
#A=list(map(int,input().split()))
#A,B,C=map(int,input().split())
#n=int(input())
# global n,A,s,memo,mx,mn,L,B

Submission status: Runtime Error

Solution code:
# coding: utf-8
import time
import re
import math
import fractions

def main():
    list=[int(input()) for a in range(5)]
    index=0
    mn=1e9
    for a in range(len(list)):
        if list[a]<mn:
            mn=list[a]
            index=a
    print(sum(map(lambda x:math.ceil(x/10)*10),list)-(10-mn%10))

    
    
start=time.time()
main()
#print("処理速度 {}sec".format(time.time()-start))
#"YNeos"[True::2]
#A=list(map(int,input().split()))
#A,B,C=map(int,input().split())
#n=int(input())
# global n,A,s,memo,mx,mn,L,B

Submission status: Runtime Error

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

f_list = []
for i in lists:
	f_list.append(i[-1])

mins = 0
if not "0" in f_list:
    mins = int(min(f_list))
else:
    mins = int(sorted(set(f_list))[1])
sums = 0
for i in lists:
	sums += int((int(i)+9)/10)*10


print(sums-10+mins)

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]
min = 0

for i in range(1,len(L)):
    if L[i-1] % 10 > L[i] % 10 and L[i] % 10 != 0 :
        min = L[i]
L.remove(min)
for i in range(len(L)):
    if L[i] % 10 != 0:
        L[i] = L[i] + 10 - L[i] % 10

print(sum(L) + min)

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]
min = 0

for i in range(1,len(L)):
    if L[i-1] % 10 > L[i] % 10 and L[i] % 10 != 0 :
        min = L[i]
L.remove(min)
for i in range(len(L)):
    if L[i] % 10 != 0:
        L[i] = L[i] + 10 - L[i] % 10

print(sum(L) + min)

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]
min = 0

for i in range(len(1,L)):
    if L[i-1] > L[i]:
        min = L[i]
L.remove(min)
for i in range(Len(L)):
    Len[i] = Len[i] + 10 - Len[i] % 10

print(sum(Len) + min)

Submission status: Runtime Error

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

mod = []
for i in time:
    mod.append(i % 10)

mod = [i for i in mod if i != 0]

for i in range(len(mod)):
    mod[i] = 10 - mod[i]

add = sum(mod) - max(mod)

print(sum(time) + add)

Submission status: Runtime Error

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

modmin = [10, -1]
for i in range(5):
    if dish_list[i] % 10 != 0:
        count += 1
        if  dish_list[i] % 10 < modmin[0]:
            modmin[0] = dish_list[i] % 10
            modmin[1] = i

if modmin[1] == -1:
    ans = sum(dish_list)
else:
    ans = 0
    for i in range(5):
        if dish_list[i] % 10 != 0 and i != modmin[1]:
            b = dish_list[i] + (10- (dish_list[i] % 10))
        else:
            b = dish_list[i] 
        ans += b

print(ans)

Submission status: Runtime Error

Solution code:
l = [int(input()) for i in range(5)]
l.sort()
print(max(l[0]-40, l[1]-30, [2]-20, l[3]-10, l[4]))

Submission status: Runtime Error

Solution code:
# import sys
# 
# input = sys.stdin.readline

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

exist_remainder_list = [(food, food % 10) for food in foods if food % 10 != 0]

last = min(exist_remainder_list, key=lambda value: value[1])

foods.remove(last[0])

ans = 0

for index, food in enumerate(foods):
    ans += food
    while True:
        if ans % 10 == 0:
            break
        else:
            ans += 1

print(ans + last[0])

Submission status: Runtime Error

Solution code:
import sys

input = sys.stdin.readline

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

exist_remainder_list = [(food, food % 10) for food in foods if food % 10 != 0]

last = min(exist_remainder_list, key=lambda value: value[1])

foods.remove(last[0])

ans = 0

for index, food in enumerate(foods):
    ans += food
    while True:
        if ans % 10 == 0:
            break
        else:
            ans += 1

print(ans + last[0])

Submission status: Runtime Error

Solution code:
li = []
lis = []
time = 0
for i in range(5):
    li.append(int(input()))
    lis.append(li[i] % 10)
lista = sorted(lis)
a = lista
for i in range(5):
    if lista[i] != 0:
        a = lista[i]
        break
last = lis.index(a)
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])

Submission status: Runtime Error

Solution code:
li = []
lis = []
time = 0
for i in range(5):
    li.append(int(input()))
    lis.append(li[i] % 10)
lista = sorted(lis)
for i in range(5):
    if lista[i] != 0:
        a = lista[i]
        break
last = lis.index(a)
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])

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
num = []
iti = []

for temp in range(5):
    temp2 = input()
    temp3 = int(temp2)
    if temp3 >= 10 and temp2[-2] != "0":
        num.append((int(temp2[0:-2])+1)*10)
    elif temp2[-2] == "0":
        num.append(int(temp2[0:-2])*10)
    else:
        num.append(10)
    if int(temp2[-2]) != 0:
        iti.append(int(temp2[-2]))

print(sum(num)-10+min(iti))

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
num = []
iti = []

for temp in range(5):
    temp2 = input()
    temp3 = int(temp2)
    if temp3 > 10 and temp2[-2] != "0":
        num.append((int(temp2[0:-2])+1)*10)
    elif temp2[-2] == "0":
        num.append(int(temp2[0:-2])*10)
    else:
        num.append(10)
    if int(temp2[-2]) != 0:
        iti.append(int(temp2[-2]))

print(sum(num)-10+min(iti))

Submission status: Runtime Error

Solution code:
A = str(input())
B = str(input())
C = str(input())
D = str(input())
E = str(input())
a = int(A[-1:])
b = int(B[-1:])
c = int(C[-1:])
d = int(D[-1:])
e = int(E[-1:])
F = [a,b,c,d,e]
G = F.count(0)
H = (10-a)+(10-b)+(10-c)+(10-d)+(10-e)
p = 9 if a == 0 else a
q = 9 if b == 0 else b
r = 9 if c == 0 else c
s = 9 if d == 0 else d
t = 9 if e == 0 else e
I = min([p,q,r,s,t])
J = int(A) +int(B) +int(C) + int(D) + int(E)
K = -10*G + I -10
if G==5:
  print(J)
else:

Submission status: Runtime Error

Solution code:
ls = [int(input()) for i in range(5)]
ans = []
num = 0
minNum = 10
    
for j in ls:
    x = j % 10
    if x < minNum and x > 0:
        num = j
        minNum = x
ans.append(num)
ls.pop(ls.index(num))

for i in ls:
    y = ((i + 9) // 10) * 10
    ans.append(y)

print(sum(ans))

Submission status: Runtime Error

Solution code:
ls = [int(input()) for i in range(5)]
ans = []
num = 0
minNum = 10
    
for j in ls:
    x = j % 10
    if x < minNum and x != 0:
        num = j
        minNum = x
ans.append(num)
ls.pop(ls.index(num))

for i in ls:
    y = ((i + 9) // 10) * 10
    ans.append(y)


print(sum(ans))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
one = []
ten = []

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

for i in range(5):
    one.append(menu[i] % 10)
    ten.append(menu[i] // 10)

for i in range(5):
    if one[i] == 0:
        one[i] = 10

one_min = min(one)

for i in range(5):
    if one[i] == 10:
        one[i] = 0

for i in range(5):
    if one_min == one[i]:
        one_min_idx = i

total = 0

for i in range(5):
    if one_min_idx != i:
        if one[i] == 0:
            total += ten[i] * 10
        else:
            total += ten[i] * 10 + 10

total += menu[one_min_idx]

print(total)

Submission status: Runtime Error

Solution code:
one = []
ten = []

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

for i in range(5):
    one.append(menu[i] % 10)
    ten.append(menu[i] // 10)

for i in range(5):
    if one[i] == 0:
        one[i] = 10000000

one_min = min(one)

for i in range(5):
    if one[i] == 10000000:
        one[i] = 0

for i in range(5):
    if one_min == one[i]:
        one_min_idx = i

total = 0

for i in range(5):
    if one_min_idx != i:
        if one[i] == 0:
            total += ten[i] * 10
        else:
            total += ten[i] * 10 + 10

total += menu[one_min_idx]

print(total)

Submission status: Runtime Error

Solution code:
one = []
ten = []

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

for i in range(5):
    one.append(menu[i] % 10)
    ten.append(menu[i] // 10)

for i in range(5):
    if one[i] == 0:
        one[i] = 100

one_min = min(one)

for i in range(5):
    if one[i] == 100:
        one[i] = 0

for i in range(5):
    if one_min == one[i]:
        one_min_idx = i

total = 0

for i in range(5):
    if one_min_idx != i:
        if one[i] == 0:
            total += ten[i] * 10
        else:
            total += ten[i] * 10 + 10

total += menu[one_min_idx]

print(total)

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]//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
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
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
sum=0
for i in range(5):
  if a[i]%10==0:
      b.append((a[i]//10)*10)
      c.append(a[i]%10+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 = list(int(i) for i in input().split())  
b=[]
c=[]
d=0
sum=0
for i in range(5):
  if a[i]%10==0:
      b.append((a[i]//10)*10)
      c.append(a[i]%10+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 = list(int(i) for i in input().split())  
b=[]
c=[]
d=0
sum=0
for i in range(5):
  c.append(a[i]%10) 
  if a[i]%10==0:
      b.append((a[i]//10)*10)
      c.append(a[i]%10+10) 
  else:
    b.append((a[i]//10+1)*10)
    c.append(a[i]%10) 
for i in ragne(5):
  if c[i]!=min(c):
    sum+=a[i]
  else:
    d+=i
print(sum+a[d])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x=[int(input()) for _ in range(5)]
y=[x[_]%10 for _ in range(5)]
y.sort()
s=0
for _ in range(5):
  if y[_]!=0:
    a=y[_]
    s=-1
    break
for _ in range(5):
  s=s-(-x[_] // 10)
print((s)*10+a)

Submission status: Runtime Error

Solution code:
import math
import sys
import numpy

a = list(mat(int,input().split()))
b = []
for i in range(5):
    b.append(a[i]%10)
mx = min(b)
ans = 0
for i in range(5):
    if mx == a[i]:
        continue
    else :
        ans += (a[i]+10-(a[i]%10))
ans += mx
print(ans)

Submission status: Runtime Error

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

a_one = [i % 10 for i in a if i % 10 != 0]
a_aaa = [i for i in a if i % 10 != 0]
a_aa = [i // 10 * 10 + 10 for i in a if i % 10 != 0]
a_two = [i for i in a if i % 10 == 0]
a_last = a_one.index(min(a_one))

ans = 0

for i in range(len(a_aa)):
    if i == a_last:
        continue
    else:
        ans += a_aa[i]

for i in a_two:
    ans += i

ans += a_aaa[a_last]
print(ans)

Submission status: Runtime Error

Solution code:
# A = int(input())
# B = int(input())
# C = int(input())
# D = int(input())
# E = int(input())
M = [int(input()) for _ in range(5)]
m = []
T = 0
for i in range(5):
    if M[i] % 10 == 0:
        T += M[i]
    else:
        T += M[i]
        T += 10 - M[i] % 10
        m.append(M[i] % 10)
print(T - (10 - min(m)))

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
M = [A, B, C, D, E]
n = []
T = 0
for i in range(5):
    if M[i] % 10 == 0:
        T += M[i]
    else:
        T += M[i]
        T += 10 - M[i] % 10
        n.append(M[i] % 10)
print(T - (10 - min(n)))

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
M = [A, B, C, D, E]
N = []
n = []
T = 0
for i in range(5):
    if M[i] % 10 == 0:
        T += M[i]
    else:
        T += M[i]
        T += 10 - M[i] % 10
        n.append(M[i] % 10)
print(T - (10 - min(n)))

Submission status: Runtime Error

Solution code:
A = [int(input()) for _ in range(5)]
ans = 0
I = [i for i, a in enumerate(A) if a % 10 == 0]
for i in reversed(I):
    ans += A.pop(i)
A.sort(key=lambda a: a % 10)
ans += A.pop(0)
for i in range(len(A)):
    A[i] += 10 - (A[i] % 10)
ans += sum(A)
print(ans)

Submission status: Runtime Error

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

ans = 0
tmp = []

for i in range(len(L)):
    if(L[i]%10 == 0):
        ans += L[i]
    else:
        ans += L[i] + (10 - L[i]%10)
        tmp.append(L[i]%10)

ans -= 10 - min(tmp)

print(ans)

Submission status: Runtime Error

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

ans = 0
tmp = []

for i in range(len(L)):
    if(L[i]%10 == 0):
        ans += L[i]
    else:
        ans += L[i] + (10 - L[i]%10)
        tmp.append(L[i]%10)

ans -= min(tmp)

print(ans)

Submission status: Runtime Error

Solution code:
time = [int(input()) for i in range(5)]
result = 0
a = []

for i in range(5):
    if time[i] % 10 == 0:
        result += time[i]
    else:
        result += ((time[i] // 10)+1)*10
        a.append(time[i] % 10)
print(result - (10 - min(a)))

Submission status: Runtime Error

Solution code:
time = [int(input()) for i in range(5)]
result = 0
a = []

for i in range(5):
    if time[i] % 10 == 0:
        result += time[i]
        print(result)
    else:
        result += ((time[i] // 10)+1)*10
        a.append(time[i] % 10)
        print(result)
print(result - (10 - min(a)))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

li = [A,B,C,D,E]
li_nonzero=[]

for x in li:
    if x % 10 != 0:
        li_nonzero.append(x)

z = li_nonzero[0]%10
for y in li_nonzero:
    if y % 10 <= z:
        z = y%10
        last_menu = y
        
li.remove(last_menu)

if len(li) > 4:
    while(len(li)==4):
        li.append(last_menu)
sum_time = 0
for menu in li:
    if menu % 10 != 0:
        sum_time = sum_time +( (menu//10)*10+10)
    else:
        sum_time = sum_time +( (menu//10)*10+0)
        
    
print(sum_time+last_menu)

Submission status: Runtime Error

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

li = [A,B,C,D,E]
li_nonzero=[]

for x in li:
    if x % 10 != 0:
        li_nonzero.append(x)

z = li_nonzero[0]%10
for y in li_nonzero:
    if y % 10 <= z:
        z = y%10
        last_menu = y
        
li.remove(last_menu)

if len(li) != 4:
    while(len(li)==4):
        li.append(last_menu)
sum_time = 0
for menu in li:
    if menu % 10 != 0:
        sum_time = sum_time +( (menu//10)*10+10)
    else:
        sum_time = sum_time +( (menu//10)*10+0)
        
    
print(sum_time+last_menu)

Submission status: Runtime Error

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

li = [A,B,C,D,E]
li_nonzero=[]

for x in li:
    if x % 10 != 0:
        li_nonzero.append(x)

z = li_nonzero[0]%10
for y in li_nonzero:
    if y % 10 <= z:
        z = y%10
        last_menu = y
        
li.remove(last_menu)

if len(li) != 4:
    while(len(li)==4):
        li.append(last_menu)
sum_time = 0
for menu in li:
    if menu % 10 != 0:
        sum_time = sum_time +( (menu//10)*10+10)
    else:
        sum_time = sum_time +( (menu//10)*10+0)
        
    
print(sum_time+last_menu)

Submission status: Runtime Error

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

li = [A,B,C,D,E]
li_nonzero=[]

for x in li:
    if x % 10 != 0:
        li_nonzero.append(x)

z = li_nonzero[0]%10
for y in li_nonzero:
    if y % 10 <= z:
        z = y%10
        last_menu = y
        
li.remove(last_menu)
sum_time = 0
for menu in li:
    if menu % 10 != 0:
        sum_time = sum_time +( (menu//10)*10+10)
    else:
        sum_time = sum_time +( (menu//10)*10+0)
        
    
print(sum_time+last_menu)

Submission status: Runtime Error

Solution code:
Time = []
Time_Zero = []

for i in range(5):
    A = int(input())
    ra = A%10
    qa = A//10
    if ra == 0:
      Time_Zero.append([ra,qa,A])
    else:
      Time.append([ra,qa,A])

Time.sort(reverse=True)

ans = 0
for r,q,A in Time_Zero:
  ans += 10*q

for r,q,A in Time:
  ans += 10*(q+1)

ans += Time[-1][2] - 10*(Time[-1][1]+1)

print(ans)

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
import math
f=min([a%10,b%10,c%10,d%10,e%10])
v=math.ceil(a//10) * 10
w=math.ceil(b//10) * 10
x=math.ceil(c//10) * 10
y=math.ceil(d//10) * 10
z=math.ceil(e//10) * 10
print ({0}.format.v+w+x+y+z-10+f)

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
import math
f=min([a%10,b%10,c%10,d%10,e%10])
v=math.ceil(a%10) * 10
w=math.ceil(b%10) * 10
x=math.ceil(c%10) * 10
y=math.ceil(d%10) * 10
z=math.ceil(e%10) * 10
print ({0}.format.v+w+x+y+z-10+f)

Submission status: Runtime Error

Solution code:
# B - Five Dishes
import math

n = []
for _ in range(5):
    n.append(int(input()))

mini = 10
for y, x in enumerate(n):
    rest = x % 10 
    if rest != 0:
        if rest < mini:
            mini = rest
            mini_num = y 
            
time = n.pop(mini_num)
for x in n:
    if x % 10 != 0:
        item = math.ceil(x/10)*10
        time += item
    elif x%10 == 0:
        time += x
    
print(time)

Submission status: Runtime Error

Solution code:
# B - Five Dishes

n = []
for _ in range(5):
    n.append(int(input()))

mini = 10
for y, x in enumerate(n):
    rest = x % 10 
    if rest != 0:
        if rest < mini:
            mini = rest
            mini_num = y 
            
time = n.pop(mini_num)
for x in n:
    if x % 10 != 0:
        item = math.ceil(x/10)*10
        time += item
    elif x%10 == 0:
        item = x
        time += item
    
print(time)

Submission status: Runtime Error

Solution code:
# B - Five Dishes

n = []
for _ in range(5):
    n.append(int(input()))

mini = 10
for y, x in enumerate(n):
    rest = x % 10 
    if rest != 0:
        if rest < mini:
            mini = rest
            mini_num = y 
            
time = n.pop(mini_num)
for x in n:
    if x % 10 != 0:
        item = math.ceil(x/10)*10
        time += item
    else:
        item = x
        time += item
    
print(time)

Submission status: Runtime Error

Solution code:
# B - Five Dishes

n = []
for _ in range(5):
    n.append(int(input()))

mini = 10
for y, x in enumerate(n):
    rest = x % 10 
    if rest != 0:
        if rest < mini:
            mini = rest
            mini_num = y 
            
time = n.pop(mini_num)
for x in n:
    if x % 10 != 0:
        item = x + (10-x%10)
        time += item
    else:
        item = x
        time += item
    
print(time)

Submission status: Runtime Error

Solution code:
# B - Five Dishes

n = []
# n = [29, 20, 7, 35, 120]
for _ in range(5):
    n.append(int(input()))

mini = 10
for y, x in enumerate(n):
    rest = x % 10 
    if rest != 0:
        if rest < mini:
            mini = rest
            mini_num = y 
            
# print(mini)
# print(mini_num)

# print(n.pop(mini_num))

time = n.pop(mini_num)
print(n)
for x in n:
    if x % 10 != 0:
        item = x + (10-x%10)
        time += item
    else:
        item = x
        time += item
#     print('item:', item)
#     print(time)
    
print(time)

Submission status: Runtime Error

Solution code:
def tenth(a):
  temp = a
  while True:
    if temp % 10 == 0:
      return temp
    else:
      temp += 1

li = list()
ans = 0

for i in range(5):
  li[i] = int(input())
  ans += tenth(li[i])
  li[i] = tenth(li[i]) - li[i]
  
ans -= min(li)

print(ans)

Submission status: Runtime Error

Solution code:
def tenth(a):
  temp = a
  if temp % 10 == 0:
    return temp
  else:
    temp += 1

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

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

Submission status: Runtime Error

Solution code:
def tenth(int a):
  temp = a
  if temp % 10 == 0:
    return temp
  else:
    temp += 1

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

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

Submission status: Runtime Error

Solution code:
def tenth(int a):
  if a % 10 == 0:
    return a
  else:
    a += 1

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

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

Submission status: Runtime Error

Solution code:
order_time = [0, 0, 0, 0, 0]
order = len(order_time)
time = 0
last_order = 9
count_change = 0

for i in range(0, order):
    order_time[i] = int(input())
    if (order_time[i] % 10 != 0) and (order_time[i] % 10 <= last_order % 10):
        last_order = order_time[i]
        count_change += 1

if count_change == 0:
    last_order = order_time[i]

for i in range(0, order):
    if order_time[i] % 10 != 0:
        time += order_time[i] // 10 * 10 + 10
    else:
        time += order_time[i]

time -= last_order // 10 * 10 + 10
time += last_order

print(time)
order_time = [0, 0, 0, 0, 0]
order = len(order_time)
time = 0
last_order = 9
count_change = 0

for i in range(0, order):
    order_time[i] = int(input())
    if (order_time[i] % 10 != 0) and (order_time[i] % 10 <= last_order % 10):
        last_order = order_time[i]
        count_change += 1

for i in range(0, order):
    if order_time[i] % 10 != 0:
        time += order_time[i] // 10 * 10 + 10
    else:
        time += order_time[i]

if count_change == 0:
    last_order = order_time[i]
else:
    time -= last_order // 10 * 10 + 10
    time += last_order

print(time)

Submission status: Runtime Error

Solution code:
i = [int(input()) for i in range(5)]
i2 = [i2 for i2 in i if i2%10 != 0]
min == 0
min=i2[len(i2)-1]
if min == 0:
    min == i[len(i)]
count = 0
for x in i:
    if 0 < x % 10 < min % 10:
        min = x
        count += 1
i.remove(min)

for x in i:
    if x % 10 != 0:
        index = i.index(x)
        x += 10 - x % 10
        i[index] = x

i.append(min)

print(sum(i))

Submission status: Runtime Error

Solution code:
i = [int(input()) for i in range(5)]
i2 = [i2 for i2 in i if i2%10 != 0]
min=i2[len(i2)-1]
count = 0
for x in i:
    if 0 < x % 10 < min % 10:
        min = x
        count += 1
i.remove(min)

for x in i:
    if x % 10 != 0:
        index = i.index(x)
        x += 10 - x % 10
        i[index] = x

i.append(min)

print(sum(i))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
i = [int(input()) for i in range(5)]
min = 9
for x in i:
    if 0 <  x % 10 < min % 10:
        min = x
i.remove(min)

for x in i:
    if x % 10 != 0:
        index = i.index(x)
        x += 10 - x % 10
        i[index] = x

i.append(min)
print(sum(i))