Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 11 at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:48) at java.base/java.lang.String.charAt(String.java:709) at Main.main(Main.java:16) |
0.151 s | 16 KBi |
#2 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 7 at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:48) at java.base/java.lang.String.charAt(String.java:709) at Main.main(Main.java:16) |
0.149 s | 16 KBi |
#3 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 11 at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:48) at java.base/java.lang.String.charAt(String.java:709) at Main.main(Main.java:16) |
0.143 s | 16 KBi |
#4 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 4 at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:48) at java.base/java.lang.String.charAt(String.java:709) at Main.main(Main.java:16) |
0.14 s | 15 KBi |
#5 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 3 at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:48) at java.base/java.lang.String.charAt(String.java:709) at Main.main(Main.java:16) |
0.143 s | 16 KBi |
#6 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 1 at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:48) at java.base/java.lang.String.charAt(String.java:709) at Main.main(Main.java:16) |
0.138 s | 15 KBi |
#7 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 100000 at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:48) at java.base/java.lang.String.charAt(String.java:709) at Main.main(Main.java:16) |
0.281 s | 20 KBi |
#8 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 100000 at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:48) at java.base/java.lang.String.charAt(String.java:709) at Main.main(Main.java:16) |
0.272 s | 21 KBi |
#9 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 99999 at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:48) at java.base/java.lang.String.charAt(String.java:709) at Main.main(Main.java:16) |
0.262 s | 20 KBi |
#10 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 99999 at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:48) at java.base/java.lang.String.charAt(String.java:709) at Main.main(Main.java:16) |
0.286 s | 20 KBi |
#11 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 99999 at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:48) at java.base/java.lang.String.charAt(String.java:709) at Main.main(Main.java:16) |
0.347 s | 27 KBi |
#12 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 99996 at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:48) at java.base/java.lang.String.charAt(String.java:709) at Main.main(Main.java:16) |
0.353 s | 25 KBi |
#13 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 99999 at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:48) at java.base/java.lang.String.charAt(String.java:709) at Main.main(Main.java:16) |
0.283 s | 20 KBi |
#14 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 99999 at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:48) at java.base/java.lang.String.charAt(String.java:709) at Main.main(Main.java:16) |
0.346 s | 27 KBi |
#15 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 99999 at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:48) at java.base/java.lang.String.charAt(String.java:709) at Main.main(Main.java:16) |
0.255 s | 21 KBi |
#16 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 100000 at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:48) at java.base/java.lang.String.charAt(String.java:709) at Main.main(Main.java:16) |
0.328 s | 20 KBi |
#17 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 100000 at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:48) at java.base/java.lang.String.charAt(String.java:709) at Main.main(Main.java:16) |
0.332 s | 20 KBi |
#18 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 100000 at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:48) at java.base/java.lang.String.charAt(String.java:709) at Main.main(Main.java:16) |
0.271 s | 21 KBi |
#19 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 100000 at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:48) at java.base/java.lang.String.charAt(String.java:709) at Main.main(Main.java:16) |
0.257 s | 21 KBi |
#20 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 100000 at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:48) at java.base/java.lang.String.charAt(String.java:709) at Main.main(Main.java:16) |
0.354 s | 25 KBi |
#21 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 100000 at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:48) at java.base/java.lang.String.charAt(String.java:709) at Main.main(Main.java:16) |
0.263 s | 20 KBi |
#22 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 100000 at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:48) at java.base/java.lang.String.charAt(String.java:709) at Main.main(Main.java:16) |
0.268 s | 20 KBi |
import java.util.Scanner; public class Main { public static Scanner leer = new Scanner(System.in); public static void main(String[] args) { //input dimensiones String cadena = leer.nextLine().trim(); int count=0; int i=0; boolean continuar=true; while(i<cadena.length() && continuar){ if(cadena.charAt(i)==cadena.charAt(cadena.length()-i)){ count++; }else{ continuar=false; } i++; } System.out.println(count); } }