CSES - Datatähti 2016 alku - Results
Submission details
Task:Osajono
Sender:Maunuliini
Submission time:2015-09-28 16:23:52 +0300
Language:Java
Status:COMPILE ERROR

Compiler report

input/Datatahti20161.java:18: error: cannot find symbol
        IO io = new IO();
        ^
  symbol:   class IO
  location: class Datatahti20161
input/Datatahti20161.java:18: error: cannot find symbol
        IO io = new IO();
                    ^
  symbol:   class IO
  location: class Datatahti20161
2 errors

Code

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package datatahti2016.pkg1;
import java.util.*;     
/**
 *
 * @author alexey
 */
public class Datatahti20161 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        IO io = new IO();
        
        
   
        String input=io.next();
        int answer=0;
        
        answer+=input.length();
        
        int[] letters=new int[26];
        
        
        for (int i = 0; i < input.length(); i++) {
            int c =input.charAt(i)-65;
            
            letters[c]++;
            
        }
        for (int i = 0; i < input.length(); i++) {
            if(letters[i]==0){
                
            }else{
             answer+=letters[i]-1;
            }
            
        }
       
       io.println(answer);
       io.close();
       
       
    }
    
}