#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
cin.tie(0); ios_base::sync_with_stdio(0);
int K;
cin >> K;
vector<int> b(K);
for(int i = 0; i < K; i++) cin >> b[i];
if(!b[0]) {
if(K == 1) {
cout << 0 << '\n';
return 0;
} else {
int cur = 10, p = 1;
while(p < K) {
p = p * 10 + 1;
cur *= 10;
}
cout << cur << '\n';
return 0;
}
}
if(b[0] == 9) {
int cur = 0, p = 0;
while(p < K) {
p = p * 10 + 1;
cur = cur * 10 + 8;
}
cur /= 10;
cur = cur * 10 + 9;
cout << cur << '\n';
return 0;
}
int cur = b[0], p = 1;
while(p < K) {
p *= 10;
cur *= 10;
}
cout << cur << '\n';
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |