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: Wrong Answer

Solution code:
s = 0
num = 0
for i in range(5):
  k = int(input())
  l = k - 10*int(k/10)
  if l>num:
    num = l
  s+=k-l+10
print(s-10+num)

Submission status: Wrong Answer

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]
if len(m) == 0:
    ans= count -10
    print(ans)
else:
    ans = count + 10*len(m) + min(m) -10
    print(ans)

Submission status: Wrong Answer

Solution code:
sums = 0
k = []
for i in range(5):
  g = int(input())
  if g%10 != 0:
      sums += g + 10 - g%10
      k.append(g%10)
  else:
      sums += g
      k.append(11)
j = min(k)
print(sums - 10 + j)

Submission status: Wrong Answer

Solution code:
sums = 0
for i in range(5):
  g = int(input())
  sums += (g+ 10 - g%10)
print(sums)

Submission status: Wrong Answer

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

#a = [ 29 ,20 ,7 ,35 ,120 ]
#a = [ 101 ,86 ,119 ,108 ,57 ]

def ofooo(n):
    return int(round(n+5.1, -1))

m=0
res = 0
for n in a:
    aa = ofooo(n)
    res += aa
    if m < aa-n:
        m = aa-n
print(res - m)

Submission status: Wrong Answer

Solution code:

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

#a = [ 29 ,20 ,7 ,35 ,120 ]
#a = [ 101 ,86 ,119 ,108 ,57 ]

def ofooo(n):
    return round(n+5, -1)

m=0
res = 0
for n in a:
    aa = ofooo(n)
    res += aa
    if m < aa-n:
        m = aa-n
print(res - m)

Submission status: Wrong Answer

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)

ans = sum(l) - sur
print(ans)

Submission status: Wrong Answer

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 - 10 + min(l1))

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
T = [int(input()) for _ in range(5)]
 
ans = 643
 
for i0 in range(5):
  tmp = T[i0]
  tmp += (10-tmp)%10
  l = [0,1,2,3,4]
  l.remove(i0)
  for i1 in l:
    tmp += T[i1]
    tmp += (10-tmp)%10
    l.remove(i1)
    for i2 in l:
      tmp += T[i2]
      tmp += (10-tmp)%10
      l.remove(i2)
      for i3 in l:
        tmp += T[i3]
        tmp += (10-tmp)%10
        l.remove(i3)
        for i4 in l:
          tmp += T[i4]
          ans = min(ans,tmp)
print(ans)

Submission status: Wrong Answer

Solution code:
S = input()
ans = 0
for i in range(len(S)):
    if (S[i] == 'A') | (S[i] == 'G') | (S[i] == 'C') | (S[i] == 'T'):
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
a = [int(i) for i in input().split()]

sum , d, mx,res = 0, 0, 0,0

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

Submission status: Wrong Answer

Solution code:
a = [int(input()) for i in range(5)]
t = 0
for i in range(5):
 t = t + (a[i]//10)*10 +10
print(t + min(a[0]%10,a[1]%10,a[2]%10,a[3]%10,a[4]%10))

Submission status: Wrong Answer

Solution code:
lst = []
for i in range(5):
  n = int(input())
  lst.append([(n + 1) % 10, n])
lst = sorted(lst)

res = 0
for i in range(5):
  if i == 0:
    res += lst[i][1]
  else:
    res += (lst[i][1] + 9) // 10 * 10
print(res)

Submission status: Wrong Answer

Solution code:
lst = []
for i in range(5):
  n = int(input())
  lst.append([n % 10, n])
lst = sorted(lst)

res = 0
for i in range(5):
  if i == 0:
    res += lst[i][1]
  else:
    res += (lst[i][1] + 9) // 10 * 10
print(res)

Submission status: Wrong Answer

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 range(len(times)):
    if n == m:
        total += times[n]
    else:
        total += ((times[n]+9) // 10) * 10

print(total)

Submission status: Wrong Answer

Solution code:
m = 10
x = 0

for i in range(5):
	n = int(input())
    
	if n%10 == 0:
		x += n
		continue
	if (n%10 < m):
		m = n%10
		x += n - n%10 +10


print(x -10 + m)

Submission status: Wrong Answer

Solution code:
m = 10
x = 0

for i in range(5):
	n = int(input())
    
	if n%10 == 0:
		x += n
		continue
	elif n%10 < m:
		m = n%10
		x += n - n%10 +10

print(x -10 +m)

Submission status: Wrong Answer

Solution code:
import math

num = list()
for ii in range(5):
    num.append(int(input()))
    
for ii in range(5):
    num[ii] = 10 * math.ceil(num[ii]/10)
    
print(sum(num))

Submission status: Wrong Answer

Solution code:
menus = list(map(lambda x: (x - x % 10, x % 10), [int(input()) for _ in range(5)]))
tens = [ i[0] for i in menus ]
mods = sorted(list(filter(lambda x: x != 0, [ i[1] for i in menus])))
print(sum(tens) + (mods[0]+ 10*(len(mods) - 1))if len(mods) > 0 else 0)

Submission status: Wrong Answer

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

min = 10
min_index = -1
time = 0

data = []

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

for i in range(0, 5):
	if data[i] % 10 < min and data[i] % 10 > 0:
		min = data[i] % 10
		min_index = i
for i in range(0, 5):
	if i == min_index:
		continue
	if data[i] % 10 == 0:
		time += data[i]
	else:
		time += ((int(data[i] / 10) + 1) * 10)
	
print(time + data[min_index])

Submission status: Wrong Answer

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

min = 9
min_index = -1
time = 0

data = []

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

for i in range(0, 5):
	if data[i] % 10 < min and data[i] % 10 > 0:
		min = data[i] % 10
		min_index = i
for i in range(0, 5):
	if i == min_index:
		continue
	if data[i] % 10 == 0:
		time += data[i]
	else:
		time += ((int(data[i] / 10) + 1) * 10)
	
print(time + data[min_index])

Submission status: Wrong Answer

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:
  n.append(0)
ans = ans*10-10+min(n)
print(ans)

Submission status: Wrong Answer

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 n == []:
  n.append(0)
ans = ans*10-10+min(n)
print(ans)

Submission status: Wrong Answer

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)
n.append(0)
ans = ans*10-10+min(n)
print(ans)

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
m = 10

wa = 0

for i in range(5):
  n = int(input())
  if n%10 is 0:
    wa += n
  elif n%10 < m:
    m = n%10
    wa += n- n%10 +10
    
print(wa-10+m)

Submission status: Wrong Answer

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

ans, remainder = 0, 10
for t in T:
    if t % 10 != 0:
        ans += (t // 10) * 10 + 10
        remainder = min(t % 10, remainder)
    else:
        ans += t
print(ans + (remainder % 10 - 10))

Submission status: Wrong Answer

Solution code:
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
if A%10 == 0:
	aw = A
else:
	aw = int(A/10)*10 + 10
if B%10 == 0:
	bw = B
else:
	bw = int(B/10)*10 + 10
if C%10 == 0:
	cw = C
else:
	cw = int(C/10)*10 + 10
if D % 10 == 0:
	dw = D
else:
	dw = int(D/10)*10 + 10
if E % 10 == 0:
	ew = E
else:
	ew = int(E/10)*10 + 10
V1 = [A,B,C,D,E]
V2 = [aw,bw,cw,bw,ew]
V3 = [V2[j] - V1[j] for j in range(0,5)]
mx = V3.index(max(V3))
print(aw + bw + cw + dw + ew - V2[mx] + V1[mx])

Submission status: Wrong Answer

Solution code:
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
aw = int(A/10)*10 + 10
bw = int(B/10)*10 + 10
cw = int(C/10)*10 + 10
dw = int(D/10)*10 + 10
ew = int(E/10)*10 + 10
V1 = [A,B,C,D,E]
V2 = [aw,bw,cw,bw,ew]
V3 = [V2[j] - V1[j] for j in range(0,5)]
mx = V3.index(max(V3))
print(aw + bw + cw + dw + ew - V2[mx] + V1[mx])

Submission status: Wrong Answer

Solution code:
l = [int(input())for i in range(5)]
ans = 0
amari = []
for i in l:
    amari.append(i%10)
amarii = sorted(amari,reverse=True)
amamari = []
for j in amarii:
    amamari.append(10-j)
sumsum = sum(l)
sumsumamari = sum(amamari[:4])
ans = sumsum+sumsumamari
print(ans)

Submission status: Wrong Answer

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]+[0])
print(sum([int(Decimal(x).quantize(Decimal("1E1"), rounding=ROUND_UP)) for x in l]) - min_remainder)

Submission status: Wrong Answer

Solution code:
li=[int(input()) for i in range(5)]
lic=[10-it%10 for it in li]
print( sum(li)+sum(lic)-max(lic) )

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
T = [a, b, c, d, e]
A = []
max_tt = 0
for i in range(len(T)):
  t = (T[i]//10 + 1) * 10
  A.append(t)
  tt = t - T[i]
  if max_tt < tt:
    max_tt = tt
print(sum(A)-max_tt)

Submission status: Wrong Answer

Solution code:
import math

A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())

a=math.ceil(A/10)
b=math.ceil(B/10)
c=math.ceil(C/10)
d=math.ceil(D/10)
e=math.ceil(E/10)

loss=max(a-A/10,b-B/10,c-C-10,d-D/10,e-E/10)

time=a+b+c+d+e-loss

print(int(time*10))

Submission status: Wrong Answer

Solution code:
import math

A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())

a=math.ceil(A/10)
b=math.ceil(B/10)
c=math.ceil(C/10)
d=math.ceil(D/10)
e=math.ceil(E/10)

loss=max(a-A/10,b-B/10,c-C-10,d-D/10,e-E/10)

time=a+b+c+d+e-loss

print(int(time*10))

Submission status: Wrong Answer

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: Wrong Answer

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])
if len(B)==0:
    print(10*(sum(S)+count-1))
else:
    print(10*(sum(S)+count-1)+min(B))

Submission status: Wrong Answer

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=[0]
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: Wrong Answer

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
  n=max(n,t)
print(ans-n)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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 -= max_

print(time)

Submission status: Wrong Answer

Solution code:
import numpy as np

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

ar = np.array(ls)

ar_ = 10 -ar

ti = max(ar_)

time = 0 

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

time -= ti

print(time)

Submission status: Wrong Answer

Solution code:
def calculation(time_array):
    first_values = [i % 10 if i % 10 != 0 else i for i in time_array]
    minlocation = first_values.index(min(first_values))
    last_order = time_array.pop(minlocation)
    print(first_values)
    print(last_order)
    order_time = [i if i % 10 == 0 else int(i /10) * 10 + 10 for i in time_array]
    return sum(order_time) + last_order

if __name__ == "__main__":
    receipe_time = [int(input()) for i in range(5)]
    # receipe_time = [23, 60, 78, 42, 89]
    print(calculation(receipe_time))

Submission status: Wrong Answer

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
  ans += x + t
  n = max(n,t)
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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.append(ceil(time_list[i] / 10) * 10)
for j in range(5):
    if time_list[j] == 0:
        sum_list.append(sum(time_list_0))
    else:
        sum_list.append(sum(time_list_0) - 10 + (time_list[j] % 10))
print(min(sum_list))

Submission status: Wrong Answer

Solution code:
from math import ceil
time_list = [int(input()) for i in range(5)]
x_list = []
for i in time_list:
    x_list.append(i % 10)
    i = ceil(i / 10) * 10
if max(x_list) == 0:
    print(sum(time_list))
else:
    print(sum(time_list) - 10 + max(x_list))

Submission status: Wrong Answer

Solution code:
from math import ceil
time_list = [int(input()) for i in range(5)]
x_list = []
for i in time_list:
    x_list.append(i % 10)
    i = ceil(i / 10) * 1
if max(x_list) == 0:
    print(sum(x_list))
else:
    print(sum(x_list) + 10 - max(x_list))

Submission status: Wrong Answer

Solution code:
a=[]
for i in range(0,5):
  a.append(int(input()))
s=0
import math
for i in a:
  s=s+(math.ceil(i/10))*10
