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:
#125 b

def kiriage(x):
    if x%10==0:
        return x
    else:
        return x+10-x%10

r=[]
amari_min=124
ans=0
for i in range(5):
    d=int(input())
    r.append(d)
    if amari_min>(d%10) and (d%10)!=0:
        amari_min=d

for x in r:
    if x==amari_min:
        ans+=x
    else:
        ans+=kiriage(x)
print(ans)

Submission status: Wrong Answer

Solution code:
s,i=0,0
for j in range(5):
  s=s+int(input())
  if j==4:
    print(s)
    exit()
  while(s>10*i):
    i+=1
  s=10*(i)
print(s)

Submission status: Wrong Answer

Solution code:
s,i=0,0
for i in range(5):
  s=s+int(input())
  if i==4:
    print(s)
    exit()
  while(s>10*i):
    i+=1
  s=10*(i)
print(s)

Submission status: Wrong Answer

Solution code:
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())
count=0
lis=[[A,((A%10)-1)%10],[B,((B%10)-1)%10],[C,((C%10)-1)%10],[D,((D%10)-1)%10],[E,((E%10)-1)%10]]
lis.sort(key=lambda x:x[1], reverse=True)
print(lis)

for i in range(len(lis)):
    if not(i==len(lis)-1):
        count=count+lis[i][0]+(10-(lis[i][0])%10)%10
    else:
        count=count+lis[i][0]
print(count)

Submission status: Wrong Answer

Solution code:
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())
count=0
lis=[[A,A%10],[B,B%10],[C,C%10],[D,D%10],[E,E%10]]
lis.sort(key=lambda x:x[1], reverse=True)
#print(lis)

for i in range(len(lis)):
    if not(i==len(lis)-1):
        count=count+lis[i][0]+(10-lis[i][1])%10
    else:
        count=count+lis[i][0]
print(count)

Submission status: Wrong Answer

Solution code:
L=[int(input()) for i in range(5)]
A=L[0]%10
B=L[1]%10
C=L[2]%10
D=L[3]%10
E=L[4]%10
X=max(A,B,C,D,E)
A1=L[0]+A//10
B1=L[1]+B//10
C1=L[2]+C//10
D1=L[3]+D//10
E1=L[4]+E//10
ans=A1+B1+C1+D1+E1-X
print(ans)

Submission status: Wrong Answer

Solution code:
a = [0]*5
for i in range(len(a)):
  a[i] = int(input())
for i in range(0,len(a)-1):
  for j in range(len(a)-1,i,-1):
    if(a[j-1]%10 < a[j]%10):
      temp = a[j]
      a[j] = a[j-1]
      a[j-1] = temp
for i in range(len(a)):
  if(a[i]%10 != 0 and i != len(a)-1):
    a[i] = a[i]+(10 - a[i]%10)
print(sum(a))

Submission status: Wrong Answer

Solution code:
q = -1
r = 9
for i in range(5):
  k = int(input())
  q += (k-1)//10+1
  r = min(r-1,(k-1)%10)+1
print(q*10+r)

Submission status: Wrong Answer

Solution code:
import itertools
def ABC123B():
    T = [int(input()) for _ in range(5)]
    templist = itertools.permutations(T)
    mint = 644
    for l in templist:
        time = 0

        for t in l:
            if time % 10 !=0:
                time += 10 - time % 10
            time += t

        mint = min(mint, time)
    print(time)


ABC123B()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
sum=0
max=0

Submission status: Wrong Answer

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

last = min((m[i] - 1) % 10 + 1 for i in range(5))
last1 = int(str(last)[-1])
sum = sum(math.ceil(m[i] / 10) * 10 for i in range(5))

print(sum+last1-10)

Submission status: Wrong Answer

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

last = min((m[i] - 1) % 10 +1 for i in range(5))
last1 = int(str(last)[-1])
sum = sum(math.ceil(m[i] / 10) * 10 for i in range(5))

print(sum+last1-10)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

# Check


