112042024-07-16 13:01:2442Decimáliapython3Wrong answer 70/10092ms15936 KiB
from sys import stdin
input = stdin.readline

def f():
    N = int(input())
    A = list(map(int,input().split()))
    for i in range(N-1):
        A[i+1]+=A[i]//10
    while A[-1]>=10:
        A.append(A[-1]//10)
    while len(A)>1 and A[-1]==0:
        A.pop()
    try: print(A[-1]*10**(len(A)-1))
    except: print(0)

f()
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted17ms2988 KiB
2Accepted18ms2960 KiB
3Accepted18ms2960 KiB
subtask225/25
4Accepted17ms3044 KiB
5Accepted17ms3044 KiB
6Accepted18ms3044 KiB
7Accepted17ms3064 KiB
8Accepted17ms2860 KiB
subtask326/26
9Accepted17ms3064 KiB
10Accepted18ms2916 KiB
11Accepted18ms3172 KiB
12Accepted17ms3044 KiB
13Accepted17ms2916 KiB
14Accepted17ms2952 KiB
15Accepted17ms3172 KiB
16Accepted17ms3064 KiB
subtask419/19
17Accepted18ms3152 KiB
18Accepted18ms3256 KiB
19Accepted18ms3172 KiB
20Accepted18ms3172 KiB
subtask50/30
21Wrong answer90ms15904 KiB
22Wrong answer86ms15892 KiB
23Wrong answer92ms15932 KiB
24Wrong answer90ms15936 KiB
25Wrong answer86ms15788 KiB
26Wrong answer90ms15788 KiB
27Wrong answer67ms11032 KiB
28Accepted17ms3048 KiB