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()
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 17ms | 2988 KiB | ||||
2 | Accepted | 18ms | 2960 KiB | ||||
3 | Accepted | 18ms | 2960 KiB | ||||
subtask2 | 25/25 | ||||||
4 | Accepted | 17ms | 3044 KiB | ||||
5 | Accepted | 17ms | 3044 KiB | ||||
6 | Accepted | 18ms | 3044 KiB | ||||
7 | Accepted | 17ms | 3064 KiB | ||||
8 | Accepted | 17ms | 2860 KiB | ||||
subtask3 | 26/26 | ||||||
9 | Accepted | 17ms | 3064 KiB | ||||
10 | Accepted | 18ms | 2916 KiB | ||||
11 | Accepted | 18ms | 3172 KiB | ||||
12 | Accepted | 17ms | 3044 KiB | ||||
13 | Accepted | 17ms | 2916 KiB | ||||
14 | Accepted | 17ms | 2952 KiB | ||||
15 | Accepted | 17ms | 3172 KiB | ||||
16 | Accepted | 17ms | 3064 KiB | ||||
subtask4 | 19/19 | ||||||
17 | Accepted | 18ms | 3152 KiB | ||||
18 | Accepted | 18ms | 3256 KiB | ||||
19 | Accepted | 18ms | 3172 KiB | ||||
20 | Accepted | 18ms | 3172 KiB | ||||
subtask5 | 0/30 | ||||||
21 | Wrong answer | 90ms | 15904 KiB | ||||
22 | Wrong answer | 86ms | 15892 KiB | ||||
23 | Wrong answer | 92ms | 15932 KiB | ||||
24 | Wrong answer | 90ms | 15936 KiB | ||||
25 | Wrong answer | 86ms | 15788 KiB | ||||
26 | Wrong answer | 90ms | 15788 KiB | ||||
27 | Wrong answer | 67ms | 11032 KiB | ||||
28 | Accepted | 17ms | 3048 KiB |