Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.098 s | 13 KBi |
#2 |
Correcto
|
0.103 s | 13 KBi |
#3 |
Correcto
|
0.101 s | 15 KBi |
#4 |
Correcto
|
0.113 s | 13 KBi |
#5 |
Correcto
|
0.1 s | 13 KBi |
#6 |
Correcto
|
0.098 s | 13 KBi |
#7 |
Error en tiempo de ejecución (NZEC)
Exited with error status 137 run.sh: line 1: 3 Killed /usr/local/openjdk13/bin/java Main |
0.317 s | 125 KBi |
#8 |
Error en tiempo de ejecución (NZEC)
Exited with error status 137 run.sh: line 1: 3 Killed /usr/local/openjdk13/bin/java Main |
0.319 s | 125 KBi |
#9 |
Error en tiempo de ejecución (NZEC)
Exited with error status 137 run.sh: line 1: 3 Killed /usr/local/openjdk13/bin/java Main |
0.338 s | 125 KBi |
#10 |
Error en tiempo de ejecución (NZEC)
Exited with error status 137 run.sh: line 1: 3 Killed /usr/local/openjdk13/bin/java Main |
0.325 s | 125 KBi |
#11 |
Error en tiempo de ejecución (NZEC)
Exited with error status 137 run.sh: line 1: 3 Killed /usr/local/openjdk13/bin/java Main |
0.303 s | 125 KBi |
#12 |
Error en tiempo de ejecución (NZEC)
Exited with error status 137 run.sh: line 1: 3 Killed /usr/local/openjdk13/bin/java Main |
0.307 s | 125 KBi |
#13 |
Error en tiempo de ejecución (NZEC)
Exited with error status 137 run.sh: line 1: 3 Killed /usr/local/openjdk13/bin/java Main |
0.334 s | 125 KBi |
#14 |
Error en tiempo de ejecución (NZEC)
Exited with error status 137 run.sh: line 1: 3 Killed /usr/local/openjdk13/bin/java Main |
0.328 s | 125 KBi |
#15 |
Error en tiempo de ejecución (NZEC)
Exited with error status 137 run.sh: line 1: 3 Killed /usr/local/openjdk13/bin/java Main |
0.297 s | 125 KBi |
#16 |
Error en tiempo de ejecución (NZEC)
Exited with error status 137 run.sh: line 1: 3 Killed /usr/local/openjdk13/bin/java Main |
0.317 s | 125 KBi |
#17 |
Error en tiempo de ejecución (NZEC)
Exited with error status 137 run.sh: line 1: 3 Killed /usr/local/openjdk13/bin/java Main |
0.273 s | 125 KBi |
#18 |
Error en tiempo de ejecución (NZEC)
Exited with error status 137 run.sh: line 1: 3 Killed /usr/local/openjdk13/bin/java Main |
0.293 s | 125 KBi |
#19 |
Error en tiempo de ejecución (NZEC)
Exited with error status 137 run.sh: line 1: 3 Killed /usr/local/openjdk13/bin/java Main |
0.298 s | 125 KBi |
#20 |
Error en tiempo de ejecución (NZEC)
Exited with error status 137 run.sh: line 1: 3 Killed /usr/local/openjdk13/bin/java Main |
0.324 s | 125 KBi |
#21 |
Error en tiempo de ejecución (NZEC)
Exited with error status 137 run.sh: line 1: 3 Killed /usr/local/openjdk13/bin/java Main |
0.295 s | 125 KBi |
#22 |
Error en tiempo de ejecución (NZEC)
Exited with error status 137 run.sh: line 1: 3 Killed /usr/local/openjdk13/bin/java Main |
0.3 s | 125 KBi |
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String s = scanner.nextLine(); int n = s.length(); // Inicializar el máximo borde a 0 int maxBorde = 0; // Comprobar todos los posibles bordes for (int i = 1; i < n; i++) { String posibleBorde = s.substring(0, i); String posibleFinal = s.substring(n - i, n); if (posibleBorde.equals(posibleFinal)) { maxBorde = i; } } System.out.println(maxBorde); } }