Task: | Osajono |
Sender: | lutrarutra |
Submission time: | 2015-10-02 15:08:43 +0300 |
Language: | Java |
Status: | COMPILE ERROR |
Compiler report
input/Osajono5.java:22: error: cannot find symbol reader.close(); ^ symbol: variable reader location: class Osajono5 1 error
Code
public class Osajono5 { public static void main(String[] args) { IO io = new IO(); int tuloste = 0; String input = io.next(); int inputLength = input.length(); tuloste = tuloste + inputLength; for (int i = 0; i < inputLength-1; i++) { String kok = "" + input.charAt(i); String endOfStr = input.substring(i); tuloste = tuloste + Math.max(endOfStr.length() - endOfStr.replaceAll(kok, "").length()-1,0); } io.println(tuloste); reader.close(); } }