x=10
for i in a:
  if i%10==0:
    pass
  elif i%10<x:
    x=i%10
print(x)
print(s-10+x)

Submission status: Wrong Answer

Solution code:
tm = []
a = int(input())
tm.append(a)
b = int(input())
tm.append(b)
c = int(input())
tm.append(c)
d = int(input())
tm.append(d)
e = int(input())
tm.append(e)

total = 0
#print(tm)
m = tm.index(min(tm, key=lambda x: int(str(x)[-1]) if (str(x)[-1] != "0") else 10))

tmp = tm.pop(m)

#print(tm)

for x in range(len(tm)):
    total = round(tm[x], -1) + total
    #print(total)
total = tmp + total

print(total)

Submission status: Wrong Answer

Solution code:
tm = []
a = int(input())
tm.append(a)
b = int(input())
tm.append(b)
c = int(input())
tm.append(c)
d = int(input())
tm.append(d)
e = int(input())
tm.append(e)

total = 0
#print(tm)
m = min(tm, key=lambda x: int(str(x)[-1]) if (str(x)[-1] != "0") else 10)

tm.remove(m)

#print(tm)

for x in range(len(tm)):
    total = round(tm[x], -1) + total
#    print(total)
total = m + total

print(total)

Submission status: Wrong Answer

Solution code:
tm = []
a = int(input())
tm.append(a)
b = int(input())
tm.append(b)
c = int(input())
tm.append(c)
d = int(input())
tm.append(d)
e = int(input())
tm.append(e)

total = 0
m = min(tm, key=lambda x: int(str(x)[-1]) if (str(x)[-1] != "0") else 10)
tm.remove(m)

for x in range(len(tm)):
    total = round(tm[x], -1) + total
    print(total)
total = m + total

print(total)

Submission status: Wrong Answer

Solution code:
ans = 0
for _ in range(4):
    _num = int(input())
    ans += _num // 10 * 10
    if _num % 10 > 0:
        ans += 10
ans += int(input())

print(ans)

Submission status: Wrong Answer

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(rem))
ans = [lst[i] + (10-rem[i]) for i in range(5) if i != last]
print(sum(ans)+lst[last])

Submission status: Wrong Answer

Solution code:
times=[]
for i in range(5):
  times.append(int(input()))
