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:
li=[]
li2=[]
ans=0
for i in range(5):
  li.append(int(input()))
for i in range(5):
  li2.append((li[i]-1)%10)
for i in range(5):
  ans+=(li[i]//10)*10
print(ans+min(li2)+41)

Submission status: Wrong Answer

Solution code:
def five_dishes(a,n):
    b = []
    ttime = 0
    maxnum,opt,pos = 0,0,0
    for i in range(n):
        if a[i]%10 == 0:
            pass
        else:
            opt = 10 - a[i]%10
        if maxnum < opt:
            maxnum = opt
            pos = i
    tmp = a.pop(pos)
    for i in range(n-1):
        if a[i]%10 == 0:
            ttime += a[i]
        else:
            ttime += a[i] + 10 - a[i]%10

    else:
        ttime += tmp

    print("time %d"  %ttime)

if __name__ == '__main__':
    a = [int(raw_input()) for i in range(5)]
    five_dishes(a,len(a))

Submission status: Wrong Answer

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

lastOrder = min(cookT.items(), key=lambda x:x[1]%10)[0]

totalT = 0
for i in range(5):
  if i == lastOrder:
    totalT += cookT[lastOrder]
  else:
    tempX = cookT[i]
    tempY = math.ceil(tempX%10 / 10)*10
    totalT += tempX//10 *10 + tempY

print(totalT)

Submission status: Wrong Answer

Solution code:
def main():
    dish = [int(input()) for i in range(5)]
    dish_10 = [ [dish[i]%10, dish[i]] for i in range(5)]
    for i in range(len(dish_10)):
    	if (dish_10[i][1]==0):
    		dish_10[i][1] = 10
    dish_10.sort()
    ans = 0
    for i in range(1,5):
        ans += ceiling_10(dish_10[i][1])
    ans += dish_10[0][1]
    print(ans)
 
def ceiling_10(i):
    if (i%10 == 0):
        return i
    else:
        return (i//10+1)*10
main()

Submission status: Wrong Answer

Solution code:
a = []
b = []
min = 10
minutes = 0

for i in range(5):
    a.append(int(input()))
    if 0 < a[i] % 10 < min:
        min = a[i] % 10
        min_index = i
    else:
        min_index = 1

a[4], a[min_index] = a[min_index], a[4]

for i in range(4):
    if a[i] % 10 != 0:
        minutes += (a[i] // 10 + 1) * 10
    else:
        minutes += a[i]

minutes += a[4]

print(minutes)

Submission status: Wrong Answer

Solution code:
res = 0
minS = 10
for i in range(5):
  N = int(input())
  s = N % 10
  t = N // 10
  if s == 0:
    res = res + t * 10
  else:
    minS = min(minS, s)
    res = res + (t + 1)*10
if minS != 10:
  minS -= 10
print(minS + res)

Submission status: Wrong Answer

Solution code:
t=[int(input()) for _ in range(5)]
s=[]
for i in range(5):
    s.append(t[i]%10)
    t[i]=-(-t[i]//10)*10
print(sum(t)-10+sorted(s)[-5+s.count(0)])

Submission status: Wrong Answer

Solution code:
t=[int(input()) for _ in range(5)]
s=[]
for i in range(5):
    s.append(t[i]%10)
    t[i]=-(-t[i]//10)*10
s=sorted(s)
ans=sum(t)-10
cnt=0
for i in range(len(s)):
    if s[i]!=0:
        ans+=s[i]
        break
    else:cnt+=1
if cnt>0:
    ans+=10
print(ans)

Submission status: Wrong Answer

Solution code:
t=[int(input()) for _ in range(5)]
s=[]
for i in range(5):
    s.append(t[i]%10)
    t[i]=-(-t[i]//10)*10
s=sorted(s)
ans=sum(t)-10
for i in range(len(s)):
    if s[i]!=0:
        ans+=s[i]
        break
print(ans)

Submission status: Wrong Answer

Solution code:
def main():
    dish = [int(input()) for i in range(5)]
    dish_10 = [ [dish[i]%10, dish[i]] for i in range(5)]
    dish_10.sort()
    ans = 0
    for i in range(1,5):
        ans += ceiling_10(dish_10[i][1])
    ans += dish_10[0][1]
    print(ans)

def ceiling_10(i):
    if (i%10 == 0):
        return i
    else:
        return (i//10+1)*10
main()

Submission status: Wrong Answer

Solution code:
time_list = []
loss_time_list = []
for i in range(5):
  time_list.append(int(input()))
  loss_time_list.append(10-time_list[i]%10)
  
print(sum(time_list)+sum(loss_time_list)-max(loss_time_list))

Submission status: Wrong Answer

Solution code:
t = [int(input()) for _ in range(5)]
ans = 0
min_b = 100
for i in range(5):
  a = t[i]//10
  b = t[i]%10
  if b == 0:
    ans += a
  else:
    if min_b > b:
      min_b = b
    ans += a+1
print(ans*10 - (10-min_b))

Submission status: Wrong Answer

Solution code:
dishes = []
for i in range(5):
    dishes.append(int(input()))
last = 10
last_index = 5
for i in range(5):
    if dishes[i] % 10 != 0:
        last = min(last,dishes[i]%10)
        last_index = i
ans = 0
for i in range(5):
    if i != last_index:
        if dishes[i] % 10 != 0:
            ans += dishes[i] + 10 - dishes[i] % 10
        else:
            ans += dishes[i]
    else:
        ans += dishes[i]
print(ans)

Submission status: Wrong Answer

Solution code:
import itertools

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

res = 1 << 28
for ss in itertools.permutations(s):
    tmp = 0
    tmp += (ss[0] + 9) // 10
    tmp += (ss[1] + 9) // 10
    tmp += (ss[2] + 9) // 10
    tmp += (ss[3] + 9) // 10
    tmp += ss[4]
    res = min(res, tmp)

print(res)

Submission status: Wrong Answer

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

res = A%10
res = min(res, B%10)
res = min(res, C%10)
res = min(res, D%10)
res = min(res, E%10)

res = res + A // 10 + B // 10 + C // 10 + D // 10 + E // 10
print(res)

Submission status: Wrong Answer

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

res = A%10
res = min(res, B%10)
res = min(res, C%10)
res = min(res, D%10)
res = min(res, E%10)

res = res + A//10 + B//10 + C//10 + D//10 + E//10
print(res)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!

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

minr = 10
minf = 0
for f in food:
    if f % 10 != 0 :
        if f % 10 < minr :
            minr = f % 10
            minf = f
    else:
        minf = f

food.remove(minf)
food.append(minf)

sumf = 0
i = 0
for f in food:
    if i == 4:
        sumf += f
    elif f % 10 != 0:
        sumf += int(f/10) * 10 + 10
    else:
        sumf += f
    i+=1
print(sumf)

Submission status: Wrong Answer

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

    min_mod = 0
    elapsed_time = 0
    for x in [A, B, C, D, E]:
        mod = x % 10
        if 0 < mod < min_mod:
            min_mod = mod
        time = x if x % 10 == 0 else (x // 10 + 1) * 10
        elapsed_time += time

    elapsed_time = elapsed_time - (10 - min_mod) if min_mod != 0 else elapsed_time
    print(elapsed_time)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

    min_mod = float('inf')
    elapsed_time = 0
    for x in [A, B, C, D, E]:
        mod = x % 10
        if 0 < mod < min_mod:
            min_mod = mod
        time = x if x % 10 == 0 else (x // 10 + 1) * 10
        elapsed_time += time

    elapsed_time = elapsed_time - (10 - min_mod)
    print(elapsed_time)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

time = [[a, a%10], [b, b%10], [c, c%10], [d, d%10], [e, e%10]]
ans = 0

for i in range(5):
	if time[i][1] == 0:
		time[i][1] = 10
		
time = sorted(time, key = lambda x:x[1], reverse = True)

for i in range(4):
	ans += time[i][0] + (10 - time[i][1])
	
print(ans + time[4][0])
print(ans + time[4][0])

Submission status: Wrong Answer

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

time = [[a, a%10], [b, b%10], [c, c%10], [d, d%10], [e, e%10]]
ans = 0

for i in range(5):
	if time[i][1] == 0:
		time[i][1] = 10
		
time = sorted(time, key = lambda x:x[1], reverse = True)

for i in range(4):
	ans += int(time[i][0] / 10) * 10 + 10
	
print(ans + time[4][0])

Submission status: Wrong Answer

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

ans = 0
min_digits = 10
digits_idx = 0
for idx, dish in enumerate(dishes):
  if dish%10 == 0:
    ans += dish
  else:
    ans += dish + 10 - dish%10
  if dish%10 < min_digits and dish%10 !=0:
    digits_idx = idx
    min_digits = dish%10
ans -= (10 - dishes[digits_idx]%10)
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]
S = [0]
for l in L:
    if l % 10 != 0:
        S.append(l % 10)
min_s = min(S)

s = 0
flag = True
for l in L:
    if flag and min_s == l % 10:
        s += l
        flag = False
    elif 0 == l % 10:
        s += l
    else:
        s += 10 * (l // 10) + 10
print(s)

Submission status: Wrong Answer

Solution code:
def more(n):
    n=int(n)
    a=n//10
    b=(a+1)*10
    return b
info=[]
for i in range(5):
    a=int(input())
    info.append([a,more(a),more(a)-a])
#print(info)
info2=sorted(info,key=lambda x:x[2])
#print(info2)
total=info2[4][1]
print(total+sum(info2[i][0] for i in range(4)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    time = []
    ans = 0
    min_time = 9
    for i in range(5):
        time.append(int(raw_input()))
    for i in time:
        if i%10 == 0:
            ans += i
        else:
            ans += ((i//10)+1)*10
            min_time =min(min_time,i%10)
    print(ans + min_time - 10)



if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
a = [[int(input()), 0]for i in range(5)]
for i in range(5):
    if a[i][0] % 10 == 0:
        a[i][1] = 9
    else:
        a[i][1] = a[i][0] % 10
a = sorted(a, key=lambda x: x[1], reverse=True)
b = 0
print(a)
for i in range(5):
    if i == 4:
        b += a[i][0]
    else:
        b += (a[i][0] + 9) // 10 * 10
print(b)

Submission status: Wrong Answer

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

lst = sorted(lst, key =lambda x: 10 if x%10==0 else x%10, reverse = 1)

print(lst)
ans = 0
for l in lst[:4]:
    if l%10 == 0:
        ans += l
    else:
        ans += l//10*10 + 10
ans += lst[4]
print(ans)

Submission status: Wrong Answer

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

import math

sum([math.ceil(i/10) * 10 for i in l]) - max([math.ceil(i/10) * 10 - i for i in l])

Submission status: Wrong Answer

Solution code:
l = [int(input()) for i in range(5)]
mod = [l[i] % 10 for i in range(5)]
print(mod)
time = 0
if max(mod) == 0:
    print(sum(l))
else:
    min = 0
    for i in range(5):
        if mod[i] != 0:
            time += l[i] + (10 - mod[i])
            if min < 10 - mod[i]:
                min = 10 - mod[i]
        else:
            time += l[i]
    print(time - min)

Submission status: Wrong Answer

Solution code:
def addTime(n):
    keta = n%10
    if keta == 0:
        return n
    return n+10 - keta

def calcKeta(n):
    if n%10!=0:
        return n
    return 10

food = [int(input()) for _ in range(5)]
foods = sorted(food,key=calcKeta,reverse=True)
min_food_time = foods[0]
foods.remove(min_food_time)
print(sum(list(map(addTime,foods)))+min_food_time)

Submission status: Wrong Answer

Solution code:
import sys
import math

def input(): return sys.stdin.readline()[:-1]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def MATINT(h): return [list(map(int, input().split())) for _ in range(h)]
def MATSTR(h): return [input() for _ in range(h)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
inf = float('inf')
mod = 10 ** 9 + 7

def main():
    minv = inf
    sumv = 0
    for i in range(5):
        tmp = INT()
        if tmp % 10 > 0:
            minv = min(minv, tmp%10)
        sumv += math.ceil(tmp/10) * 10
    if minv == inf:
        minv = 0
    print(sumv - 10 + minv)



if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

def main():
    list=[int(input()) for a in range(5)]
    list.sort()
    total=0
    for a in range(len(list)):
        if a==0:
            total+=list[a]
        else:
            total+=math.ceil(list[a]/10)*10
    print(total)

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

Submission status: Wrong Answer

Solution code:
time=[];timeloss=[];ans=0
for i in range(5):
    a=input()
    if a[-1]==0:
        ans+=int(a)
    else:
        time.append(int(a))
        timeloss.append(10-int(a[-1]))
for i in range(5):
        for i in range(5):
            if timeloss[i]==min(timeloss):
                ans+=time[i]
                if not len(time)==1:
                    ans+=timeloss[i]
                del time[i];del timeloss[i];break
print(ans)

Submission status: Wrong Answer

Solution code:
time=[];timeloss=[];ans=0
for i in range(5):
    a=input()
    if a[-1]==0:
        ans+=int(a)
    else:
        a=int(a)
        time.append(a)
        timeloss.append(10-a)
while len(time)>0:
        for i in range(len(time)):
            if timeloss[i]==min(timeloss):
                ans+=time[i]
                if not len(time)==1:
                    ans+=timeloss[i]
                del time[i];del timeloss[i];break
print(ans)

Submission status: Wrong Answer

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

time = 0
flag = 0
Loss = []

for i in range(5):
    if L[i]%10 == 0:
        time+=L[i]
        Loss.append(0)
    else:
        time+=(L[i]-L[i]%10+10)
        Loss.append(10-L[i]%10)

time -= 10-max(Loss)
print(time)

Submission status: Wrong Answer

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

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

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


print(sums-10+mins)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
#ABC123 B

LI = [int(input()) for _ in range(5)]
LI2 = [LI[i] % 10 for i in range(5)]

x = [(LI[i],LI2[i]) for i in range(5)]
#print(x)

ans = 0
x = sorted(x, key = lambda x:x[1],reverse = True)
for i in range(5):
    if x[i][1] == 0:
        t = x[i]
        x.remove(t)
        x.insert(0,t)
#print(x)

for i in range(4):
    ans += x[i][0] + (10 - x[i][1])
ans += x[4][0]
print(ans)

Submission status: Wrong Answer

Solution code:
from sys import stdin

x = []
x.append(int(stdin.readline().rstrip()))
x.append(int(stdin.readline().rstrip()))
x.append(int(stdin.readline().rstrip()))
x.append(int(stdin.readline().rstrip()))
x.append(int(stdin.readline().rstrip()))

time = []
min = 0
for i in range(0,5):
    if x[i] %10 == 0:
        time.append(x[i])
    else:
        time.append(x[i] - (x[i]%10) + 10)
        if ((x[min]-1) % 10) > (x[i] % 10):
                min = i

time[min] = x[min]

sum_time = 0
for i in range(0,5):
    sum_time += time[i]

print(sum_time)

Submission status: Wrong Answer

Solution code:
from sys import stdin

x = []
x.append(int(stdin.readline().rstrip()))
x.append(int(stdin.readline().rstrip()))
x.append(int(stdin.readline().rstrip()))
x.append(int(stdin.readline().rstrip()))
x.append(int(stdin.readline().rstrip()))

time = []
min = 0
for i in range(0,5):
    time.append(x[i] - (x[i]%10) + 10)
    if ((x[min]-1) % 10) > ((x[i]-1) % 10):
        min = i

time[min] = x[min]

sum_time = 0
for i in range(0,5):
    sum_time += time[i]

print(sum_time)

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

maximum = 0
for i in range(5):
  tmp = (A[i] // 10 + 1) * 10 - A[i]
  A[i] = (A[i] // 10 + 1) * 10
  if tmp > maximum:
    maximum = tmp
    
print(sum(A) - maximum)

Submission status: Wrong Answer

Solution code:
import math
l = [int(input()) for i in range(5)]
e = 9
for i in l:
    re = i%10
    if re !=0:
        e = min(e, re)
l = [math.ceil(i/10)*10 for i in l]
print(sum(l)-(10-e))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
na1 = []

for i1 in range(5):
    na1.append(int(input()))

r1 = 0
n1 = 0
for i1 in range(5):
    r1 += ((na1[i1] + 9) // 10) * 10
    if (na1[i1] % 10) != 0:
        if n1 == 0:
            n1 = na1[i1] % 10
        elif n1 > (na1[i1] % 10):
            n1 = na1[i1] % 10

r1 += n1 - 10
print(r1)

Submission status: Wrong Answer

Solution code:
import itertools

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
dish = [a, b, c, d, e]
dishp = list(itertools.permutations(dish, 5))
t = []
x = 0
for i in range(0,120):
    x = 0
    for j in range(0,4):
        if dishp[i][j] %10 == 0:
            x += dishp[i][j]
        else:
            x += (dishp[i][j] // 10 +1) * 10
    x += dishp[i][4]
    t.append(x)

print(t)
print(min(t))

Submission status: Wrong Answer

Solution code:
li = []
lis = []
time = 0
for i in range(5):
    li.append(int(input()))
    lis.append(li[i] % 10)
last = lis.index(min(lis))
for i in range(5):
    if i == last:
        continue
    elif lis[i] == 0:
        time += li[i]
    elif 1 <= li[i] <= 9:
        time += 10
    else:
        time += int(li[i] / 10) * 10 + 10
print(time + li[last])

Submission status: Wrong Answer

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

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

if iti == []:
    last = 0
else:
    last = min(iti)
print(sum(num)-10+last)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=0
rs=0
m=9
for i in range(5):
    n=int(input())
    rs+=n%10
    if n%10!=0:
        m=min(m,n%10)
        n=(n//10+1)*10
    s+=n
if rs==0:
    m=0
print(s-10+m)

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())
hikubun=0
for i in range(5):
    hikubun=max(10-A[i]%10,hikubun)
    A[i]=(A[i]//10+(A[i]%10!=0))*10
    
ans=sum(A)-(hikubun)
print(ans)

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())
hikubun=0
for i in range(5):
    hikubun=max(A[i]%10,10-hikubun)
    A[i]=(A[i]//10+(A[i]%10!=0))*10
    
ans=sum(A)-(10-hikubun)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import ceil
L=[int(input()) for _ in range(5)]
L_ceil = [ceil(v/10)*10 for v in L]
L_remain =[v%10 for v in L]
print(sum(L_ceil)-10+max(L_remain))

Submission status: Wrong Answer

Solution code:
from math import ceil
L=[int(input()) for _ in range(5)]
L_ceil = [ceil(v/10)*10 for v in L]
L_remain =[v%10 for v in L]
print(sum(L_ceil)-max(L_remain))

Submission status: Wrong Answer

Solution code:
from math import ceil
L=[int(input()) for _ in range(5)]
L_ceil = [ceil(v/10) for v in L]
L_remain =[v%10 for v in L]
print(sum(L_ceil)-max(L_remain))

Submission status: Wrong Answer

Solution code:
import sys
import numpy as np
import math

def ReadInputNum():
    input_num=[]
    for i in range(5):
        input_num.append(int(input()))
    return tuple(input_num)

def CheckRangeInput(*argv):
    for num in argv:
        if 1<=num<=123 and isinstance(num,int):
            pass
        else:
            print("input"+ num +"is unexpected.")
            sys.exit()


def SumTotalTime(Tuple_Input):
    list_input=list(Tuple_Input)
    amari=[]
    # use numpy #                                                                                                                                                                        
    # list_tmp=np.array(list_input)                                                                                                                                                      
    # amari=(list_tmp-1)%10                                                                                                                                                              

    for i in list_input:
        amari.append(i-1 % 10)

    # amari=amari.tolist()                                                                                                                                                               
    last_one=min(amari)
    last_one=list_input.pop(amari.index(last_one))
    # print(last_one)                                                                                                                                                                    
    # print(list_input)                                                                                                                                                                  

    out_put=0
    for i in list_input:
        out_put += math.ceil(i/10)*10
    # print(out_put)                                                                                                                                                                     
    print(out_put+last_one)


# tuple_input= ReadInputNum()                                                                                                                                                            
# CheckRangeInput(tuple_input)                                                                                                                                                           
A,B,C,D,E = ReadInputNum()
CheckRangeInput(A,B,C,D,E)
tuple_input = (A,B,C,D,E)
SumTotalTime(tuple_input)

Submission status: Wrong Answer

Solution code:
import sys
import math

def ReadInputNum():
    input_num=[]
    for i in range(5):
        input_num.append(int(input()))
    return tuple(input_num)

def CheckRangeInput(*argv):
    for num in argv:
        if 1<=num<=123 and isinstance(num,int):
            pass
        else:
            print("input"+ num +"is unexpected.")
            sys.exit()


def SumTotalTime(Tuple_Input):
    list_input=list(Tuple_Input)
    amari=[]
    # use numpy #                                                                                                                                                                        
    # list_tmp=np.array(list_input)                                                                                                                                                      
    # amari=(list_tmp-1)%10                                                                                                                                                              

    for i in list_input:
        amari.append(i % 10)

    # amari=amari.tolist()                                                                                                                                                               
    last_one=min(amari)
    last_one=list_input.pop(amari.index(last_one))
    # print(last_one)                                                                                                                                                                    
    # print(list_input)                                                                                                                                                                  

    out_put=0
    for i in list_input:
        out_put += math.ceil(i/10)*10
    # print(out_put)                                                                                                                                                                     
    print(out_put+last_one)

A,B,C,D,E = ReadInputNum()
CheckRangeInput(A,B,C,D,E)
tuple_input = (A,B,C,D,E)
SumTotalTime(tuple_input)

Submission status: Wrong Answer

Solution code:
import sys
import numpy as np
import math

def ReadInputNum():
    input_num=[]
    for i in range(5):
        input_num.append(int(input()))
    return tuple(input_num)

def CheckRangeInput(*argv):
    for num in argv:
        if 1<=num<=123 and isinstance(num,int):
            pass
        else:
            print("input"+ num +"is unexpected.")
            sys.exit()


def SumTotalTime(Tuple_Input):
    list_input=list(Tuple_Input)
    list_tmp=np.array(list_input)
    amari=(list_tmp-1)%10
    amari=amari.tolist()
    last_one=min(amari)
    last_one=list_input.pop(amari.index(last_one))
    print(last_one)
    print(list_input)

    out_put=0
    for i in list_input:
        out_put += math.ceil(i/10)*10
    # print(out_put)                                                                                                                                                                     
    print(out_put+last_one)



A,B,C,D,E = ReadInputNum()
CheckRangeInput(A,B,C,D,E)
tuple_input = (A,B,C,D,E)
SumTotalTime(tuple_input)