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):
list=[int(input()) for i in range(5)]
sum=sum(list)
max=0
for x in list:
  y = -(-x//10)*10
  max=(y-x, max)
  print(sum-max)

min=10
sum=0
for i in range(5):
  y=int(input())
  x=10-y%10
  min=min(min, x)
  if x==min:
    sum+=y
  else:
    sum+=y+x
print(sum)

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

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

sum=0
for i in range(5):
  y=int(input())
  x=y%10
  if x==0:
    sum+=y
  else:
    min=min(x, 9)
    if x==min:
      sum+=y
    else:
      sum+=y+10-x
print(sum)

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

sum=0
min=9
for i in range(5):
  y=int(input())
  x=y%10
  if x==0:
    sum+=y
  else:
    min=min(x, min)
    if x==min:
      sum+=y
    else:
      sum+=(y+10-x)
print(sum)

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

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

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

sum=0
max=0
for i in range(5):
  x = int(input()）
  y = -(-x//10)
  sum+=y
  max=(y-x, max)
print(sum-max)

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

sum=0
max=0
for i in range(5):
  x = int(input()）
  y = -(-x//10)*10
  sum+=y
  max=(y-x, max)
print(sum-max)

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

for i in range(5):

min=10
sum=0
for i in range(5):
  y=int(input())
  x=y%10
  if x==0:
    sum+=y
  else:
    min=min(x, 9)
    if x==min:
      sum+=y
    else:
      sum+=y+10-x
print(sum)

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

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

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

sum=0
max=0
for i in range(5):
  x = int(input()）
  y = -(-x)//10
  sum+=y
  max=(y-x, max)
print(sum-max)

sum=0
max=0

sum=0
for i in range(5):
  y=int(input())
  x=10-y%10
  min=min(10, x)
  if x==min:
    sum+=y
  else:
    sum+=y+x
print(sum)

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/max)

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)

sum=0
for i in range(5):
  y=int(input())
  x=y%10
  if x==0:
    sum+=y
  else:
    min=min(x, 9)
    if x==min:
      sum+=y
    else:
      sum+=(y+10-x)
print(sum)

x=10
sum=0
for i in range(5):
  y=int(input())
  x=10-y%10
  min=min(min, x)
  if x=min:
    sum+=y
  else:
    sum+=y+x
print(sum)

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)

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

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

sum=0
max=0
for i in range(5):
  x = int(input()）
  y = -(-x//10)*10

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

min=10
sum=0
for i in range(5):
  y=int(input())
  x=y%10
  min != 0
  min=min(min, x)
  if x==min:
    sum+=y
  else:
    sum+=y+10-x
print(sum)

sum=0
for i in range(5):
  y=int(input())
  x=10-y%10
  min=min(min, 10)
  if x=min:
    sum+=y
  else:
    sum+=y+x
print(sum)

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)

sum=0
max=0
for i in range(5):
  x = int(input()）

sum=0
max=0
for i in range(5):
  x = int(input()）
  y = -(-x//10)

sum=0
max=0
for i in range(5):

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

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

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(int(sum-max))

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted