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):
from math import ceil
time_list = [int(input()) for i in range(5)]
x_list = []
for i in time_list:
    x_list.append(i % 10)
    i = ceil(i / 10) * 10
if max(x_list) == 0:
    print(sum(time_list))
else:
    print(sum(time_list) - 10 + max(x_list))


from math import ceil
time_list = [int(input()) for i in range(5)]
sum_list = []
time_list_0 = []
for i in range(5):
    time_list_0[i] = ceil(time_list[i] / 10) * 10
for j in range(5):
    if time_list[j] == 0:
        sum_list[j] = sum(time_list_0)
    else:
        sum_list[j] = sum(time_list_0) - 10 + (time_list[j] % 10)
print(min(sum_list))


from math import ceil
time_list = [int(input()) for i in range(5)]
sum_list = []
time_list_0 = []
for i in range(5):
    time_list_0[i] = ceil(time_list[i] / 10) * 10
for j in range(5):
    if time_list[i] == 0:
        sum_list[i] = sum(time_list_0)
    else:
        sum_list[i] = sum(time_list_0) - 10 + time_list[i] % 10
print(min(sum_list))


from math import ceil
time_list = [int(input()) for i in range(5)]
sum_list = []
time_list_0 = []
for i in range(5):
    time_list_0.append(ceil(time_list[i] / 10) * 10)
for j in range(5):
    if time_list[j] == 0:
        sum_list.append(sum(time_list_0))
    else:
        sum_list.append(sum(time_list_0) - 10 + (time_list[j] % 10))
print(min(sum_list))


from math import ceil
time_list = [int(input()) for i in range(5)]
x_list = []
for i in time_list:
    x_list.append(i % 10)
    i = ceil(i / 10) * 1
if max(x_list) == 0:
    print(sum(x_list))
else:
    print(sum(x_list) + 10 - max(x_list))


from math import ceil
time_list = [int(input()) for i in range(5)]
sum_list = []
time_list_0 = []
for i in range(5):
    time_list_0[i] = ceil(time_list[i] / 10) * 10
for j in range(5):
    sum_list[i] = sum(time_list_0) - 10 + time_list[i] % 10
print(min(sum_list))


from math import ceil
time_list = [int(input()) for i in range(5)]
sum_list = []
time_list_0 = []
for i in range(5):
    time_list_0.append(ceil(time_list[i] / 10) * 10)
for j in range(5):
    if time_list[j] % 10 == 0:
        sum_list.append(sum(time_list_0))
    else:
        sum_list.append(sum(time_list_0) - 10 + (time_list[j] % 10))
print(min(sum_list))


Verdicts: Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Accepted