Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Error de compilación
Main.java:26: error: class, interface, or enum expected } ^ 1 error |
||
#2 |
Error de compilación
Main.java:26: error: class, interface, or enum expected } ^ 1 error |
||
#3 |
Error de compilación
Main.java:26: error: class, interface, or enum expected } ^ 1 error |
||
#4 |
Error de compilación
Main.java:26: error: class, interface, or enum expected } ^ 1 error |
||
#5 |
Error de compilación
Main.java:26: error: class, interface, or enum expected } ^ 1 error |
||
#6 |
Error de compilación
Main.java:26: error: class, interface, or enum expected } ^ 1 error |
||
#7 |
Error de compilación
Main.java:26: error: class, interface, or enum expected } ^ 1 error |
||
#8 |
Error de compilación
Main.java:26: error: class, interface, or enum expected } ^ 1 error |
||
#9 |
Error de compilación
Main.java:26: error: class, interface, or enum expected } ^ 1 error |
||
#10 |
Error de compilación
Main.java:26: error: class, interface, or enum expected } ^ 1 error |
||
#11 |
Error de compilación
Main.java:26: error: class, interface, or enum expected } ^ 1 error |
||
#12 |
Error de compilación
Main.java:26: error: class, interface, or enum expected } ^ 1 error |
import java.util.*; public class Main { public static void main(String[] args) throws java.lang.Exception { Scanner sc = new Scanner(System.in); String word = sc.nextLine(); int [] letters = new int[26]; for(Character c: word.toCharArray()){ if(letters[c-'a'>0]){ System.out.println("yes"); break; } letters[c-'a']++; } System.out.println("no"); } } } }