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:
a = []
for i in range(5):
  a.append(int(input()))

b = [[i, i%10] for i in a]

b.sort(key=lambda x:x[1])
s=b[0][0]
for i in range(1,5):
  s += b[i][0] if b[i][1] == 0 else (b[i][0]+10)//10*10
print(s)

Submission status: Wrong Answer

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


time = 0

for j in range(5):
    a[j][1] = 10-(a[j][0]%10)

for k in range(5):
    a.sort(key=lambda x:x[0])
    a.sort(key=lambda x:x[1])


for l in range(4):
  if a[l][1] == 10:
    time += a[l][0]
  else:
    time += (a[l][0]+(10-(a[l][0]%10)))
time += a[4][0]
print(time)

Submission status: Wrong Answer

Solution code:
#１のくらいのみ見れはいい？
import numpy as np
#a=int(input())
#b=int(input())
#c=int(input())
#d=int(input())
#e=int(input())
a=29
b=20
c=7
d=35
e=120
ls=[a,b,c,d,e]
ls_1=[]
for i in range(len(ls)):
    ls_1.append(int(str(ls[i])[-1]))
ls_1=np.array(ls_1)
ls_1=10-ls_1
ls_1_10=ls_1[ls_1 < 10]#１０を除いたロス
a=np.argmax(ls_1_10)#最大の１の位を探す
ls_non=np.delete(ls_1_10, a, 0)
#ls_non_10=ls_non[ls_non < 10]
ls=np.array(ls)
ans=np.sum(ls) + np.sum(ls_non)
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
import itertools
import math

"""
B - Five Dishes
https://atcoder.jp/contests/abc123/tasks/abc123_b
"""


def order(order_list):
    t1 = math.ceil(order_list[0] / 10) * 10
    t2 = t1 + math.ceil(order_list[1] / 10) * 10
    t3 = t2 + math.ceil(order_list[2] / 10) * 10
    t4 = t3 + math.ceil(order_list[3] / 10) * 10
    t5 = t4 + order_list[4]
    return t5


if __name__ == '__main__':
    a = int(input())
    b = int(input())
    c = int(input())
    d = int(input())
    e = int(input())

    all_order = sorted([a, b, c, d, e])

    all_cases = list(itertools.permutations(all_order))

    min_time = sys.maxsize

    for e in all_cases:
        print(e)
        time = order(e)
        print(time)
        if time < min_time:
            min_time = time

    print("---------------")
    print(min_time)

Submission status: Wrong Answer

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

print(a)
time = 0

for j in range(5):
    a[j][1] = 10-(a[j][0]%10)

for k in range(5):
    a.sort(key=lambda x:x[0])
    a.sort(key=lambda x:x[1])
print(a)

for l in range(4):
  if a[l][1] == 10:
    time += a[l][0]
  else:
    time += (a[l][0]+(10-(a[l][0]%10)))
time += a[4][0]
print(time)

Submission status: Wrong Answer

Solution code:
b=10
sum=0
for _ in range(5):
  a=int(input())
  sum += (a-a%10)
  if b>(a%10):
    b=a%10
sum+=40+b
print(sum)

Submission status: Wrong Answer

Solution code:
set=[int(input()) for x in range(5)]
set=[x for x in set ]
set.sort(key=lambda x:abs((x+9)%10),reverse=True)
#print(set)
last=[set.pop(-1)]
set=[int(round(x,-1)) if x>10 or x==0 else 10 for x in set]
print(sum(set+last))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import math
# Input
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

list = [a, b, c, d, e]

count = 0
for ii in range(len(list)):
    if list[ii] % 10 == 0:
        count += list[ii]
    else:
        count += int(math.ceil(list[ii]/10) * 10)

print(count)

Submission status: Wrong Answer

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

mi = 999
ar = a % 10
if ar > 0 and ar < mi:
  mi = ar
br = b % 10
if br > 0 and br < mi:
  mi = br
cr = c % 10
if cr > 0 and cr < mi:
  mi = cr
dr = d % 10
if dr > 0 and dr < mi:
  mi = dr
er = e % 10
if er > 0 and er < mi:
  mi = er

dic = {a:ar,b:br,c:cr,d:dr,e:er}
su = 0
for i in dic:
  if i%10==mi:
#    print("{} += {}".format(su,i))
    su = su + i
  else:
#    print("{} += {}".format(su,i//10*10+10))
    su = su + i//10*10+10
print(su)

Submission status: Wrong Answer

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

m0=a%10
m1=b%10
m2=c%10
m3=d%10
m4=e%10

li=[a,b,c,d,e]
lis=[m0,m1,m2,m3,m4]

x=lis.index(max(lis))
y=li[x]

li[x]=0

sum=li[0]

mod= sum % 10

if mod!=0:
    sum=sum+(10-mod)

sum=sum+ li[1]

mod= sum % 10

if mod!=0:
    sum=sum+(10-mod)

sum=sum+ li[2]

mod= sum % 10

if mod!=0:
    sum=sum+(10-mod)

sum=sum+ li[3]

mod= sum % 10

if mod!=0:
    sum=sum+(10-mod)

sum=sum+ li[4]

mod= sum % 10

if mod!=0:
    sum=sum+(10-mod)

sum=sum+y


print(sum)

Submission status: Wrong Answer

Solution code:
A=[]
Y=[]
for i in range(5):
    x = int(input())
    y = x % 10
    if y != 0:
        x = x + (10-y)
    A.append((y,x))

B = sorted(A)
sum = 0
flag = 0
print(B)
for i in range(len(B)):
    y,x = B[i]
    sum += x
    if flag == 0:
        if y != 0:
            sum -= 10-y
            flag = 1

print(sum)

Submission status: Wrong Answer

Solution code:
import sys

data = []
for i in range(5):
  data.append(int(input()))

ans = 0

for zero_c in range(len(data)):
  if divmod(data[zero_c], 10)[1] == 0:
    ans += data[zero_c]
    data[zero_c] = 0

for i in range(9, 0, -1):
  for j in range(len(data)):
    if data.count(0) == 4:
      ans += max(data)
      print(ans)
      sys.exit()
    else:
      if divmod(data[j], 10)[1] == i:
        ans += data[j] + (10 - i)
        data[j] = 0

Submission status: Wrong Answer

Solution code:
l=[input() for i in range(5)]
a=[0, 0, 0, 0, 0]
e=9
for i in range(5):
  if e >= int(l[i][-1]) and not(int(l[i][-1]) == 0):
      a[4] = l[i]

if a[4] is 0:
  a[4] = l[0]

l.remove(a[4])
l = [int(i) for i in l]

for j in range(4):
  while(not(int(l[j]) % 10 is 0)):
    l[j]+=1
  a[j] = int(l[j])
  
a[4] = int(a[4])
print(sum(a))

Submission status: Wrong Answer

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

N=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
X=[a%10,b%10,c%10,d%10,e%10]
n=0
while(n!=5):
  if X[n]==0:
    X[n]=9
  n+=1
  
if X==[9,9,9,9,9]:
  print(N)
else:
  print(N-(10-min(X)))

Submission status: Wrong Answer

Solution code:
x = [input() for _ in range(5)]
t = 9
digits = 0
for idx, i in enumerate(x):
	digits = len(i)
	a = int(i[-1])
	if t > a and a != 0:
		t = a
	if a != 0:
		if digits == 1:
			x[idx] = "10"
		elif digits == 2:
			x[idx] = "".join((str(int(i[-2]) + 1), "0"))
		else:
			x[idx] = "".join((i[-3], str(int(i[-2]) + 1), "0"))
print(sum([int(_) for _ in x]) - 10 + t)

Submission status: Wrong Answer

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

num = []
num.append(a%10)
num.append(b%10)
num.append(c%10)
num.append(d%10)
num.append(e%10)

cnt = 0
for i in range(len(num)):
  if num[i] == 0:
    cnt += 1