def main():
    N = 5
    dishes = [0] * N
    m = 10 ** 9
    m_index = -1

    for i in range(N):
        dishes[i] = int(input())

    for i in range(len(dishes)):
        if m > dishes[i] % 10 and dishes[i] % 10 != 0:
            m = dishes[i] % 10
            m_index = i

    print(sum([d // 10 * 10 + 10 if d % 10 != 0 else d for i, d in enumerate(dishes) if i != m_index]) + dishes[m_index])


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import math
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())
li=[A,B,C,D,E]
li_ceil=[math.ceil(A/10)*10,math.ceil(B/10)*10,math.ceil(C/10)*10,math.ceil(D/10)*10,math.ceil(E/10)*10]
li_fi=[int(str(A)[-1]),int(str(B)[-1]),int(str(C)[-1]),int(str(D)[-1]),int(str(E)[-1])]
min_=9
num=9
ans=0
for i in range(len(li_fi)):
  if li_fi[i]<min_ and li_fi[i]!=0:
    min_=li_fi[i]
    num=i
for i in range(len(li)):
  if i==num:
    ans+=li[i]
  else:
    ans+=li_ceil[i]
print(ans)

Submission status: Wrong Answer

Solution code:
import math
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())
li=[A,B,C,D,E]
li_ceil=[math.ceil(A/10)*10,math.ceil(B/10)*10,math.ceil(C/10)*10,math.ceil(D/10)*10,math.ceil(E/10)*10]
li_fi=[int(str(A)[-1]),int(str(B)[-1]),int(str(C)[-1]),int(str(D)[-1]),int(str(E)[-1])]
min_=9
num=9
ans=0
for i in range(len(li_fi)):
  if li_fi[i]<min_:
    min_=li_fi[i]
    num=i
for i in range(len(li)):
  if i==num:
    ans+=li[i]
  else:
    ans+=li_ceil[i]
print(ans)

Submission status: Wrong Answer

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

dishes = sorted(dishes, key=lambda x: 10 - int(str(x)[-1]))
a = list()
b = list()
for d in dishes:
    if d % 10 == 0:
        a.append(d)
    else:
        b.append(d)
# b = [d + 10 - d % 10 for d in b[:-1]] + [b[-1]]
# dishes = a + b
# print(sum(dishes))
#
print(1)

Submission status: Wrong Answer

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

dishes = sorted(dishes, key=lambda x: 10 - int(str(x)[-1]))
# a = list()
# b = list()
# for d in dishes:
#     if d % 10 == 0:
#         a.append(d)
#     else:
#         b.append(d)
# b = [d + 10 - d % 10 for d in b[:-1]] + [b[-1]]
# dishes = a + b
# print(sum(dishes))
#
print(1)

Submission status: Wrong Answer

Solution code:
I = ["{0:03d}".format(int(n)) for n in open(0).read().split()]
c = 0
min_z = 10
for i in I:
    x, y, z = map(int, i)
    if 0 < z < min_z:
        min_z = z
    if 0 < z:
        y +=1
    if 9 < y:
        x += 1
        y -= 10
    n = x * 100 + y * 10
    c += n

min_z = (min_z if min_z != 10 else 0)
print(c+min_z-10)

Submission status: Wrong Answer

Solution code:
I = ["{0:03d}".format(int(n)) for n in open(0).read().split()]
c = 0
min_z = 9
for i in I:
    x, y, z = map(int, i)
    if 0 < z < min_z:
        min_z = z
    if 0 < z:
        y +=1
    if 9 < y:
        x += 1
        y -= 10
    n = x * 100 + y * 10
    c += n
print(c+min_z-10)

Submission status: Wrong Answer

Solution code:
import math
l=[int(input()) for _ in range(5)]
l_min=[]
ans=0
for i in l:
    l_min.append(i%10)
for _ in range(4):
    ind=l_min.index(max(l_min))
    l_min.pop(ind)
    res=math.ceil(l.pop(ind)/10)*10
    ans+=res
print(ans+l[0])

Submission status: Wrong Answer

Solution code:
order = [int(input()) for _ in range(5)]
tmp=0
diff = 9
for i in order:
  if i%10 != 0:
    diff = min(i%10, diff)
    tmp+=((i//10)+1)*10
  else:
    tmp+=i
print(tmp-10+diff)

Submission status: Wrong Answer

Solution code:
a=[int(input()) for _ in range(5)]
ans=sum(a)
b=10
for i in range(5):
    ans+=10-a[i]%10
    b=min(b,a[i]%10)
print(ans-10+b)

Submission status: Wrong Answer

Solution code:
N, *A = [int(input()) for _ in range(5)]
print(4 + (N+min(A)-1)//min(A))

Submission status: Wrong Answer

Solution code:
l=[]
l.append(int(input()))
l.append(int(input()))
l.append(int(input()))
l.append(int(input()))
l.append(int(input()))
t=[]
for e in l:
    t.append(e%10)
s=0
i=0
while 0 in t:
    j=t.index(0)
    t[j]=-1
    s+=l[j]
    i+=1
while i<4:
    j=t.index(max(t))
    t[j]=-1
    s+=l[j]-l[j]%10+10
    i+=1
j=t.index(max(t))
s+=l[j]
print(s)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
def x(i):
    return -(-i//10)

print(x(a) + x(b) + x(c) + x(d) + x(e)+min([a%10, b%10, c%10, d%10, e%10])-10)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
def x(i):
    return -(-i//10)

print(x(a) + x(b) + x(c) + x(d) + x(e)+min([a%10, b%10, c%10, d%10, e%10]))

Submission status: Wrong Answer

Solution code:
just=[]
left=[]
for i in range(5):
  a=int(input())
  if a%10 == 0:
    just.append(a)
  else:
    left.append(a)
_sum = sum(just)    

_min=9
index=-1
for i in range(len(left)):
  i1=left[i]%10
  if _min > i1:
    _min = i1
    index = i
    
for i in range(len(left)):
  if i == index:
    _sum += left[i]
  else:
    b=left[i]%10
    _sum += left[i] + (10-b)
print(_sum)

Submission status: Wrong Answer

Solution code:
from math import ceil

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

x = [a, b, c, d, e]
x1 = list(map(lambda x:x%10, x))
last_x = 10
last_i = -1
for i in range(len(x1)):
    if x1[i]==0:
        continue
    if last_x > x1[i]:
        last_x = x1[i]
        last_i = i

tmp = x[:last_i] + x[last_i+1:]
ans = sum(list(map(lambda a:10*ceil(a/10), tmp)))+x[last_i]
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=[int(input()) for i in range(5)]
ans = 0
d1 = 9
for i in range(5):
  ans += a[i]//10*10
  d1=min(d1,a[i]%10)
print(ans+40+d1)

Submission status: Wrong Answer

Solution code:
min_num = 10
num = 0
count = 0
for i in range(5):
    a = int(input())
    if a % 10 == 0:
       num += a
    else:
        num += ((a//10) + 1) * 10
        min_num = min(min_num, a%10)
        count = 1

print(num+min_num-(count*10))

Submission status: Wrong Answer

Solution code:
sum2=0
min_num=10
for i in range(5):
  n=int(input())
  if n%10==0:
    sum2+=n
  else:
    sum2 += ((n//10) + 1) * 10
    min_num = min(min_num, n%10)
print(sum2-min_num)

Submission status: Wrong Answer

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

for i in range(4):
    for j in range(i + 1, 5):
        if food[i] % 10 < food[j] % 10:
            sub = food[i]
            food[i] = food[j]
            food[j] = sub

ans = 0
for i in range(4):
    ans += math.ceil(food[i] / 10) * 10
ans += food[4]

print(ans)

Submission status: Wrong Answer

Solution code:
lis=[]
for i in range(5):
    x=int(input())
    lis.append([x%10,x])
lis.sort()
t=0
for i in range(4):
    t+=lis[i][1]+10-lis[i][0]
print(t+lis[4][1])

Submission status: Wrong Answer

Solution code:
a = [int(input()) for i in range(5)]
A = [j%10 for j in a if j%10 != 0]
if A:p=sum(A)
else:p=0
b = sum([((k//10)+1)*10 for k in a if k%10 != 0])
b += sum([l for l in a if l%10 ==0])
if p:print(b-(10-p))
else:print(b)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys, math, itertools, heapq, collections, bisect, string
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
sys.setrecursionlimit(10**7)
inf = float('inf')
mod = 10**9+7
ans = inf ;count = 0 ;pro = 1



A=[int(input()) for i in range(5)]
ans=-10;candi=inf
for ai in A:
    ans+=math.ceil(ai/10)*10
    if ai%10!=0:
        candi=min(candi,ai%10)
print(ans+candi if not candi==inf else ans)

Submission status: Wrong Answer

Solution code:
A=int(input())
a=A%10
B=int(input())
b=B%10
C=int(input())
c=C%10
D=int(input())
d=D%10
E=int(input())
e=E%10
if a==b==c==d==e==0:
  print(A-a+B-b+C-c+D-d+E-e+4*10-10*[a,b,c,d,e].count(0))
else:
  print(A-a+B-b+C-c+D-d+E-e+4*10+min(set([a,b,c,d,e])-set([0]))-10*[a,b,c,d,e].count(0))

Submission status: Wrong Answer

Solution code:
L=[int(input()) for _ in range(5)]
l=[0]*5
for i in range(5):
  l[i]=L[i]%10
print(sum(L)+sum(l)+min(l))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
p = 9
c = 0
A = []
for _ in range(5):
  A.append(int(input())) 
for a in A:
  if a % 10 == 0:
    a = 9
  p = min(p,a%10)
  if a%10 == 0:
    pass
  else:
    a = (((a // 10)+1)*10)
  c += a
print(c+p-10)

Submission status: Wrong Answer

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

mi = [a%10,b%10,c%10,d%10,e%10]
mm = [i for i in mi if i != 0]
mm.sort()
sum = 0
for i in range(5):
	if p[i]%10 != 0:
		sum += (p[i]//10+1)*10
	else:
		sum += p[i]//10*10
if (mm):
	sum -= 10- mm[0]
else:
	sum = 40
print (sum)

Submission status: Wrong Answer

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

mi = [a%10,b%10,c%10,d%10,e%10]
mm = [i for i in mi if i != 0]
mm.sort()
sum = 0
for i in range(5):
	if p[i]%10 != 0:
		sum += (p[i]//10+1)*10
	else:
		sum += p[i]//10*10
if (mm):
	sum -= 10- mm[0]
else:
	sum = 50
print (sum)

Submission status: Wrong Answer

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

mi = [a%10,b%10,c%10,d%10,e%10]
mm = [i for i in mi if i != 0]
mm.sort()
sum = 0
for i in range(5):
	if p[i]%10 != 0:
		sum += (p[i]//10+1)*10
	else:
		sum += p[i]//10*10
if (mm):
	sum -= 10- mm[0]
else:
	sum = 0
print (sum)

Submission status: Wrong Answer

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

mi = [a%10,b%10,c%10,d%10,e%10]
mm = [i for i in mi if i != 0]
mm.sort()
sum = 0
for i in range(5):
	if p[i]%10 != 0:
		sum += (p[i]//10+1)*10
	else:
		sum += p[i]//10*10
if (mm):
	sum -= mm[0]
else:
	sum = 0
print (sum)

Submission status: Wrong Answer

Solution code:
L=[int(input()) for _ in range(5)]
sum=0
modL=[(L[i]-1)%10 for i in range(5)]
last = modL.index(min(modL))
for i in range(5):
    if L[i]%10==0:
        sum += L[i]
    else:
        sum += (int(L[i]//10)+1)*10
if last%10!=0:
    sum -= 10 - L[last]%10
print(sum)

Submission status: Wrong Answer

Solution code:
k=[]

k.append(input())
k.append(input())
k.append(input())
k.append(input())
k.append(input())

m_num=9
m_index=0
for i in range(len(k)):
    if int(k[i][-1]) != 0:
        if int(k[i][-1]) < m_num:
            m_num = int(k[i][-1])
            m_index = i
            
print(m_num,m_index)
sum=0
for i in range(len(k)):
    if i==m_index:
        sum+=int(k[i])
    else:
        sum+=((int(k[i])-1)//10 + 1) * 10
    print(sum)

Submission status: Wrong Answer

Solution code:
import math

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

keta_1 = []

def roundup(arg_num):
    return math.ceil(arg_num/10)*10

for i in range(5):
    keta_1.append(str(list_aaa[i])[-1:])
aaa_index = (keta_1.index(min(keta_1,key= lambda x: int(x)<=0)))
#print(keta_1)
#print(aaa_index)

aaa =list_aaa.pop(aaa_index)
bbb =list(map(lambda x: round(x,-1),list_aaa))

#print(aaa)
#print(bbb)
sum_bbb= sum(list(map(lambda x: roundup(x),list_aaa)))


print(sum_bbb+aaa)

Submission status: Wrong Answer

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

for i in range(5):
  if num[i]%10 == 0:
    a.append(10)
  else:
    a.append(num[i]%10)
    
num_min = min(a)
index_min = a.index(num_min)
num_minus = num[index_min]//10*10 + 10
num_plus = num[index_min]

for j in range(5):
  if num[j]%10 != 0:
    num[j] = num[j]//10*10 + 10

ans = sum(num) - num_minus + num_plus
print(ans)

Submission status: Wrong Answer

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

for i in range(5):
  if num[i]%10 == 0:
    a.append(10)
  else:
    a.append(num[i]%10)
    
num_min = min(a)
index_min = a.index(num_min)

for j in range(5):
  if num[j]%10 != 0:
    num[j] = num[j]//10*10 + 10

ans = sum(num) - (num_min//10 + 10) + num_min
print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

keta_1 = []

for i in range(5):
    if str(list_aaa[i])[-1:] =="0":
        keta_1.append("9")
    else:
        keta_1.append(str(list_aaa[i])[-1:])
aaa_index = (keta_1.index(min(keta_1,key= lambda x: int(x))))
#print(keta_1)
#print(aaa_index)

aaa =list_aaa.pop(aaa_index)
bbb =list(map(lambda x: round(x,-1),list_aaa))

#print(aaa)
#print(bbb)
sum_bbb= sum(list(map(lambda x: round(x,-1),list_aaa)))


print(sum_bbb+aaa)

Submission status: Wrong Answer

Solution code:
import math

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

keta_1 = []

for i in range(5):
    keta_1.append(str(list_aaa[i])[-1:])
aaa_index = (keta_1.index(min(keta_1,key= lambda x: int(x)>=1)))

aaa =list_aaa.pop(aaa_index)
sum_aaa= sum(list(map(lambda x: round(x,-1),list_aaa)))


print(sum_aaa+aaa)

Submission status: Wrong Answer

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

a = list(map(lambda x: x % 10, l))
for i in range(len(a)):
    if a[i] == 0:
        a[i] = 10
a
mini = min(a)
index = a.index(mini)
def calc(x):
    if x % 10 == 0:
        return x
    else:
        return 10 + (x // 10) * 10
ans = 0
for i in range(len(l)):
    if i == index:
        print(l[i])
        ans += l[i]
    else:
        add = calc(l[i])
        print(add)
        ans += add
print(ans)

Submission status: Wrong Answer

Solution code:
dish = [0]*5
dish = [list(input()) for i in range(len(dish))]
time = 0
sumtime = 0

dish_sort = sorted(dish, key=lambda x:abs(1-int(x[-1])),reverse=True)
dish_sort = [''.join(dish_sort[i]) for i in range(len(dish))]
dish_sort = [int(i) for i in dish_sort]

for i in range(len(dish)-1):
    while dish_sort[i] > time:
        time += 10
    sumtime += time
    time = 0
print(sumtime+dish_sort[-1])

Submission status: Wrong Answer

Solution code:
import math
 
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
 
li = [a, b, c, d, e]
 
idx = sorted(list(map(lambda x: [x, (x[1] % 10) + 10] if x[1] == 0 else x, [[0, a], [1, b], [2, c], [3, d], [4, e]])), key=lambda x: x[1])[0][0]
print(sum(map(lambda x: li[x] if x == idx else math.ceil(li[x] * 0.1) * 10, [0, 1, 2, 3, 4])))

Submission status: Wrong Answer

Solution code:
l = []
x = 2147483647
for i in range(5):
   l.append( int(input()) )
   n = int(l[i]%10)
   if n>0 and n<x:
      x = i

ans = 0
for i in range(5):
    if i == x:
        ans += l[i]
    elif l[i]%10 != 0:
        ans += int(l[i]/10)*10 +10
    else:
        ans += l[i]

print(ans)

Submission status: Wrong Answer

Solution code:
#--import&define---------------------
import math

def yes():
    print("Yes")
def no():
    print("No")
#--my_library--------------------------------
#mapを利用した入力
# x,y = map(int,input().split())

#forを利用した入力
#l = []
#for i in range():
#    l.append(int(input()))

#intの最大値
#x = 2147483647
#--以下解答---------------------------------
l = []
ansL = []
x = 2147483647
dex = 0
for i in range(5):
   l.append( int(input()) )
   ansL.append( int(l[i]%10) )
   if ansL[i]>0 and ansL[i]<x:
      dex = i

ans = 0
for i in range(5):
    if i == dex:
        ans += l[i]
    elif l[i]%10 != 0:
        ans += int(l[i]/10)*10 +10
    else:
        ans += l[i]

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

sum_ = 0
min_ = (data_[0]-1)%10
for i in range(5):
    sum_ += ((data_[i]+9)//10)*10
    min_ = min([(data_[i]-1)%10,min_])
    
print(sum_) if min_==0 else print(sum_-10+min_+1)

Submission status: Wrong Answer

Solution code:
import math
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
f=[a%10,b%10,c%10,d%10,e%10]
print(10*math.ceil(a/10)+10*math.ceil(b/10)+10*math.ceil(c/10)+10*math.ceil(d/10)+10*math.ceil(e/10)-(10-min(f)))

Submission status: Wrong Answer

Solution code:
import math
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
f=[a%10,b%10,c%10,d%10,e%10]
print(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)-(10-min(f)))

Submission status: Wrong Answer

Solution code:
# 2019-11-12 22:40:44(JST)
import sys
# import collections
# import math
# from string import ascii_lowercase, ascii_uppercase, digits
# from bisect import bisect_left as bi_l, bisect_right as bi_r
# import itertools
# from functools import reduce
# import operator as op
# from scipy.misc import comb # float
# import numpy as np 

def main():
    dishes = [int(x) for x in sys.stdin.read().split()]
    remainder = [dishes[i] % 10 for i in range(5) if dishes[i] % 10 != 0]
    if remainder:
        min_first_digit = min(remainder)
    else:
        min_first_digit = 0

    total = 0
    for i in range(5):
        if dishes[i] % 10 != 0:
            total += (dishes[i] // 10 + 1) * 10
        else:
            total += dishes[i]
    
    ans = total - (10 - min_first_digit)
    print(ans)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
List= [int(input()) for i in range(5)]
amari =9
time = 0
flag = False;
for i in List:
    if(i%10 != 0):
        time += 10 - i%10
        amari = min(amari,i%10)
        flag = True
output = sum(List) + time
if(flag):
    output += amari
print(output)

Submission status: Wrong Answer

Solution code:
List= [int(input()) for i in range(5)]
amari =9
time = 0
for i in List:
    if(i%10 != 0):
        time += 10 - i%10
        amari = min(amari,i%10)
print(sum(List) + time - (10-amari))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 0

for i in range(len(l)):
  if ans % 10 == 0:
    pass
  else:
    ans += 10 - (ans % 10)
  ans += l[i]
  
ml = []
for i in range(len(l)):
  ml.append(l[i] % 10)
  if ml[i] == 0:
    ml[i] = 10
  
ans -= min(ml)
print(ans)

Submission status: Wrong Answer

Solution code:
l = [ int(input()) for _ in range(5) ]
r = sorted([ 10-((10-i)%10) for i in l ])
print()
u = [ -(-i//10) for i in l ]
print(sum(u)-(10-r[0]))

Submission status: Wrong Answer

Solution code:
t = []
for i in range(5):
  t.append(int(input()))
total = 0
#add the x%10==0s first
#let the last one be x%10 is minimum but not 0
#How am I suppose to compare infinite numbers in pyhton like in c?

last = 256

for x in t:
  if x%10 ==0:
    total+=x
    t.pop(t.index(x))
  elif last>200 or x%10<last%10:
    last = x
if last < 200:
  t.pop(t.index(last))

t.append(last)
for i in range(len(t)):
  temp = total
  if i==0:
    total+=t[i]
  else:
    if t[i-1]%10 == 0:
      total += t[i]
    else:
      total += t[i] + (10 - t[i-1]%10)
print(total)

Submission status: Wrong Answer

Solution code:
#Is this extremely easy????
t = []
for i in range(5):
  t.append(int(input()))
total = 0
#add the x%10==0s first
#let the last one be x%10!=0
for x in t:
  if x%10 ==0:
    total+=x
    t.pop(t.index(x))
for i in range(len(t)):
  temp = total
  if i==0:
    total+=t[i]
  else:
    if t[i-1]%10 == 0:
      total += t[i]
    else:
      total += t[i] + (10 - t[i-1]%10)
print(total)

Submission status: Wrong Answer

Solution code:
#Is this extremely easy????

t = []

for i in range(5):
  t.append(int(input()))
total = 0
for i in range(len(t)):
  if i==0:
    total+=t[i]
  else:
    total += t[i] + 10 - t[i]%10
print(total)

Submission status: Wrong Answer

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

time = 0
result = 0

for food in foods:
  if food % 10 == 0:
    result += food
  else:
    result += (food // 10 + 1) * 10
    if food % 10 > time:
      time = 10 - food % 10

print(result - time)

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)
min_val = min(lst, key=lambda x: 10 if x%10==0 else x%10)
total_time = min_val
for val in lst:
    if val != min_val:
        if val % 10 == 0:
            total_time += val
        else:
            total_time += ((val // 10)+1)*10
print(total_time)

Submission status: Wrong Answer

Solution code:
import math
t = []
for i in range(5):
  t.append(int(input()))
ct = [math.ceil(x/10)*10 for x in t]
fraction = [x%10 for x in t]
min_fraction = min(fraction)
print(sum(ct) - 10 + min_fraction)

Submission status: Wrong Answer

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

def main():
    A = int(input())
    B = int(input())
    C = int(input())
    D = int(input())
    E = int(input())

    ans = 0
    mi = float("inf")

    if A % 10 != 0:
        mi = min(mi, A % 10)
    if B % 10 != 0:
        mi = min(mi, B % 10)
    if C % 10 != 0:
        mi = min(mi, C % 10)
    if D % 10 != 0:
        mi = min(mi, D % 10)
    if E % 10 != 0:
        mi = min(mi, E % 10)

    ans += (-(-A // 10)) * 10
    ans += (-(-B // 10)) * 10
    ans += (-(-C // 10)) * 10
    ans += (-(-D // 10)) * 10
    ans += (-(-E // 10)) * 10

    print(ans - (10 - mi))



if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
N=int(input(""))
T=0
for i in range(N):
    if N%(i+1)==0:
        if i%2==0:
            T=T+1
        else:
            T=T
    else:
        T=T
print(T)

Submission status: Wrong Answer

Solution code:
import numpy as np

X = [int(input()) for _ in range(5)]
Y = np.array(X) % 10

max_y = max(Y)
c = np.sum(Y!=0)

ans = sum(X) + (c*10 -sum(Y)) - (10-max_y)
print(ans)

Submission status: Wrong Answer

Solution code:
t = 10
last = 0
ans = []
food=[]
for _ in range(5):
    food.append(input(int()))

for i in range(5):
    if t > int(str(food[i])[-1]) and int(str(food[i])[-1]) != 0:
        t = int(str(food[i])[-1])
        last = i
# print(food[last])
last = food.pop(last)

for j in food:
    x = 10-int(str(j)[-1])
    if x == 10:
        x = 0
    ans.append(int(j)+x)

# print(ans)
print(sum(ans)+int(last))

Submission status: Wrong Answer

Solution code:
food=[]
t=10
last=0
ans=[]


for _ in range(5):
    food.append(input(int()))

for i in range(5):
    if t>int(str(food[i])[-1]) and int(str(food[i])[-1])!=0:
        t=int(str(food[i])[-1])
        last=i
#print(food[last])
last=food.pop(last)

for j in food:
    x=10-int(str(j)[-1])
    if x==10:
        x=0
    ans.append(int(j)+x)

#print(ans)
print(sum(ans)+int(last))

Submission status: Wrong Answer

Solution code:
l = [int(input()) for i in range(5)]
min = l[0] % 10
min_index = 0
sum = 0
for i in range(1, len(l)):
    if l[i] % 10 != 0 and l[i] % 10 < min:
        min = l[i]
        min_index = i
for i in range(len(l)):
    if i != min_index:
        sum += (l[i] + 9) // 10 * 10
sum += l[min_index]
print(sum)