CSES - HIIT Open 2018 - Results
Submission details
Task:HIIT Generation
Sender:DROP TABLE
Submission time:2018-05-26 12:19:05
Language:Java
Status:READY
Result:
Test results
testverdicttime
#1ACCEPTED0.44 sdetails
#2--details
#3ACCEPTED0.45 sdetails
#4ACCEPTED0.24 sdetails

Code

import java.util.Scanner;

public class Main {
	private static final String HIIT2 = "HIIT";

	public static void main(String[] args) {
		String HIIT = HIIT2;
		Scanner scanner = new Scanner(System.in);
		int limit = scanner.nextInt();
		scanner.nextLine();
		for (int i = 0; i < limit; i++) {
			HIIT = HIIT.replaceAll(scanner.nextLine(), HIIT2);
		}
		System.out.println(HIIT);
	}
}

Test details

Test 1

Verdict: ACCEPTED

input
17
I
I
I
I
...

correct output
HHHHHHHHHHHHHHHHHHIITHIITTHHII...

user output
HHHHHHHHHHHHHHHHHHIITHIITTHHII...

Test 2

Verdict:

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