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
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
Ac=((a//10)+1)*10
Bc=((b//10)+1)*10
Cc=((c//10)+1)*10
Dc=((d//10)+1)*10
Ec=((e//10)+1)*10
Af=a%10
Bf=b%10
Cf=c%10
Df=d%10
Ef=e%10

if max(Af,Bf,Cf,Df,Ef)==Af:
  print(a+Bc+Cc+Dc+Ec)
  
elif max(Af,Bf,Cf,Df,Ef)==Bf:
  print(Ac+b+Cc+Dc+Ec)
  
elif max(Af,Bf,Cf,Df,Ef)==Cf:
  print(Ac+Bc+c+Dc+Ec)  
  
elif max(Af,Bf,Cf,Df,Ef)==Df:
  print(Ac+Bc+Cc+d+Ec)
  
elif max(Af,Bf,Cf,Df,Ef)==Ef:
  print(Ac+Bc+Cc+Dc+e)

# coding: utf-8
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
Ac=(a//10+1)*10
Bc=(b//10+1)*10
Cc=(c//10+1)*10
Dc=(d//10+1)*10
Ec=(e//10+1)*10
Af=a%10
Bf=b%10
Cf=c%10
Df=d%10
Ef=e%10

if max(Af,Bf,Cf,Df,Ef)==Af:
  print(a+Bc+Cc+Dc+Ec)
  
elif max(Af,Bf,Cf,Df,Ef)==Bf:
  print(Ac+b+Cc+Dc+Ec)
  
elif max(Af,Bf,Cf,Df,Ef)==Cf:
  print(Ac+Bc+c+Dc+Ec)  
  
elif max(Af,Bf,Cf,Df,Ef)==Df:
  print(Ac+Bc+Cc+d+Ec)
  
elif max(Af,Bf,Cf,Df,Ef)==Ef:
  print(Ac+Bc+Cc+Dc+e)  

# coding: utf-8
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
Ac=((a//10)+1)*10
Bc=((b//10)+1)*10
Cc=((c//10)+1)*10
Dc=((d//10)+1)*10
Ec=((e//10)+1)*10
Af=a%10
Bf=b%10
Cf=c%10
Df=d%10
Ef=e%10

if min(Af,Bf,Cf,Df,Ef)==Af:
  print(a+Bc+Cc+Dc+Ec)
  
elif min(Af,Bf,Cf,Df,Ef)==Bf:
  print(Ac+b+Cc+Dc+Ec)
  
elif min(Af,Bf,Cf,Df,Ef)==Cf:
  print(Ac+Bc+c+Dc+Ec)  
  
elif min(Af,Bf,Cf,Df,Ef)==Df:
  print(Ac+Bc+Cc+d+Ec)
  
elif min(Af,Bf,Cf,Df,Ef)==Ef:
  print(Ac+Bc+Cc+Dc+e)

# coding: utf-8
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
Ac=((a//10)+1)*10
Bc=((b//10)+1)*10
Cc=((c//10)+1)*10
Dc=((d//10)+1)*10
Ec=((e//10)+1)*10
Af=(a-1)%10
Bf=(b-1)%10
Cf=(c-1)%10
Df=(d-1)%10
Ef=(e-1)%10

if min(Af,Bf,Cf,Df,Ef)==Af:
  print(a+Bc+Cc+Dc+Ec)
  
elif min(Af,Bf,Cf,Df,Ef)==Bf:
  print(Ac+b+Cc+Dc+Ec)
  
elif min(Af,Bf,Cf,Df,Ef)==Cf:
  print(Ac+Bc+c+Dc+Ec)  
  
elif min(Af,Bf,Cf,Df,Ef)==Df:
  print(Ac+Bc+Cc+d+Ec)
  
elif min(Af,Bf,Cf,Df,Ef)==Ef:
  print(Ac+Bc+Cc+Dc+e)


# coding: utf-8
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
Ac=(((a-1)//10)+1)*10
Bc=(((b-1)//10)+1)*10
Cc=(((c-1)//10)+1)*10
Dc=(((d-1)//10)+1)*10
Ec=(((e-1)//10)+1)*10
Af=(a-1)%10
Bf=(b-1)%10
Cf=(c-1)%10
Df=(d-1)%10
Ef=(e-1)%10

if min(Af,Bf,Cf,Df,Ef)==Af:
  print(a+Bc+Cc+Dc+Ec)
  
elif min(Af,Bf,Cf,Df,Ef)==Bf:
  print(Ac+b+Cc+Dc+Ec)
  
elif min(Af,Bf,Cf,Df,Ef)==Cf:
  print(Ac+Bc+c+Dc+Ec)  
  
elif min(Af,Bf,Cf,Df,Ef)==Df:
  print(Ac+Bc+Cc+d+Ec)
  
elif min(Af,Bf,Cf,Df,Ef)==Ef:
  print(Ac+Bc+Cc+Dc+e)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted