#include <iostream>
#include <cmath>
using namespace std;
int main()
{
long long int n,o=0;
cin>>n;
int t[n];
for (int i=0; i<n; i++)
{
cin>>t[i];
}
for (int i=n-1;i>0; i--)
{
if (i==n-1)
o=t[i]*pow(10,n-1);
if (t[i]>=pow(10,n-i))
{
o+=t[i]*pow(10,n-i);
}
}
cout<<o;
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1752 KiB | ||||
2 | Wrong answer | 3ms | 1992 KiB | ||||
3 | Accepted | 3ms | 2224 KiB | ||||
subtask2 | 0/25 | ||||||
4 | Accepted | 2ms | 2316 KiB | ||||
5 | Wrong answer | 3ms | 2456 KiB | ||||
6 | Wrong answer | 3ms | 2848 KiB | ||||
7 | Wrong answer | 3ms | 2864 KiB | ||||
8 | Wrong answer | 3ms | 3104 KiB | ||||
subtask3 | 0/26 | ||||||
9 | Wrong answer | 3ms | 3212 KiB | ||||
10 | Wrong answer | 3ms | 3344 KiB | ||||
11 | Wrong answer | 3ms | 3424 KiB | ||||
12 | Wrong answer | 3ms | 3640 KiB | ||||
13 | Wrong answer | 3ms | 3604 KiB | ||||
14 | Accepted | 3ms | 3612 KiB | ||||
15 | Wrong answer | 3ms | 3724 KiB | ||||
16 | Wrong answer | 3ms | 3716 KiB | ||||
subtask4 | 0/19 | ||||||
17 | Wrong answer | 3ms | 3876 KiB | ||||
18 | Wrong answer | 3ms | 3892 KiB | ||||
19 | Wrong answer | 3ms | 3892 KiB | ||||
20 | Wrong answer | 3ms | 3892 KiB | ||||
subtask5 | 0/30 | ||||||
21 | Wrong answer | 6ms | 4600 KiB | ||||
22 | Wrong answer | 6ms | 4848 KiB | ||||
23 | Wrong answer | 6ms | 4812 KiB | ||||
24 | Wrong answer | 6ms | 4808 KiB | ||||
25 | Wrong answer | 6ms | 4824 KiB | ||||
26 | Wrong answer | 6ms | 5084 KiB | ||||
27 | Wrong answer | 4ms | 5000 KiB | ||||
28 | Wrong answer | 3ms | 4432 KiB |