rem=9
sum=0
count=False
for i in range(5):
  if times[i]%10==0:
    sum+= times[i]
  else:
    sum+= (times[i]//10)*10+10
    rem=min(rem,times[i]%10)
    count=True
if count:
  rem-=10
print(sum+rem)

Submission status: Wrong Answer

Solution code:
time = 0
for i in range(5):
    time += (int(int(input()) / 10) + 1) * 10
print(time)

Submission status: Wrong Answer

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

total = 0

menu_list = []

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

menu_list2 = []

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

menu_list2.sort()
menu_list2.reverse()

menu_time = 0

j = 0

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

    j += 1

print(total)

Submission status: Wrong Answer

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

total = 0

menu_list = []

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

menu_list2 = []

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

menu_list.sort()
menu_list.reverse()

menu_time = 0

j = 0

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

    j += 1

print(total)

Submission status: Wrong Answer

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

total = 0

menu_list = []

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

i = 0

for menu in menu_list:
    if menu[:1] == '0':
        total += int(menu[::-1])
        menu_list.pop(i)
    i += 1

menu_list.sort()
menu_list.reverse()

menu_time = 0

j = 0

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

    j += 1

print(total)

Submission status: Wrong Answer

Solution code:
s = [int(input()) for i in range(5)]
last = min((k-1)%10 for k in s)
m = sum(s)//10
ans = 10*(m+1)-10+last+1
print(ans)

Submission status: Wrong Answer

Solution code:
s = [int(input()) for i in range(5)]
last = min((k-1)%10 for k in s)
m = sum(s)//10
ans = 10*(m+1)-10+last+1

Submission status: Wrong Answer

Solution code:
s = [int(input()) for i in range(5)]
last = min((k-1)%10 for k in s)
m = sum(s)//10
ans = 10*(m+1)-10+last

Submission status: Wrong Answer

Solution code:
s = [int(input()) for i in range(5)]
last = min((k-1)%10 for k in s)
m =(sum(s)-last)//10
ans = 10*(m+1)+last

Submission status: Wrong Answer

Solution code:
import sys

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

Submission status: Wrong Answer

Solution code:
import sys

dishes = [int(line.strip()) for line in sys.stdin]
min1 = 9
for d in dishes:
  if 0 < d%10 < min1:
    min1 = d%10

dishes = [((d+9)//10)*10 for d in dishes]
print(sum(dishes)-(10-min1))

Submission status: Wrong Answer

Solution code:
import math
l = [int(input()) for _ in range(5)]
l_1st = [int(str(10 - int(str(i)[-1]))[-1]) for i in l]
print(l_1st)
l_rm_i = l_1st.index(max(l_1st))
l_rm = l[l_rm_i]
del l[l_rm_i]

l = [math.ceil(i/10)*10 for i in l]
ans = int((sum(l) + l_rm))
print(ans)

Submission status: Wrong Answer

Solution code:
import math
l = [int(input()) for _ in range(5)]
l_1st = [int(str(0 - int(str(i)[-1]))[-1]) for i in l]
l_rm_i = l_1st.index(max(l_1st))
l_rm = l[l_rm_i]
del l[l_rm_i]

l = [math.ceil(i/10)*10 for i in l]
ans = int((sum(l) + l_rm))
print(ans)

Submission status: Wrong Answer

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

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


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

Submission status: Wrong Answer

Solution code:
import math
l = [int(input()) / 10 for i in range(5)]
min_l = min(l)
l.remove(min_l)
l = [math.ceil(i) for i in l]
ans = int((sum(l) + min_l)*10)
print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np
A = np.array([int(input()) for _ in range(5)]).reshape(-1,1)
A = np.array(A).reshape(-1,1)
A = np.c_[A, (10 - A) * (A % 10 != 0)]
print(sum(A[:,0]+A[:,1])-max(A[:,1]))

Submission status: Wrong Answer

Solution code:
import numpy as np
A = np.array([int(input()) for _ in range(5)]).reshape(-1,1)
A = np.array(A).reshape(-1,1)
A = np.c_[A, (10 - A) * (A % 10 != 0)]
print(A)
print(sum(A[:,0]+A[:,1])-max(A[:,1]))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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:
        lasttime = a

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

print(sum + a)

Submission status: Wrong Answer

Solution code:
a = int(input())
a1 = a%5
a2 = a + (5-a1)%5
b = int(input())
b1=b%5
b2 = b + (5-b1)%5
c = int(input())
c1=c%5
c2 = c + (5-c1)%5
d = int(input())
d1=d%5
d2 = d + (5-d1)%5
e = int(input())
e1=e%5
e2 = e + (5-e1)%5
if min(a1,b1,c1,d1,e1) == 0:
    ans = a2+b2+c2+d2+e2
else:
    ans = a2+b2+c2+d2+e2 -5 +min(a1,b1,c1,d1,e1)
print(ans)

Submission status: Wrong Answer

Solution code:
import math
s=0
m=10
for i in range(5):
  a =int(input())
  s+=math.ceil(a/10)*10
  if a%10 !=0:
    m = min(m,a%10)
print(s-m)

Submission status: Wrong Answer

Solution code:
print(sum(map(lambda x: x + (0 if x % 10 == 0 else 10 - x % 10), [int(input()) for _ in range(5)])))

Submission status: Wrong Answer

Solution code:
print(sum(map((lambda x: x + (10 - x % 10)), [int(input()) for _ in range(5)])))

Submission status: Wrong Answer

Solution code:
lst = []
for i in range(5):
    lst.append(int(input()))
lst_f=[]
for i in range(5):
    lst_f.append(lst[i]%10)
while 0 in lst_f:
    lst_f.remove(0)
if len(lst_f) == 0:
    print(sum(lst))
else:
    print(sum(lst)-sum(lst_f)+10*(4-lst_f.count(0))+min(lst_f))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

S = [round(x + 4.9, -1) for x in X]
d = [round(x + 4.9, -1) - x for x in X]

print(int(sum(S) - max(d)))

Submission status: Wrong Answer

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

time -= max(a)
time

Submission status: Wrong Answer

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

best_min = 10
for idx, i in enumerate(num):
    if i % 10 < best_min:
        best_min = i % 10
        index = idx
count = 0
for idx, i in enumerate(num):
    if idx == index:
        count += i
    else:
        count += i + 10 - (i%10) 
print(count)

Submission status: Wrong Answer

Solution code:
import numpy as np

nums = []
sortedNums = [0,0,0,0,0]
sortedRemainders = [0,0,0,0,0]
for i in range(5):
	nums.append(int(input()))

remainders = [0,0,0,0,0]
for i in range(5):
	if nums[i] % 10 == 0:
		remainders[i] = 10
	else:
		remainders[i] = nums[i] % 10

sortedRemaindersIndex = np.ndarray.tolist(np.argsort(remainders))

for i in range(5):
	sortedNums[i] = nums[sortedRemaindersIndex[i]]

elapsedTime = 0
for i in range(4):
	if sortedNums[i+1] % 10 == 0:
		elapsedTime += sortedNums[i+1]
	else:
		elapsedTime += int((sortedNums[i+1]/10 +1) * 10)

elapsedTime += sortedNums[0]

print(elapsedTime)

Submission status: Wrong Answer

Solution code:
import numpy as np

nums = []
sortedNums = [0,0,0,0,0]
sortedRemainders = [0,0,0,0,0]
for i in range(5):
	nums.append(int(input()))

remainders = [0,0,0,0,0]
for i in range(5):
	remainders[i] = nums[i] % 10

sortedRemaindersIndex = np.ndarray.tolist(np.argsort(remainders))

for i in range(5):
	sortedRemainders[i] = remainders[sortedRemaindersIndex[i]]
	sortedNums[i] = nums[sortedRemaindersIndex[i]]

elapsedTime = 0
lastIndex = 0
foundLastIndex = False
for i in range(5):
	if sortedRemainders[i] == 0:
		elapsedTime += sortedNums[i]
	else:
		if foundLastIndex:
			elapsedTime += sortedNums[i] + 10 - sortedRemainders[i]
		else:
			lastIndex = i
			foundLastIndex = True

elapsedTime += sortedNums[lastIndex]

print(elapsedTime)

Submission status: Wrong Answer

Solution code:
import numpy as np

nums = []
sortedNums = [0,0,0,0,0]
sortedRemainders = [0,0,0,0,0]
for i in range(5):
	nums.append(int(input()))

remainders = [0,0,0,0,0]
for i in range(5):
	remainders[i] = nums[i] % 10

sortedRemaindersIndex = np.ndarray.tolist(np.argsort(remainders))

for i in range(5):
	sortedRemainders[i] = remainders[sortedRemaindersIndex[i]]
	sortedNums[i] = nums[sortedRemaindersIndex[i]]

print(sortedRemainders)
print(sortedNums)

elapsedTime = 0
lastIndex = 0
foundLastIndex = False
for i in range(5):
	if sortedRemainders[i] == 0:
		elapsedTime += sortedNums[i]
	else:
		if foundLastIndex:
			elapsedTime += sortedNums[i] + 10 - sortedRemainders[i]
		else:
			lastIndex = i
			foundLastIndex = True
	print(elapsedTime)

elapsedTime += sortedNums[lastIndex]

print(elapsedTime)

Submission status: Wrong Answer

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


time = 0
flg = 0
for i in me:
    j = i%10
    if j == 0:
        k = i
    else:
        k = i+(10-j)
        if flg < 10-j:
            fig = 10-j
        else:
            pass
    time += k
    
k -= flg

print(k)

Submission status: Wrong Answer

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

m = 0
j = 0
for i in range(5):
  if a[i] % 10 < m:
          m = a[i] % 10
          j = i

a[j], a[4] = a[4], a[j]

for i in range(5):
  if i != 4:
        a[i] = int(math.ceil(a[i] / 10) * 10)
  #print(a)
  
print(sum(a))