Problem: 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.

Submission attempts (in order):
# 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()

#"YNeos"[True::2]
#A=list(map(int,input().split()))
#A,B,C=map(int,input().split())
#n=int(input())


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

def main():
    lst=[int(input()) for a in range(5)]
    lst2=[]
    index=0
    mx=0
    total=0
    for a in range(len(lst)):
        if math.ceil(list[a]/10)*10-list[a]>mx:
            mx=math.ceil(list[a])-list[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()

#"YNeos"[True::2]
#A=list(map(int,input().split()))
#A,B,C=map(int,input().split())
#n=int(input())




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

#"YNeos"[True::2]
#A=list(map(int,input().split()))
#A,B,C=map(int,input().split())
#n=int(input())



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

#"YNeos"[True::2]
#A=list(map(int,input().split()))
#A,B,C=map(int,input().split())
#n=int(input())



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

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

    
    
start=time.time()
main()

#"YNeos"[True::2]
#A=list(map(int,input().split()))
#A,B,C=map(int,input().split())
#n=int(input())



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

#"YNeos"[True::2]
#A=list(map(int,input().split()))
#A,B,C=map(int,input().split())
#n=int(input())




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

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

    
    
start=time.time()
main()

#"YNeos"[True::2]
#A=list(map(int,input().split()))
#A,B,C=map(int,input().split())
#n=int(input())




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

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

    
    
start=time.time()
main()

#"YNeos"[True::2]
#A=list(map(int,input().split()))
#A,B,C=map(int,input().split())
#n=int(input())




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

#"YNeos"[True::2]
#A=list(map(int,input().split()))
#A,B,C=map(int,input().split())
#n=int(input())




# 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]/10)*10-lst[a]
            index=a
    #print(index)
    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()

#"YNeos"[True::2]
#A=list(map(int,input().split()))
#A,B,C=map(int,input().split())
#n=int(input())




Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Accepted