Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index -2 out of bounds for length 26 at Main.main(Main.java:10) |
0.159 s | 15 KBi |
#2 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index -12 out of bounds for length 26 at Main.main(Main.java:10) |
0.154 s | 16 KBi |
#3 |
Correcto
|
0.172 s | 16 KBi |
#4 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index -25 out of bounds for length 26 at Main.main(Main.java:10) |
0.146 s | 16 KBi |
#5 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index -21 out of bounds for length 26 at Main.main(Main.java:10) |
0.151 s | 15 KBi |
#6 |
Incorrecto
|
0.13 s | 12 KBi |
#7 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index -19 out of bounds for length 26 at Main.main(Main.java:10) |
0.142 s | 12 KBi |
#8 |
Incorrecto
|
0.133 s | 16 KBi |
#9 |
Incorrecto
|
0.153 s | 16 KBi |
#10 |
Incorrecto
|
0.142 s | 12 KBi |
#11 |
Incorrecto
|
0.134 s | 12 KBi |
#12 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 26 at Main.main(Main.java:10) |
0.136 s | 16 KBi |
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String l = scan.nextLine(); int[] letras = new int[26]; boolean r = false; for(int i=0; i<l.length(); i++){ letras['a'-l.charAt(i)]++; if(letras['a'-l.charAt(i)]>1) System.out.println("yes"); break; } if(!r) System.out.println("no"); } }