Task: | HQ9+ |
Sender: | TapaniS |
Submission time: | 2020-11-27 22:44:05 +0200 |
Language: | Java |
Status: | READY |
Result: | 100 |
group | verdict | score |
---|---|---|
#1 | ACCEPTED | 15 |
#2 | ACCEPTED | 85 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | ACCEPTED | 0.21 s | 1, 2 | details |
#2 | ACCEPTED | 0.24 s | 2 | details |
Code
import java.util.*; public class hq9 { public static void main(String[] args) { Scanner input = new Scanner(System.in); int t = input.nextInt(); // int n = Integer.parseInt(input.nextLine()); for (int i = 0; i < t; i++) { int n = input.nextInt(); int Qty9 = n / 494; String ans = ""; for (int i2 = 0; i2 < Qty9; i2++) { ans += "9"; } n -= 494 * Qty9; for (int i3 = 0; i3 < n; i3++) { ans += "H"; } System.out.println(ans); } input.close(); } }
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 |