#include <iostream>
#include <vector>
using namespace std;
#define int long long
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int a;
cin >> a;
int cur = 0;
string s = "";
for (size_t i = 0; i < a; i++)
{
cur/=10;
int b;
cin >> b;
cur+=b;
//cout << cur << "\n";
}
int tV = 1;
for (size_t i = 0; i < 18; i++)
{
tV*=10;
if(tV>cur) {
cur=cur-(cur%(tV/10));
break;
}
}
for (size_t i = 0; i < a-1; i++)
{
s+='0';
}
cout << cur << s << "\n";
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1832 KiB | ||||
2 | Accepted | 3ms | 2052 KiB | ||||
3 | Accepted | 3ms | 2428 KiB | ||||
subtask2 | 0/25 | ||||||
4 | Wrong answer | 3ms | 2352 KiB | ||||
5 | Wrong answer | 3ms | 2552 KiB | ||||
6 | Wrong answer | 3ms | 2760 KiB | ||||
7 | Wrong answer | 3ms | 2976 KiB | ||||
8 | Wrong answer | 3ms | 3060 KiB | ||||
subtask3 | 0/26 | ||||||
9 | Wrong answer | 3ms | 3436 KiB | ||||
10 | Wrong answer | 3ms | 3332 KiB | ||||
11 | Wrong answer | 3ms | 3344 KiB | ||||
12 | Wrong answer | 3ms | 3436 KiB | ||||
13 | Wrong answer | 3ms | 3672 KiB | ||||
14 | Accepted | 3ms | 3756 KiB | ||||
15 | Accepted | 3ms | 3752 KiB | ||||
16 | Accepted | 3ms | 3728 KiB | ||||
subtask4 | 0/19 | ||||||
17 | Accepted | 3ms | 3960 KiB | ||||
18 | Wrong answer | 3ms | 3936 KiB | ||||
19 | Accepted | 3ms | 3844 KiB | ||||
20 | Accepted | 3ms | 3940 KiB | ||||
subtask5 | 30/30 | ||||||
21 | Accepted | 23ms | 4228 KiB | ||||
22 | Accepted | 21ms | 4224 KiB | ||||
23 | Accepted | 23ms | 4444 KiB | ||||
24 | Accepted | 23ms | 4876 KiB | ||||
25 | Accepted | 21ms | 4756 KiB | ||||
26 | Accepted | 23ms | 4596 KiB | ||||
27 | Accepted | 14ms | 4784 KiB | ||||
28 | Accepted | 3ms | 4628 KiB |