#include <bits/stdc++.h>
using namespace std;
int main() {
int k, K, x, ans;
cin >> k >> x;
K = k;
if(k == 1){
cout << x; return 0;
}
ans = 1;
//if(x == 1) k--;
while(k > 0){
k /= 10;
ans *= 10;
}
if(x != 0)
ans *= x;
else
ans *= 10;
//cout << ans << endl;
int cnt = 0;
int pp = ans;
if(x == 9){
ans = 88; cnt = 11;
k =K;
while(cnt < k){
cnt *= 10; cnt++;
ans *= 10; ans += 8;
}
ans++;
}
ans = min(ans,pp);
cout << ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
2016 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
2016 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
2016 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
2016 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |