Task: | HIIT Generation |
Sender: | El Numero Uno |
Submission time: | 2018-05-26 11:59:01 +0300 |
Language: | Java |
Status: | READY |
Result: | TIME LIMIT EXCEEDED |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.35 s | details |
#2 | TIME LIMIT EXCEEDED | -- | details |
#3 | ACCEPTED | 0.38 s | details |
#4 | ACCEPTED | 0.24 s | details |
Code
import java.util.Scanner; public class h { public static void main(String[] args) { String s = "HIIT", f = "HIIT", x; Scanner in = new Scanner(System.in); int n = Integer.parseInt(in.nextLine()); for (int i = 0; i < n && in.hasNextLine(); i++) { x = in.nextLine(); f = f.replace(x, s); } System.out.println(f); in.close(); } }
Test details
Test 1
Verdict: ACCEPTED
input |
---|
17 I I I I ... |
correct output |
---|
HHHHHHHHHHHHHHHHHHIITHIITTHHII... |
user output |
---|
HHHHHHHHHHHHHHHHHHIITHIITTHHII... |
Test 2
Verdict: TIME LIMIT EXCEEDED
input |
---|
333332 H H H H ... |
correct output |
---|
HIITIITIITIITIITIITIITIITIITII... |
user output |
---|
(empty) |
Test 3
Verdict: ACCEPTED
input |
---|
24 H T H T ... |
correct output |
---|
HIIHIITIIHIIHIITIIHIITIIHIIHII... |
user output |
---|
HIIHIITIIHIIHIITIIHIITIIHIIHII... |
Test 4
Verdict: ACCEPTED
input |
---|
0 |
correct output |
---|
HIIT |
user output |
---|
HIIT |