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

list = []
for i in range(5):
    list.append(int(input()))
sum = 0
zeroList = [list[i] for i in range(len(list)) if list[i]%10 == 0]
otherList = [list[i] for i in range(len(list)) if not list[i]%10 == 0]
def func(x):
    return x % 10
otherList.sort(key=func)
for i in range(len(zeroList)):
    sum += zeroList[i]
for i in (otherList[1:]):
    sum += math.ceil(i/10)*10
sum += otherList[0]
print(sum)

Submission status: Runtime Error

Solution code:
import math

list = []
for i in range(5):
    a = int(input())
    list.append(a)
sum = 0
zeroList = [list[i] for i in range(len(list)) if list[i]%10 == 0]
otherList = [list[i] for i in range(len(list)) if not list[i]%10 == 0]
def func(x):
    return x % 10
otherList.sort(key=func)
print(otherList)
for i in range(len(zeroList)):
    sum += zeroList[i]
    print(sum)
for i in (otherList[1:]):
    sum += math.ceil(i/10)*10
sum += otherList[0]
print(sum)

Submission status: Runtime Error

Solution code:
import sys
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def II(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def SI(): return input()
YN = lambda b: print('YES') if b else print('NO')
yn = lambda b: print('Yes') if b else print('No')

li = []
for i in range(5):
    li.append(II())

sum_ = 0
li_mod = []
for i in li:
    if i%10 == 0:
        sum_ += i
    else:
        sum_ += ((i//10)+1)*10
        li_mod.append(10-i%10)
sum_ -= max(li_mod)

print(sum_)

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:
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)
print(t - max(cnt_l))

Submission status: Runtime Error

Solution code:
a,b,c,d,e=[int(input()) for i in range(5)]
a1=a//10
a2=a%10
if a2==0:
    a1-=1
    a2=10
b1=b//10
b2=b%10
if b2==0:
    b1-=1
    b2=10
c1=c//10
c2=c%10
if c2==0:
    c1-=1
    c2=10
d1=d//10
d2=d%10
if d2==0:
    d1-=1
    d2=10
n=e//10
m=e%10
if m==0:
    n-=1
    m=10
min1=min(a2,b2,c2,d2,m)
    ans=(a1+b1+c1+d1+n+4)*10+min1
print(ans)

Submission status: Runtime Error

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

min = 9
num = 0
 for i in range(len(A)):
    if min > A[i]%10 and A[i] % 10 != 0:
      min = A[i]%10
      num = i
      
ans = 0
for i in range(5):
  ans = ans + int(A[i]/10)
ans = ans + A[num] % 10

print(ans)

Submission status: Runtime Error

Solution code:
t=0
for i in sorted(map(int,[*open(0)]),key=lambda x:-x%10-(x%10<1)):t+=i+(10-t)%10
print(t)

Submission status: Runtime Error

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

result = 0

hasuu = [item % 10 for item in [A, B, C, D, E] if item % 10 != 0]

for item in [A, B, C, D, E]:
  if item % 10 == 0:
    result += item 
  else:
    result += (item // 10 + 1) * 10
    
result = int(result - 10 + min(hasuu))
print(result)

Submission status: Runtime Error

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

hasuu = [item % 10 if item % 10 != 0 
         for item in [A, B, C, D, E]]

for item in [A, B, C, D, E]:
  if item % 10 == 0:
    result += item 
  else:
    result += (item // 10 + 1) * 10
    
result = int(result - 10 + min(hasuu))
print(result)

Submission status: Runtime Error

Solution code:
n = [int(input()) for _ in range(5)]
minNum = 9
x = 0
for i in n:
    if i % 10 < minNum and i % 10 != 0:
        minNum = i % 10
        x = i
n.pop(n.index(x))
total = x
for j in n:
    total += ((j + 9) // 10) * 10
print(total)

Submission status: Runtime Error

Solution code:
n = [int(input()) for _ in range(5)]
minNum = 9
x = 0
for i in n:
    if i % 10 < minNum and i % 10 != 0:
        minNum = i % 10
        x = i
n.pop(n.index(x))
total = x
print(total)
for j in n:
    total += ((j + 9) // 10) * 10
print(total)

Submission status: Runtime Error

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

num=[]
min=10
  
for list in time:
  if list%10==0:
    num.append(list)
  else:
    num.append(list+(10-list%10))
    if min>list%10:
      min=list%10

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

Submission status: Runtime Error

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

sorted(n, key=lambda x: x % 10)

for i in range(1, 5):
    n[i] = 10 * (n[i]//10+1)

sm = sum(n)
print(sm)

Submission status: Runtime Error

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

n.sort(key=lambda x: x % 10)

for i in range(1, 5):
    n[i] = 10 * (n[i]//10+1)

sm = sum(n)
print(sm)

Submission status: Runtime Error

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

n.sort(key=lambda x: x % 10)

for i in range(1, 5):
    n[i] = 10 * (n[i]//10+1)

sm = sum([n[i] for i in range(1, 5)])+n[0]
print(sm)

Submission status: Runtime Error

Solution code:
l=[]
for i in range(5):
    l.append(int(input()))
indexn=10
indx=0
for v in range(5):
    if l[v]%10==0:
        pass
    else:
        if l[v]%10<indexn:
            indexn=l[v]%10
            indx=v
for k in range(5):
    if k!=indx:
        l[v]=((l[v]-1)//10+1)*10
    else:
        
print(sum(l))

Submission status: Runtime Error

Solution code:
A = []
for _ in range(5):
    A.append(int(input())
ans = sum(A)
mod = [i % 10 for i in A]
ans = ans - 10 + min(mod)
print(ans)

Submission status: Runtime Error

Solution code:
a = list(map(int,input().split()))
ans = 0
tmp = 10
for i in range(5):
    if(a[i]%10 == 0):
        ans += a[i]
    else:
        ans += (a//10)*10+10
        tmp = min(tmp,a%10)
if tmp == 10:
    print(ans)
else:
    print(ans+tmp)

Submission status: Runtime Error

Solution code:
'''input
123
123
123
123
123
'''

a=[]

for i in range(5):
	a.append(int(input()))
# print(a)
flag=[]

for i in range(5):
	if a[i]%10!=0:
		flag.append(a[i]%10)
	else:
		flag.append(-1)
# print(flag)

endInd=float('inf')
end=float('inf')

for i in range(5):
	if flag[i]>0 and end>flag[i]:
		end=flag[i]
		endInd=i
# print(a[endInd])

if endInd=='inf':
	print(sum(a))
else:
	s=a[endInd]
	# print(s)
	a.pop(endInd)
	flag.pop(endInd)
	# print(a)
	for i in range(4):
		if flag[i]>0:
			a[i]=(a[i]//10+1)*10
	# print(a)
	s+=sum(a)
	print(s)

Submission status: Runtime Error

Solution code:
a,b,c,d,e = [int(input()) for i in range(5)]
count = a + b + c + d + e
l = [a%10,b%10,c%10,d%10,e%10]
s = [a%10,b%10,c%10,d%10,e%10]
m = [a%10,b%10,c%10,d%10,e%10]
for x in range(len(l)):
    if l[x] == 0:
        m.remove(0)
for i in range (len(s)):
    count = count -s[i]
ans = count + 10*len(m) + min(m) -10
print(ans)

Submission status: Runtime Error

Solution code:
A = [int(input()) for i in range(5)]
#１の位が１～９のうちで1に近いほど、最後に調理される
B = [a-a%10+10 if a % 10 != 0 else a for a in A]
diff = [(b-a) for a,b in zip(a,b)]
print(sum(B) - max(diff))

Submission status: Runtime Error

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

minutes = 0
items = [A, B, C, D, E]
rems = [item % 10 for item in items if item % 10 != 0]
cnt = len(rems)
minutes += min(rems)

for item in items:
    minutes += (item//10)*10
 
if cnt > 0:
    minutes += (cnt-1)*10

print(minutes)

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

for i in range(len(l)):
    if sur < l[i] % 10:
        sur = 10 - (l[i] % 10)
        last = i
    if l[i] % 10 != 0:
        l[i] += 10 - (l[i] % 10)

order = l[:last]+l[last+1:]
ans = (sum(order))+l[last]-sur

print(ans)

Submission status: Runtime Error

Solution code:
l = [int(input())for i in range(5)]
l1 = []*5
ans = 0
for i in range(5):
    l1[i] = l[i]%10
for i in range(5):
    ans += -(-l[i]//10)
print(ans*10 + min(l1))

Submission status: Runtime Error

Solution code:
l = [int(input())for i in range(5)]
num = l.index(min(l))
sum = 0
for i in range(5):
    if i != num:
        ans += -(-l[i] // 10)
print(ans*10 + l[num])

Submission status: Runtime Error

Solution code:
l = [int(input())for i in range(5)]
num = l.index(min(l))
sum = 0
for i in range(5):
    if i != num:
        ans += -(-l[i] // 10)
print(ans*10)

Submission status: Runtime Error

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

ans = 643

for i0 in range(5):
  tmp = i0
  tmp += (10-tmp)//10
  l = range(5)
  l.remove(i0)
  for i1 in l:
    tmp += i1
    tmp += (10-tmp)//10
    l.remove(i1)
    for i2 in l:
      tmp += i2
      tmp += (10-tmp)//10
      l.remove(i2)
      for i3 in l:
        tmp += i3
        tmp += (10-tmp)//10
        l.remove(i3)
        for i4 in l:
          tmp += i4
          ans = min(ans,tmp)
print(ans)

Submission status: Runtime Error

Solution code:

A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())
V=[]
q=[]
ANS=[]
V.append(A)
V.append(B)
V.append(C)
V.append(D)
V.append(E)
i=0
j=0

while i<5:
       p=0
       p=V[i]%10
       
       ANS.append(p)
       i+=1

while j<5:
       if ANS[j]>0:
              q.append(10-ANS[j])
       j+=1

ans=sum(q)-max(q)
print(sum(V)+ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
times = [int(input()) for i in range(5)]
rest = [times[i] % 10 for i in range(len(times))]
m = rest.index(min(rest))
total = 0
for n in len(times):
    if n == m:
        total += times[n]
    else:
        total += ((times[n]+9) // 10) * 10

print(total)

Submission status: Runtime Error

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

ans = 0
if int(l[0][-1]) <= int(l[1][-1]):
  min_val = l[0]
  ans += (-(-int(l[1])//10))*10
else:
  min_val = l[1]
  ans += (-(-int(l[0])//10))*10
  
for i in range(2, 5):
  if min_val[-1] <= int(l[i][-1]):
    ans += (-(-int(l[i])//10))*10
  else:
    ans += (-(-min_val//10))*10
    min_val = l[i]
    
ans += (-(-min_val//10))*10
print(ans)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
dishes = [a,b,c,d,e]
n = []
ans = 0
for i in range(5):
  if dishes[i]%10==0:
    ans += dishes[i]//10
  else:
    ans += dishes[i]//10+1
    n.append(dishes[i]%10)
if len(n)==0:
  print(ans*10)
else:
ans = ans*10-10+min(n)
print(ans)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
dishes = [a,b,c,d,e]
n = list()
ans = 0
for i in range(5):
  if dishes[i]%10==0:
    ans += dishes[i]//10
  else:
    ans += dishes[i]//10+1
    n.append(dishes[i]%10) 
ans = ans*10-10+min(n)
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
dishes = [a,b,c,d,e]
n = []
ans = 0
for i in range(5):
  if dishes[i]%10==0:
    ans += dishes[i]//10
  else:
    ans += dishes[i]//10+1
    n.append(dishes[i]%10)

ans = ans*10-10+min(n)
print(ans)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
dishes = [a,b,c,d,e]
ans = 0
for i in range(5):
  if dishes[i]%10=0:
    ans += dishes[i]//10
  else:
    ans += dishes[i]//10+1
print(ans*10)

Submission status: Runtime Error

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

for time in cooking_times:
    if time % 10 == 0:
        result += time
    else:
        result += time - time % 10
        fractional_times.append(time % 10)

result += (len(fractional_times) - 1) * 10
result += min(fractional_times)

print(result)

Submission status: Runtime Error

Solution code:
from decimal import Decimal, ROUND_UP

l = [int(input()) for _ in range(5)]
min_remainder = 10 - min([x%10 for x in l if x%10 > 0])
print(sum([int(Decimal(x).quantize(Decimal("1E1"), rounding=ROUND_UP)) for x in l]) - min_remainder)

Submission status: Runtime Error

Solution code:
import math
lists=list(int(input()) for i in range(5))
modlists=list(lists[j]%10 for j in range(5))
x=set(modlists)
if 0 in x:
      x.remove(0)
else:
      x=set(modlists)
            
#a=list(set(modlists).remove(0) if 0 in modlists else set(modlists))
k=modlists.index(min(x))

b=0
for m in range(5):
      b+=math.ceil(lists[m]/10)*10
print(b-math.ceil(lists[k]/10)*10+lists[k])

Submission status: Runtime Error

Solution code:
import math
lists=list(int(input()) for i in range(5))
modlists=list(lists[j]%10 for j in range(5))
a=set(modlists)
if 0 in modlists:
      a.remove(0)
else:
      a=set(modlists)
            
#a=list(set(modlists).remove(0) if 0 in modlists else set(modlists))
k=modlists.index(min(a))

b=0
for m in range(5):
      b+=math.ceil(lists[m]/10)*10
print(b-math.ceil(lists[k]/10)*10+lists[k])

Submission status: Runtime Error

Solution code:
import math
lists=list(int(input()) for i in range(5))
modlists=list(lists[j]%10 for j in range(5))
a=set(modlists)
if 0 in modlists:
      a.remove(0)
            
#a=list(set(modlists).remove(0) if 0 in modlists else set(modlists))
k=modlists.index(min(a))

b=0
for m in range(5):
      b+=math.ceil(lists[m]/10)*10
print(b-math.ceil(lists[k]/10)*10+lists[k])

Submission status: Runtime Error

Solution code:
import math

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

tmp = -10
li = [a,b,c,d,e]
for i in li:
  tmp += math.ceil(i/10)*10
li_1 = [a%10,b%10,c%10,d%10,e%10]
for i in range(5):
  try:
    li_1.remove(0)
  except:
    break
print(int(tmp + min(li_1)))

Submission status: Runtime Error

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

import math

unitsPlace = []
for i in range(5):
    if int(List[i][-1])!=0:
        unitsPlace.append(int(List[i][-1]))

minUnitsPlace = min(unitsPlace)

ceilList = [math.ceil(int(List[j])/10)*10 for j in range(5)]

res = sum(ceilList) + minUnitsPlace - 10

print(res)

Submission status: Runtime Error

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

inter_A = (A//10)*10 + 10
inter_B = (B//10)*10 + 10
inter_C = (C//10)*10 + 10
inter_D = (D//10)*10 + 10
inter_E = (E//10)*10 + 10

first_A = A + inter_B + inter_C + inter_D + inter_E
first_B = inter_A + B + inter_C + inter_D + inter_E
first_C = inter_A + inter_B + C + inter_D + inter_E
first_D = inter_A + inter_B + inter_C + D + inter_E
first_E = inter_A + inter_B + inter_C + inter_D + E
print(min[first_A, first_B, first_C, first_D, first_E])

Submission status: Runtime Error

Solution code:
a = [int(input()) for i in range(5)]
b = [0]*5
c = 0
d = 0
o = 0
def waru(k):
    global c
    if k < 4:
        b[k] = a[k]%10
        c += int(a[k]/10)
        waru(k + 1)
    else:
        b[k] = a[k]%10
        c += int(a[k]/10)
waru(0)
try:
    while True:
        b.remove(0)
except ValueError:
    o = min(b)
    b.remove(min(b))
    d = c*10 + len(b)*10 + o
    print(d)

Submission status: Runtime Error

Solution code:
a = [int(input()) for i in range(5)]
b = [0]*5
c = 0
d = 0
def waru(k):
    global c
    if k < 4:
        b[k] = a[k]%10
        c += int(a[k]/10)
        waru(k + 1)
    else:
        b[k] = a[k]%10
        c += int(a[k]/10)
waru(0)
try:
    while True:
        b.remove(0)
except ValueError:
    d = c*10 + (len(b)-1)*10 + min(b)
    print(d)

Submission status: Runtime Error

Solution code:
B
# -*- coding: utf-8 -*-
box = []
for i in range(0,5):
    box.append(int(input()))
amari = []
for i in range(0,5):
    amari.append(box[i] % 10)
for i in range(0,5):
    if amari[i] ==0:
        amari[i] = 100
    else:
        pass
sumtime = 0
box4 = box[4]
boxmin = box[amari.index(min(amari))]
box[amari.index(min(amari))] = box4 
box[4] = boxmin
for i in range(0,5):
    if i ==4:
        sumtime += box[i]
    elif box[i]%10==0:
        sumtime +=box[i]
    else:
        sumtime += ((box[i]//10)*10+10)
print(sumtime)

Submission status: Runtime Error

Solution code:
B
# -*- coding: utf-8 -*-
box = []
for i in range(0,5):
    box.append(int(input()))
amari = []
for i in range(0,5):
    amari.append(box[i] % 10)
for i in range(0,5):
    if amari[i] ==0:
        amari[i] = 100
    else:
        pass
sumtime = 0
box4 = box[4]
boxmin = box[amari.index(min(amari))]
box[amari.index(min(amari))] = box4 
box[4] = boxmin
for i in range(0,5):
    if i ==4:
        sumtime += box[i]
    elif box[i]%10==0:
        sumtime +=box[i]
    else:
        sumtime += (box[i] // 10)*10+10
print(sumtime)

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
T=[a,b,c,d,e]
A=list(map(lambda x:x%10,T))
S=list(map(lambda y:y//10,T))
count=0
B=[]
for j in range(5):
    if A[j]!=0:
        count+=1
        B.append(A[j])
print(10*(sum(S)+count-1)+min(B))

Submission status: Runtime Error

Solution code:
a=input()
b=input()
c=input()
d=input()
e=input()
T=[a,b,c,d,e]
A=list(map(lambda x:x%10,T))
S=list(map(lambda y:y//10,T))
count=0
B=[]
for j in range(5):
    if A[j]!=0:
        count+=1
        B.append(A[j])
print(10*(sum(S)+count-1)+min(B))

Submission status: Runtime Error

Solution code:
T=[]
for i in range(5):
    T.append(int(input()))
A=list(map(lambda x:x%10,T))
S=list(map(lambda y:y//10,T))
count=0
B=[]
for j in range(5):
    if A[j]!=0:
        count+=1
        B.append(A[j])
print(10*(sum(S)+count-1)+min(B))

Submission status: Runtime Error

Solution code:
def mod(x):
  if x % 10 == 0:
    return x
  else:
    while True:
      x += 1
      if x % 10 == 0:
        break
    return x
      
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
M = min(A%10, B%10, C%10, D%10, E%10)

if M = A%10:
  ans = A + mod(B) + mod(C) + mod(D) + mod(E)
elif M = B%10:
  ans = mod(A) + B + mod(C) + mod(D) + mod(E)
elif M = C%10:
  ans = mod(A) + mod(B) + C + mod(D) + mod(E)
elif M = D%10:
  ans = mod(A) + mod(B) + mod(C) + D + mod(E)
else:
  ans = mod(A) + mod(B) + mod(C) + mode(D) + E

Submission status: Runtime Error

Solution code:
import numpy as np

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


max_=0
for h in ls:
    if h%10 == 0:
        pass
    else:
        re =10-h
        if re>=max_:
            max_ = re

time = 0
for i in ls:
    if i%10 == 0:
        time += i
    else:
        time += (i//10+1)*10

time -= re

print(time)

Submission status: Runtime Error

Solution code:
L = [int(input()) for i in range(5)]
l = [i*(-1)//10*10*(-1) for i in L]
l1 = [i%10 for i in L]
l2 = sorted(list(set(l1)))
if l2[0] == 0:
  print(sum(l)-l[l1.index(l2[1])]+L[l1.index(l2[1])])
else:
  print(sum(l)-l[l1.index(l2[0])]+L[l1.index(l2[0])])

Submission status: Runtime Error

Solution code:
from math import ceil
time_list = [int(input()) for i in range(5)]
sum_list = []
time_list_0 = []
for i in range(5):
    time_list_0[i] = ceil(time_list[i] / 10) * 10
for j in range(5):
    if time_list[j] == 0:
        sum_list[j] = sum(time_list_0)
    else:
        sum_list[j] = sum(time_list_0) - 10 + (time_list[j] % 10)
print(min(sum_list))

Submission status: Runtime Error

Solution code:
from math import ceil
time_list = [int(input()) for i in range(5)]
sum_list = []
time_list_0 = []
for i in range(5):
    time_list_0[i] = ceil(time_list[i] / 10) * 10
for j in range(5):
    if time_list[i] == 0:
        sum_list[i] = sum(time_list_0)
    else:
        sum_list[i] = sum(time_list_0) - 10 + time_list[i] % 10
print(min(sum_list))

Submission status: Runtime Error

Solution code:
from math import ceil
time_list = [int(input()) for i in range(5)]
sum_list = []
time_list_0 = []
for i in range(5):
    time_list_0[i] = ceil(time_list[i] / 10) * 10
for j in range(5):
    sum_list[i] = sum(time_list_0) - 10 + time_list[i] % 10
print(min(sum_list))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
s=min([k for k in [a%10,b%10,c%10,d%10,e%10] if k>0])
ans = (a//10+(a%10!=0))*10+(b//10+(b%10!=0))*10+(c//10+(c%10!=0))*10+(d//10+(d%10!=0))*10+(e//10+(e%10!=0))*10-10+s
print(ans)

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
if a%10==0:
    a_q=a
else:
    a_q=(a//10+1)*10
if b%10==0:
    b_q=b
else:
    b_q=(b//10+1)*10
if c%10==0:
    c_q=c
else:
    c_q=(c//10+1)*10
if d%10==0:
    d_q=d
else:
    d_q=(d//10+1)*10
if e%10==0:
    e_q=e
else:
    e_q=(e//10+1)*10

r=[i for i in [a%10,b%10,c%10,d%10,e%10]  if i%10!=0]
r_min=min(r)

ans=a_q+b_q+c_q+d_q+e_q-10+r_min
print(ans)

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]
rem = [ele%10 for ele in lst]
last = rem.index(min(filter(None,rem)))
ans = 0
for i in range(5):
    if rem[i] == 0 or i == last:
        ans += lst[i]
    else:
        ans +=( lst[i] + (10-rem[i]))
print(ans)

Submission status: Runtime Error

Solution code:
lst = [A,B,C,D,E]
rem = [ele%10 for ele in lst]
last = rem.index(min(filter(None,rem)))
ans = 0
for i in range(5):
    if rem[i] == 0 or i == last:
        ans += lst[i]
    else:
        ans +=( lst[i] + (10-rem[i]))
print(ans)

Submission status: Runtime Error

Solution code:
dishes_1 = [int(input()) for i in range(5)]
dishes_2 = [i % 10 for i in dishes_1]
dishes_sort = []

min_time = 0

for i in range (5):
    if dishes_2[i] == 0:
       dishes_sort.append(dishes_1[i])

for i in range (9, 1, -1):
    for j in range (5):
        if dishes_2[j] == i:
            dishes_sort.append(dishes_1[j])

for i in range (4):
    for j in range (9):
        if dishes_sort[i] % 10 == 0:
           break
        else:
            dishes_sort[i] += 1
            
print (sum(dishes_sort))

Submission status: Runtime Error

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

q=[] #quotient
r=[] #reminder
count0=0 #余りが0の時を検出
for i in S:
  j, k= divmod(i, 10)
  q.append(j)
  if k==0:
    count0+=1
  else:
    r.append(k)

# sum(q)*10→商をベースに基本値を算出
# 10*(4-count0)→余り分の待ち時間を算出。ただし、余り0の場合には待ち時間なし
# min(r)→最も余りが短い料理を最後に注文する
print(sum(q)*10+10*(4-count0)+min(r))

Submission status: Runtime Error

Solution code:
import sys
import math

def main():
    input = sys.stdin.readline
    
    L = [int(input()) for i in range(5)]
    
    #最後の注文を決める
    last_orders = [10 - (i % 10) for i in L if i % 10 != 0]
    last_order = max(last_orders)
    
    #一の位を切り上げ
    all_order = sum([math.ceil(i / 10) * 10 for i in L])
    
    print(all_order - last_order)
    
if __name__ == '__main__':
    main()

Submission status: Runtime Error

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

remains = []
divs = []

for num in num_list:
    remains.append(num % 10)
    divs.append(num // 10)

zeros = remains.count(0)

for i in range(remains.count(0)):
    remains.remove(0)

print(sum(divs) * 10 + 40 - zeros * 10 + min(remains))

Submission status: Runtime Error

Solution code:
import sys

dishes = [int(line.strip()) for line in sys.stdin]
min1 = None
for d in dishes:
  if 0 < d%10 < min1:
    min1 = d%10
if not min1:
  min1 = 0
    
dishes = [((d+9)//10)*10 for d in dishes]
print(sum(dishes)-(10-min1))

Submission status: Runtime Error

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

a_syo = a//10
b_syo = b//10
c_syo = c//10
d_syo = d//10
e_syo = e//10
time1 = (a_syo + b_syo + c_syo + d_syo + e_syo) * 10

a_amari = a%10
b_amari = b%10
c_amari = c%10
d_amari = d%10
e_amari = e%10
lst = []
if a_amari == 0:
    pass
else:
    lst = lst + [a_amari]
if b_amari == 0:
    pass
else:
    lst = lst + [b_amari]
if c_amari == 0:
    pass
else:
    lst = lst + [c_amari]
if d_amari == 0:
    pass
else:
    lst = lst + [d_amari]
if e_amari == 0:
    pass
else:
    lst = lst + [e_amari]
#print (lst)
count = len(lst) - 1
#print (count)
lst.sort()
#print (lst)
time2 = (len(lst) -1)*10 + lst[0]
print (time1 + time2)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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


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

Submission status: Runtime Error

Solution code:
a = []
for _ in range(5):
  a.append(int(input()))
b =[]
c = []
for i in range(5):
  b[i] = a[i]
for i in range(5):
  while b[i] > 10:
  	b[i] = b[i] - 10
  if min(b[i]) = 10:
    return sum(a)
  else:
    for i in range(5):
    	if b[i] = 10:
          c[i] = a[i]
        else:
          c[i] = a[i] +10 -b[i]
        d = sum(c)
        mini = min(b)
        ans = d - 10 + mini
        return ans

Submission status: Runtime Error

Solution code:
list_1 = []
list_2 = []
list_3 = []

for i in range(5):
    list_1.append(input())

for i in range(5):
    list_2.append(int(list_1[i]) % 10)

for i in range(5):
    if list_2[i] != 0:
        list_3.append(-(list_2[i] - 10))
    else:
        list_3.append(0)

max_num = 0
for i in range(5):
    if list_3[i] > max_num:
        max_num = list_3[i]
        max_num_2 = i

a1 = int(list_1.pop(max_num_2))
a2 = int(list_3.pop(max_num_2))

ans = 0

for i in range(4):
    ans += int(list_1[i])
    ans += list_3[i]

ans += a1

print(ans)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
ls = []
for i in range(5):
    ls.append(int(input()))

lasttime = 10
for a in ls:
    b = a%10
    if b < lasttime and b != 0:
        lasttime = b
        ans =a

ls.remove(ans)
sum =0
for i in ls:
    if i%10 ==0:
        sum +=i
    else:
        p = i//10
        sum += (p+1)*10

print(int(sum + ans))