Task: | HQ9+ |
Sender: | Sisuaski |
Submission time: | 2020-11-29 08:40:41 +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> using namespace std; int main() { int t;cin>>t; while(t--){ int n;cin>>n; string s; while(n) { if (n>=494) n-=494, s+='9'; else n--, s+='H'; } cout<<s<<'\n'; } }
Test details
Test 1
Group: 1, 2
Verdict: ACCEPTED
input |
---|
100 10 96 42 77 ... |
correct output |
---|
HHHHHHHHHH HHHHHHHHHHHHHHHHHHHHHHHHHHHHHH... |
user output |
---|
HHHHHHHHHH HHHHHHHHHHHHHHHHHHHHHHHHHHHHHH... Truncated |
Test 2
Group: 2
Verdict: ACCEPTED
input |
---|
100 76364 26254 35192 92572 ... |
correct output |
---|
999999999999999999999999999999... |
user output |
---|
999999999999999999999999999999... Truncated |