ans = min(num)
x = 10
if min(num) == 0:
  if 9 in num:
    x = 9
    if 8 in num:
      x = 8
      if 7 in num:
        x = 7
        if 6 in num:
          x = 6
          if 5 in num:
            x = 5
            if 4 in num:
              x = 4
              if 3 in num:
                x = 3
                if 2 in num:
                  x = 2
                  if 1 in num:
                    x = 1
  sum = a+(10-a%10) + b+(10-b%10) + c+(10-c%10) + d+(10-d%10) + e+(10-e%10)-10-10*cnt+x
else:  
  sum = a+(10-a%10) + b+(10-b%10) + c+(10-c%10) + d+(10-d%10) + e+(10-e%10)-10-10*cnt+ans
print(sum)

Submission status: Wrong Answer

Solution code:
array=[int(input()) for i in range(5)]
array2=[array[i]%10 for i in range(5)]
n=10
sum=0
for i in range(5): 
    if array2[i]<n and array2[i]!=0: 
        n=array2[i]
for i in range(5): 
    if array2[i]!=0: 
        sum += int(array[i]/10)+1
    else: 
        sum += int(array[i]/10)
if n!=10: 
    print(sum*10-(10-n))
else: 
    print(sum*10-10)

Submission status: Wrong Answer

Solution code:
def kiriage(i):
    if i % 10 == 0:
        return i
    else:
        juu = i // 10
        return (juu + 1) * 10

time = [int(input()) for _ in range(5)]
ans = 643
for t1 in time:
    total = 0
    copied = time.copy()
    copied.remove(t1)
    total += kiriage(t1)
    for t2 in copied:
        copied.remove(t2)
        total += kiriage(t2)
        for t3 in copied:
            copied.remove(t3)
            total += kiriage(t3)
            for t4 in copied:
                copied.remove(t4)
                total += kiriage(t4)
                for t5 in copied:
                    copied.remove(t5)
                    total += t5

                    ans = min(ans, total)

print(ans)

Submission status: Wrong Answer

Solution code:
X = [0]*5
Y = [0]*5
diff = [0]*5

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

