#include <bits/stdc++.h>
using namespace std;
int main(){
int n; cin >> n;
vector<int> v;
for (int i = 1; i <= n; i++){
int a; cin >> a; v.push_back(a);
}
//reverse(v.begin(), v.end());
int mego = v[n-1]; // lehet 0
for (int i = n-2; i >= 0; i--){
//cout << n-i-1 << " " << v[i]/10 << endl;
if (v[i] / 10 >= n-i-1){
mego += v[i]/10;
break;
}
}
cout << (to_string(mego))+string(n-1, '0');
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1812 KiB | ||||
2 | Accepted | 3ms | 2332 KiB | ||||
3 | Accepted | 3ms | 2204 KiB | ||||
subtask2 | 0/25 | ||||||
4 | Wrong answer | 3ms | 2420 KiB | ||||
5 | Wrong answer | 2ms | 2436 KiB | ||||
6 | Wrong answer | 3ms | 2572 KiB | ||||
7 | Wrong answer | 2ms | 2652 KiB | ||||
8 | Wrong answer | 3ms | 2780 KiB | ||||
subtask3 | 0/26 | ||||||
9 | Wrong answer | 3ms | 2852 KiB | ||||
10 | Wrong answer | 3ms | 2856 KiB | ||||
11 | Wrong answer | 3ms | 3100 KiB | ||||
12 | Wrong answer | 3ms | 3216 KiB | ||||
13 | Wrong answer | 3ms | 3224 KiB | ||||
14 | Accepted | 3ms | 3300 KiB | ||||
15 | Wrong answer | 2ms | 3388 KiB | ||||
16 | Wrong answer | 3ms | 3392 KiB | ||||
subtask4 | 0/19 | ||||||
17 | Wrong answer | 3ms | 3412 KiB | ||||
18 | Wrong answer | 2ms | 3420 KiB | ||||
19 | Wrong answer | 3ms | 3412 KiB | ||||
20 | Wrong answer | 3ms | 3704 KiB | ||||
subtask5 | 0/30 | ||||||
21 | Wrong answer | 4ms | 4808 KiB | ||||
22 | Wrong answer | 4ms | 5200 KiB | ||||
23 | Wrong answer | 4ms | 5312 KiB | ||||
24 | Wrong answer | 4ms | 5084 KiB | ||||
25 | Wrong answer | 4ms | 5116 KiB | ||||
26 | Wrong answer | 4ms | 5264 KiB | ||||
27 | Wrong answer | 4ms | 5424 KiB | ||||
28 | Wrong answer | 3ms | 4180 KiB |