Task: | HQ9+ |
Sender: | kluopaja |
Submission time: | 2020-11-27 21:45:02 +0200 |
Language: | C++ (C++17) |
Status: | READY |
Result: | 100 |
group | verdict | score |
---|---|---|
#1 | ACCEPTED | 15 |
#2 | ACCEPTED | 85 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | ACCEPTED | 0.01 s | 1, 2 | details |
#2 | ACCEPTED | 0.01 s | 2 | details |
Code
#include <iostream> int main() { int tt; std::cin>>tt; for(int xx = 0; xx < tt; ++xx) { int n; std::cin>>n; while(n > 0) { if(n >= 494) { std::cout << "9"; n -= 494; } else { std::cout << "Q"; --n; } } std::cout << std::endl; } }
Test details
Test 1
Group: 1, 2
Verdict: ACCEPTED
input |
---|
100 10 96 42 77 ... |
correct output |
---|
HHHHHHHHHH HHHHHHHHHHHHHHHHHHHHHHHHHHHHHH... |
user output |
---|
QQQQQQQQQQ QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ... Truncated |
Test 2
Group: 2
Verdict: ACCEPTED
input |
---|
100 76364 26254 35192 92572 ... |
correct output |
---|
999999999999999999999999999999... |
user output |
---|
999999999999999999999999999999... Truncated |