add solution for hw4:3435
Some checks failed
Fast Reverse Tests / test (push) Successful in 12s
Reverse Tests / test (push) Successful in 6s
Sum Tests / test (push) Successful in 7s
Word Stat Tests / test (push) Failing after 5s

This commit is contained in:
2026-01-31 15:39:59 +05:00
parent 971119da82
commit 8173cf4dab

View File

@@ -59,8 +59,8 @@ public class WordStatLengthSuffix {
PrintWriter writer = new PrintWriter(outputFileName, "UTF-8"); PrintWriter writer = new PrintWriter(outputFileName, "UTF-8");
for (WordInfo info : sortedWords) { for (WordInfo info : sortedWords) {
if (info.word.length != 1) { if (info.word.length() != 1) {
writer.println(info.word.substring(info.word.length / 2) + " " + info.count); writer.println(info.word.substring(info.word.length() / 2) + " " + info.count);
} }
} }