| Task: | HQ9+ |
| Sender: | Olli |
| Submission time: | 2020-11-27 18:01:57 +0200 |
| Language: | C++ (C++11) |
| 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>
#include <fstream>
#include <vector>
#include <algorithm>
#include <queue>
#include <stack>
#include <set>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define F first
#define S second
#define X first
#define Y second
const int N = 1e5 + 5;
const ll INF = 1e18;
int main() {
int t;
cin >> t;
while(t > 0) {
--t;
int n;
cin >> n;
string s = "";
while(n >= 494) {
s += "9";
n -= 494;
}
while(n > 0) {
s += "H";
--n;
}
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 |
