Skip to content

Commit 1271eb1

Browse files
committed
ugh, java bad
1 parent dd989d4 commit 1271eb1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/Solution.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ public static void main(String... args) {
55
if (line.contains("w")) { // Invalid output
66
System.out.println(line);
77
} else if (line.contains("2")) { // Timeout
8-
while (true) Thread.sleep(10_000); // Shouldn't take more than 10s, but if it does, then loop.
8+
try {
9+
while (true) Thread.sleep(10_000); // Shouldn't take more than 10s, but if it does, then loop.
10+
} catch (Exception e) {
11+
throw new RuntimeException(e);
12+
}
913
} else { // correct output
1014
char[] chars = line.toCharArray();
1115
for (int i = 0; i < chars.length / 2; ++i) {

0 commit comments

Comments
 (0)