Y = [(x // 10)*10 if x % 10 == 0 else (x // 10 + 1)*10 for x in X]
dif = [Y[i]-X[i] for i in range(5)]

i = 0
sum = 0
count = 0

print(X)
print(Y)
print(dif)

for i in range(5):
    if (dif[i] != max(dif)):
        sum = sum + Y[i]
    else:
        s = Y[i]
        t = X[i]
        count = count + 1

sum = sum + (count-1)*s + t

print(sum)

Submission status: Wrong Answer

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

MaxTime = 0
for t in T:
	MaxTime += ((t + 9) // 10) * 10

MaxDiffTime = 9
for t in T:
	if t % 10 != 0:
		MaxDiffTime = min(MaxDiffTime, t % 10)

print(max(0, MaxTime - (10 - MaxDiffTime)))

Submission status: Wrong Answer

Solution code:
import numpy as np
import itertools
data = [int(input()) for _ in range(5)]

for orders in itertools.permutations(data):
    current_time = 0
    next_arrival = 0
    for i in range(5):
        next_arrival = current_time + orders[i]
        current_time = np.ceil(next_arrival/10).astype(int) *10
print(next_arrival)

Submission status: Wrong Answer

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

ans = 0

for zero_c in range(len(data)):
  if divmod(data[zero_c], 10)[1] == 0:
    ans += data[zero_c]
    data[zero_c] = 0

import sys
for i in range(9, 0, -1):
  for j in range(len(data)):
    if data.count(0) == 4:
      ans += max(data)
      sys.exit()
    else:
      if divmod(data[j], 10)[1] == i:
        ans += data[j] + (10 - i)
        data[j] = 0

print(ans)

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]
l = sorted(l)
# print(l)
ans = 0
tl = []
for v in l:
    temp = v % 10
    while temp > 10:
        temp = v % 10
    if temp == 0:
        temp = 100
    tl.append(temp)
# print(tl)
tt = []
for i in range(5):
    tt.append([l[i], tl[i]])

# print(tt)
tt.sort(key=lambda x:x[0],reverse=True)
tt.sort(key=lambda x:x[1],reverse=True)

print(tt)
a = tl.index(min(tl))
# print(a)
# print(l)
l = [x[0] for x in tt]
# print(l)
for i,v in enumerate(l):
    if i != len(l) - 1:
        temp = v % 10
        temp = 10 - temp + v
        ans = ans + temp
    else:
        ans = ans + v

print(ans)

Submission status: Wrong Answer

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

menu = [a, b, c, d, e]

time = 0
count = 0
for i in range(5):
    if menu[i] % 10 == 0:
        tmp = menu[count]
        menu[count] = menu[i]
        menu[i] = tmp
        count += 1
           

while True:
    flg = 0
    for i in range(4-count):
        num1 = menu[i+count]
        num2 = menu[i+count+1]
        if num1 % 10 < num2 % 10:
            menu[i+count] = num2
            menu[i+count+1] = num1
            flg = flg + 1
    if flg == 0:
        break
print(menu)

for i in range(5):
    time += menu[i]

Submission status: Wrong Answer

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

data = [A,B,C,D,E]

X = 9
for i in range(4):
  if (data[i] % 10) <= X & (data[i] % 10) != 0:
    data.append(data[i])
    X = (data[i] % 10)
    del data[i]
  
#print(data)
sum = 0
for i in range(3):
  if (data[i] % 10) == 0:
    sum += data[i]
  else:
    sa = 10 - (data[i] % 10)
    sum += (data[i] + sa)
sum += data[4]

print(sum)

Submission status: Wrong Answer

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

N=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
X=[a%10,b%10,c%10,d%10,e%10]
n=0
while(n!=5):
  if X[n]==0:
    X[n]=9
  n+=1
  
print(N-(10-min(X)))

Submission status: Wrong Answer

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

ans = 0

for zero_c in range(len(data)):
  if divmod(data[zero_c], 10)[1] == 0:
    ans += data[zero_c]
    data[zero_c] = 0

import sys
for i in range(9, 0, -1):
  for j in range(len(data)):
    if data.count(0) == 4:
      ans += max(data)
      print("ansha:", ans)
      sys.exit()
    else:
      if divmod(data[j], 10)[1] == i:
        ans += data[j] + (10 - i)
        print("ans:", ans)
        data[j] = 0

print(ans)

Submission status: Wrong Answer

Solution code:
a=[]
for i in range(5):
    a.append(int(input()))
ans=0
min=10
minn=0
for i in range(5):
    if (a[i]%10<=min and a[i]%10!=0):
        min=a[i]%10
        minn=i
for i in range(5):
    if a[i]%10!=0:
        b=(a[i]//10)
        ans=ans+b*10+10
    elif a[i]==0:
        ans+=10
    else:
        ans=ans+a[i]
if min!=0:
    print(ans-(10-a[minn]%10))
else:
    print(ans)

Submission status: Wrong Answer

Solution code:
e,*a=sorted(eval('int(input()),'*5),key=lambda x:~x%10);print(e-sum(-i//10*10for i in a))

Submission status: Wrong Answer

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

MaxTime = 0
for t in T:
	MaxTime += ((t + 9) // 10) * 10

MaxDiffTime = 9
for t in T:
	if t % 10 != 0:
		MaxDiffTime = min(MaxDiffTime, t % 10)

print(MaxTime - (10 - MaxDiffTime))

Submission status: Wrong Answer

Solution code:
from sys import stdin
import math
import itertools


def makeIntMatrix(lines):
    intMatrix = []
    for a in makeStringMatrix(lines):
        intMatrix.append([int(b) for b in a])
    return intMatrix
 
 
def makeStringMatrix(lines):
    stringMatrix = [line.split() for line in lines]
    return stringMatrix
 
 
def makeInt(line):
    return int(line.rstrip())
 
 
def makeMultiInteger(line):
    return [int(x) for x in line.rstrip().split()]


def solve():
    a = makeInt(input())
    b = makeInt(input())
    c = makeInt(input())
    d = makeInt(input())
    e = makeInt(input())
    l = [0, a, b, c, d, e]
    m = 9
    m_i = 0
    for i in range(len(l)):
        if m > l[i] % 10 and l[i] % 10 > 0:
            m = l[i] % 10
            m_i = i
    if m != 0:
        temp = l[-1]
        l[-1] = l[m_i]
        l[m_i] = temp

    #ls = sorted(l)
    #print(ls)
    lst = 0
    alst = 0
    i = 1
    # 10ずつ足されるのがベスト
    at = 0
    while(i < 6):
        if at >= l[i-1]:
            #print(at, ls[i-1])
            if i != 5:
                #print(at)
                alst += at
                #print(ls[i])
            else:
                #print(at)
                alst += at
                alst += l[i]
                return alst
            at = 0
            i += 1
            #print(alst)
        else:
            at += 10


def main():
    answer = solve()
    print(answer)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
A = [0] * 5
A[0] = int(input())
A[1] = int(input())
A[2] = int(input())
A[3] = int(input())
A[4] = int(input())
ans = 0
min1 = 10
for i in range(0,5):
    m = A[i] % 10
    if ((m > 0) and (m < min1)):
        min1 = m        
    ans += (A[i] // 10) * 10
print(ans - (10 - min1))

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]
h = 0
for i in range(0, 5):
    f = l[i] // 10
    g = l[i] % 10
    if not(g == 0):
        f = f + 1
    f = f * 10
    h = h + f
print(h)

Submission status: Wrong Answer

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

N=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
X=[a%10,b%10,c%10,d%10,e%10]
n=0
while(n!=5):
  if X[n]==0:
    X[n]=9
  n+=1
if a==b==c==d==e:
  print(N-min(X))
else:
  print(N-(10-min(X)))

Submission status: Wrong Answer

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

N=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
X=[a%10,b%10,c%10,d%10,e%10]
n=0
while(n!=5):
  if X[n]==0:
    X[n]==9
  n+=1
if a==b==c==d==e:
  print(N-min(X))
else:
  print(N-(10-min(X)))

Submission status: Wrong Answer

Solution code:
x = [int(input()) for i in range(5)]
y = []
for i in range(5):
    tmp = x[i]%10
    if(tmp!=0):
        y.append(tmp)
md = min(y) if y !=[] else 0
print(sum(x[i]//10 for i in range(5))*10 + (len(y)-1)*10+md)

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]
h = 0
for i in range(0, 5):
    f = l[i] // 5
    g = l[i] % 5
    if not(g == 0):
        f = f + 1
    f = f * 5
    h = h + f
print(h)

Submission status: Wrong Answer

Solution code:
cnt = 0
min = 9
li =[]

for i in range(5):
	a = int(input())
	li.append(a)
	if a % 10 == 0:
		cnt += a
	else:
		cnt += a + 10 - a % 10
		if a % 10 < min:
			min = a % 10

cnt = cnt + min - 10

print(cnt)

Submission status: Wrong Answer

Solution code:
array=[int(input()) for i in range(5)]
n=10
sum=0

for i in range(5): 
    if array[i]%10<n and array[i]%10!=0: 
        n=array[i]
for i in range(5): 
    if array[i]%10!=0: 
        sum += int(array[i]/10)+1
    else: 
        sum += int(array[i]/10)
if n!=10: 
    print(sum*10-(10-n%10))
else: 
    print(sum*10-10)

Submission status: Wrong Answer

Solution code:

list = [int(input()) for i in range(5)]
kList = []
for j in range(0,10):
    for i in list:
         if (i+j) % 10 == 0:
            kList.append(i) 

nList = [round(i+4,-1) for i in kList[0:len(kList)-1]]
print(sum(nList) + kList[-1])

Submission status: Wrong Answer

Solution code:
import numpy as np
l = np.zeros(5)
t = np.zeros(5)
k = True
for i in range(5):
    l[i] = int(input())
    t[i] = l[i] - (l[i]//10)*10
    if t[i] != 0 :
        k = False
t.sort()
l = np.ceil(l/10)*10
if k :
    ans = int(np.sum(l)+t[0])
else :
    ans = int(np.sum(l)+t[0])-10
print(ans)

Submission status: Wrong Answer

Solution code:
a=[]
for i in range(5):
    a.append(int(input()))
ans=0
min=10
minn=0
for i in range(5):
    if (a[i]%10<=min and a[i]%10!=0) or a[i]==0:
        min=a[i]%10
        minn=i
for i in range(5):
    if a[i]%10!=0:
        b=(a[i]//10)
        ans=ans+b*10+10
    elif a[i]==0:
        ans+=10
    else:
        ans=ans+a[i]
print(ans-(10-a[minn]%10))

Submission status: Wrong Answer

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

g = []
g.append(a)
g.append(b)
g.append(c)
g.append(d)
g.append(e)

G = []

G.append(a%10)
G.append(b%10)
G.append(c%10)
G.append(d%10)
G.append(e%10)
 
x = G.index(min(G))

loop = [0,1,2,3,4]
loop.remove(x)

answer = 0
for i in loop:
  answer += g[i]
  answer += 10-G[i]
answer += g[x]

print(answer)

Submission status: Wrong Answer

Solution code:
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
tmp = []
time = 0
for i in range(0,5):
    w = 0
    num = int(input())
    while True:
      if float.is_integer((num + w)/10):
        break
      w += 1
    tmp.append({"num":num, "weight":w})
tmp = sorted(tmp, key=lambda x:x['weight'])
for i in range(0,5):
    time += tmp[i]['num']
    if i < 4:
    	time = Decimal(time/10).quantize(Decimal('0'), rounding=ROUND_HALF_UP) * 10
print(time)

Submission status: Wrong Answer

Solution code:
count=0
m=9

for i in range(5):
    a = input()
    count += int(a)//10
    if a[-1:]=='0':
        count -= 1
    if 0<int(a[-1:])<m:
        m = int(a[-1:])
print(count*10+m+40)

Submission status: Wrong Answer

Solution code:
import math
n = [int(input()) for i in range(5)]
hld = 9
answer = 0
for i in n:
  last_dig = i % 10
  if last_dig <= hld:
    hld = last_dig
  answer += math.ceil(i/10)*10
if hld != 0:
  print(answer - 10 + hld)
else:
  print(answer + hld)

Submission status: Wrong Answer

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

num = []
num.append(a%10)
num.append(b%10)
num.append(c%10)
num.append(d%10)
num.append(e%10)

cnt = 0
for i in range(len(num)):
  if num[i] == 0:
    cnt += 1
ans = min(num)
x = 10
if min(num) == 0:
  if a%10 != 0 and b%10 != 0 and a%10 > b%10:
    x = b%10
  if b%10 != 0 and c%10 != 0 and x > c%10:
    x = c%10
  if c%10 != 0 and d%10 != 0 and x > d%10:
    x = d%10
  if d%10 != 0 and e%10 != 0 and x > e%10:
    x = e%10
  sum = a+(10-a%10) + b+(10-b%10) + c+(10-c%10) + d+(10-d%10) + e+(10-e%10)-10-10*cnt+x
else:  
  sum = a+(10-a%10) + b+(10-b%10) + c+(10-c%10) + d+(10-d%10) + e+(10-e%10)-10-10*cnt+ans

print(sum)

Submission status: Wrong Answer

Solution code:
import math
a,b,c,d,e=[int(input()) for i in range(5)]
x=[]
y=[]
def ceil(src, range):
  return ((int)(src / range) + 1 ) * range
for s in [a,b,c,d,e]:
  if s%10 != 0:
    x.append(s%10)
    t=min(x)
  y.append(ceil(s,10))
if a%10==0 and b%10==0 and c%10==0 and d%10==0 and e%10==0:
  print(a+b+c+d+e)
else:
  ans = sum(y)
  ans= ans-10+t
  print(ans)

Submission status: Wrong Answer

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

num_first =[]

for str1 in num_list:
  number=int(str1[-1])
  if number==0:
    number=9
  num_first.append(number)

index=num_first.index(min(num_first))
sum=0
for i in range(5):
  if i==index:
    sum = sum+int(num_list[i])
  else:
    num2=0
    str2=num_list[i]
    if int(str2[-1])<5 and int(str2[-1])!=0 :
      num2=int(str2)+4
    else:
      num2=int(str2)
    sum=sum+round(num2,-1)
print(sum)

Submission status: Wrong Answer

Solution code:
import math
a = list(range(5))
a[0] = int(input())
a[1] = int(input())
a[2] = int(input())
a[3] = int(input())
a[4] = int(input())
b = list(range(5))
c = list(range(5))
d = 0
s = 9
e = 0
total = 0
for i in range(5):
    if((a[i]%10)==0):
        b[d] = a[i]
        d += 1
    else:
        if((a[i]%10)<s):
            s = a[i]%10
for i in range(5):
    if((a[i]%10)!=0):
        e = a[i]/10
        e = math.ceil(e)
        e = e*10
        b[d] = e
        d += 1
for i in range(5):
    total += b[i]
total -= 10
total += s
print(total)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
if a >= 100:
    a1 = a % 10
else:
    a2 = a - 100
    a1 = a2 % 10
if b >= 100:
    b1 = b % 10
else:
    b2 = b - 100
    b1 = b2 % 10
if c >= 100:
    c1 = c % 10
else:
    c2 = c - 100
    c1 = c2 % 10
if d >= 100:
    d1 = d % 10
else:
    d2 = d - 100
    d1 = d2 % 10
if e >= 100:
    e1 = e % 10
else:
    e2 = e - 100
    e1 = e2 % 10
if a1 == 0:
    a1 = 9
if b1 == 0:
    b1 = 9
if c1 == 0:
    c1 = 9
if d1 == 0:
    a1 = 9
if e1 == 0:
    e1 = 9
lis = [a1,b1,c1,d1,e1]
if a1 == min(lis) :
    answer = round(b,-1) + round(c,-1) + round(d,-1) + round(e,-1) + a
if b1 == min(lis):
    answer = round(a,-1) + round(c,-1) + round(d,-1) + round(e,-1) + b
if c1 == min(lis):
    answer = round(b,-1) + round(a,-1) + round(d,-1) + round(e,-1) + c
if d1 == min(lis):
    answer = round(b,-1) + round(c,-1) + round(a,-1) + round(e,-1) + d
if e1 == min(lis):
    answer = round(b,-1) + round(c,-1) + round(d,-1) + round(a,-1) + e
print(answer)

Submission status: Wrong Answer

Solution code:
29
20
7
35
120

Submission status: Wrong Answer

Solution code:
import math
a=[int(input()) for i in range(5)]
b=[0]*5
for i in range(5):
  b[i]=(a[i]%10)
c=min(b)
c=b.index(c)
count=0
for i in range(5):
  if i!=c:
    count=count+math.ceil((a[i]/10))
count=count*10+a[c]
print(count)

Submission status: Wrong Answer

Solution code:
T = []
for i in range(5):
    T.append(input())
tmp = []
for i in range(5):
    tmp.append(int(T[i][-1]))
ans = []
for i in range(5):
    if 0 < tmp[i] and tmp[i] <= 5:
        ans.append(i)
if ans == []:
    for i in range(5):
        if tmp[i] > 5:
            ans.append(i)
if ans == []:
    ans = [0, 1, 2, 3, 4]

lastidx = tmp.index(min([tmp[x] for x in ans]))

sum_ = 0
for i in range(5):
    if tmp[i] == 0:
        sum_ += int(T[i])
    else:
        sum_ += (int(T[i]) + 10 - tmp[i])
print(sum_ - 10 + tmp[lastidx])

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]
l = sorted(l)
# print(l)
ans = 0
tl = []
for v in l:
    temp = v % 10
    while temp > 10:
        temp = v % 10
    if temp == 0:
        temp = 100
    tl.append(temp)
# print(tl)
tt = []
for i in range(5):
    tt.append([l[i], tl[i]])

# print(tt)
tt.sort(key=lambda x:x[0])
tt.sort(key=lambda x:x[1],reverse=True)
# print(tt)
a = tl.index(min(tl))
# print(a)
# print(l)
l = [x[0] for x in tt]
# print(l)
for i,v in enumerate(l):
    if i != len(l) - 1:
        temp = v % 10
        temp = 10 - temp + v
        ans = ans + temp
    else:
        ans = ans + v

print(ans)

Submission status: Wrong Answer

Solution code:
import math
a=[int(input()) for i in range(5)]
b=[0]*5
for i in range(5):
  b[i]=(a[i]%10)
c=min(b)
c=b.index(c)
count=0
for i in range(5):
  if i!=c:
    count=count+math.ceil((a[i]//10))
count=count*10+a[c]
print(count)

Submission status: Wrong Answer

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


a_1=(int(str(a)[-1]))
b_1=(int(str(b)[-1]))
c_1=(int(str(c)[-1]))
d_1=(int(str(d)[-1]))
e_1=(int(str(e)[-1]))

if a_1==0:
    a_1=10
if b_1==0:
    b_1=10
if c_1==0:
    c_1=10
if d_1==0:
    d_1=10
if e_1==0:
    e_1=10

a_2=10-a_1
b_2=10-b_1
c_2=10-c_1
d_2=10-d_1
e_2=10-e_1

A=a+a_2
B=b+b_2
C=c+c_2
D=d+d_2
E=e+e_2

print(A+B+C+D+E-min(a_1,b_1,c_1,d_1,e_1))

Submission status: Wrong Answer

Solution code:
set=[int(input()) for x in range(5)]
set=[x if x>10 or x==0 else 10 for x in set ]
set.sort(key=lambda x:abs((x+9)%10),reverse=True)
#print(set)
last=[set.pop(-1)]
set=[int(round(x,-1)) for x in set]
print(sum(set+last))

Submission status: Wrong Answer

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

for i in range(5):
  ra.append(a[i]%10)

tot=0
for i in range(5):
  if ra[i]==0:
    tot+=a[i]

  else:
    tot+=a[i]+10-ra[i]


ra.sort()
for i in range(5):
  if ra[i]==0:
    continue
  else:
    tot-=ra[i]
    break
print(tot)

Submission status: Wrong Answer

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

ans = 0

for zero_c in range(len(data)):
  if divmod(data[zero_c], 10)[1] == 0:
    ans += data[zero_c]
    data[zero_c] = 0

for i in range(9, 0, -1):
  if data.count(0) == 4:
    ans += max(data)
    break
  else:
    for j in range(len(data)):
      if divmod(data[j], 10)[1] == i:
        ans += data[j] + (10 - i)
        data[j] = 0

print(ans)

Submission status: Wrong Answer

Solution code:
inp = []
for i in range(5):
    inp.append(int(input()))
inp2 = sorted(inp, key=lambda x: x%10)
inp3 = [d for d in inp2 if d%10 != 0]
if inp3 != []:

    last = inp3[0]
    inp2.remove(last)
else:
    last = 0
    inp2.pop(0)

r = 0
for c,z in enumerate(inp2):
    if z%10 == 0:
        r += z
    else:
        r += z//10 * 10 + 10
res = r + last
print(res)

Submission status: Wrong Answer

Solution code:
import math
n = [int(input()) for i in range(5)]
temp = 9
answer = 0
for i in n:
  last_dig = i % 10
  if last_dig <= temp:
    temp = last_dig
  answer += math.ceil(i/10)*10
print(answer - 10 + temp)

Submission status: Wrong Answer

Solution code:
A=[]
Y = []
for i in range(5):
    x = int(input())
    y = x % 10
    if y != 0:
        x = x + (10-y)
    A.append((y,x))

B = sorted(A)
sum = 0

for i in range(len(B)):
    y,x = B[i]
    sum += x
    if i == 0:
        if y != 0:
            sum -= 10-y

print(sum)

Submission status: Wrong Answer

Solution code:
L = [int(input()) for i in range(5)]
l = [n % 10 % 100 for n in L]
i = l.index(min(l))

ans = sum([n + (10 - ((n % 10) % 100)) for n in L]) - ((10 - ((L[i] % 10) % 100)) + L[i]) + L[i]
print(ans)

Submission status: Wrong Answer

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