112032024-07-16 12:58:1642Decimáliapython3Runtime error 45/10093ms15972 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)>0 and A[-1]==0:
        A.pop()
    print(A[-1]*10**(len(A)-1))

f()
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted17ms2920 KiB
2Accepted17ms2960 KiB
3Accepted17ms2788 KiB
subtask20/25
4Runtime error17ms2860 KiB
5Accepted17ms2916 KiB
6Accepted18ms3116 KiB
7Accepted17ms2952 KiB
8Accepted17ms2864 KiB
subtask326/26
9Accepted17ms2916 KiB
10Accepted17ms3064 KiB
11Accepted17ms3044 KiB
12Accepted17ms2916 KiB
13Accepted17ms2936 KiB
14Accepted17ms2916 KiB
15Accepted17ms2960 KiB
16Accepted17ms3060 KiB
subtask419/19
17Accepted18ms3052 KiB
18Accepted18ms3172 KiB
19Accepted18ms3172 KiB
20Accepted17ms3092 KiB
subtask50/30
21Runtime error93ms15788 KiB
22Runtime error87ms15788 KiB
23Runtime error92ms15936 KiB
24Runtime error87ms15788 KiB
25Runtime error93ms15860 KiB
26Runtime error90ms15972 KiB
27Runtime error70ms11052 KiB
28Accepted17ms3064 KiB