This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
#include <vector>
int main() {
std::cin.tie(0)->sync_with_stdio(0);
int k;
std::cin >> k;
std::vector<int> a(k);
for (int &x : a)
std::cin >> x;
int x = a[0];
if (x == 9) {
int v = 9;
int cnt = 1;
while (cnt < k) {
v = 10*v - 1;
cnt = 10*cnt + 1;
}
std::cout << v << '\n';
} else {
int v = x;
int cnt = 1;
while (cnt < k) {
v = 10*v;
cnt = 10*cnt;
}
std::cout << v << '\n';
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |