semmi = input()
sor = [int(i) for i in input().split(' ')]
h = len(sor)-1
for i in range(h):
sor[i+1] += sor[i] // 10
if sor[h] > 10:
print((sor[h] // 10)*10*(h+1))
else:
print(sor[h]*10**h)
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 18ms | 2988 KiB | ||||
2 | Accepted | 17ms | 2916 KiB | ||||
3 | Accepted | 17ms | 2960 KiB | ||||
subtask2 | 0/25 | ||||||
4 | Accepted | 17ms | 3096 KiB | ||||
5 | Wrong answer | 17ms | 2976 KiB | ||||
6 | Wrong answer | 17ms | 2968 KiB | ||||
7 | Wrong answer | 17ms | 3216 KiB | ||||
8 | Wrong answer | 17ms | 3064 KiB | ||||
subtask3 | 0/26 | ||||||
9 | Wrong answer | 17ms | 3084 KiB | ||||
10 | Wrong answer | 18ms | 3084 KiB | ||||
11 | Wrong answer | 17ms | 3048 KiB | ||||
12 | Wrong answer | 17ms | 2952 KiB | ||||
13 | Wrong answer | 17ms | 2916 KiB | ||||
14 | Accepted | 17ms | 2840 KiB | ||||
15 | Wrong answer | 17ms | 2916 KiB | ||||
16 | Wrong answer | 17ms | 2936 KiB | ||||
subtask4 | 0/19 | ||||||
17 | Wrong answer | 18ms | 3092 KiB | ||||
18 | Wrong answer | 18ms | 3100 KiB | ||||
19 | Wrong answer | 18ms | 3176 KiB | ||||
20 | Wrong answer | 19ms | 3172 KiB | ||||
subtask5 | 0/30 | ||||||
21 | Wrong answer | 98ms | 16720 KiB | ||||
22 | Wrong answer | 97ms | 16828 KiB | ||||
23 | Wrong answer | 93ms | 16596 KiB | ||||
24 | Wrong answer | 98ms | 16552 KiB | ||||
25 | Wrong answer | 100ms | 16552 KiB | ||||
26 | Wrong answer | 94ms | 16552 KiB | ||||
27 | Wrong answer | 74ms | 11096 KiB | ||||
28 | Wrong answer | 17ms | 2984 KiB |