Task: | Greater Integers |
Sender: | Edith123 |
Submission time: | 2021-01-31 12:05:56 +0200 |
Language: | C++ (C++11) |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | TIME LIMIT EXCEEDED | 0 |
#2 | TIME LIMIT EXCEEDED | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | TIME LIMIT EXCEEDED | -- | 1, 2 | details |
#2 | TIME LIMIT EXCEEDED | -- | 2 | details |
Code
#include <iostream> using namespace std; int main() { int t,n,maxi,k; cin >> t; for (int i = 0; i < t; t++) { cin >> n; n += 1; maxi = 0; k = 1; while (n > 9) { k += 1; maxi = max(maxi,n % 10); n = n/10; } if (n < maxi) { n += 1; } for (int j = 0; j < k; j++) { cout << n; } cout << endl; } }
Test details
Test 1
Group: 1, 2
Verdict: TIME LIMIT EXCEEDED
input |
---|
1000 1 2 3 4 ... |
correct output |
---|
2 3 4 5 6 ... |
user output |
---|
(empty) |
Test 2
Group: 2
Verdict: TIME LIMIT EXCEEDED
input |
---|
1000 735425311146082632 756615631808964686 466489470801941584 100417544394053220 ... |
correct output |
---|
777777777777777777 777777777777777777 555555555555555555 111111111111111111 555555555555555555 ... |
user output |
---|
(empty) |