1
0

JAVA lb-4 fixes

This commit is contained in:
Sytnyk Yehor
2025-06-05 12:21:12 +03:00
parent 232422d9d9
commit bdcbdb850a
7 changed files with 9 additions and 6 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

View File

@ -34,7 +34,9 @@ public class Part1 {
if (input.equalsIgnoreCase("stop")) { if (input.equalsIgnoreCase("stop")) {
break; break;
} else if (input.equals("Latn")) { }
if (input.equals("Latn")) {
result = extractWords(fileContent, LATN_PATTERN); result = extractWords(fileContent, LATN_PATTERN);
} else if (input.equals("Cyrl")) { } else if (input.equals("Cyrl")) {
result = extractWords(fileContent, CYRL_PATTERN); result = extractWords(fileContent, CYRL_PATTERN);

View File

@ -14,11 +14,13 @@ public class Part2 {
InputStream stdin = System.in; InputStream stdin = System.in;
try {
System.setIn(new ByteArrayInputStream(symin.getBytes(StandardCharsets.UTF_8))); System.setIn(new ByteArrayInputStream(symin.getBytes(StandardCharsets.UTF_8)));
WordContainer.main(args); WordContainer.main(args);
} finally {
System.setIn(stdin); System.setIn(stdin);
} }
}
} }

View File

@ -25,6 +25,5 @@ public class Part3 {
ResourceBundle bundle = ResourceBundle.getBundle(BASE_NAME, locale); ResourceBundle bundle = ResourceBundle.getBundle(BASE_NAME, locale);
System.out.println(bundle.getString(parts[0])); System.out.println(bundle.getString(parts[0]));
} }
scanner.close();
} }
} }