█████████ ████ ███░░░░░███ ░░███ ███ ░░░ ██████ ███████ ██████ ██████ ░███ ███░░███ ███░░███ ███░░███ ███░░███ ░███ ░███ ░███░███ ░███ ░███████ ░███ ░███ ░░███ ███░███ ░███░███ ░███ ░███░░░ ░███ ░███ ░░█████████ ░░██████ ░░████████░░██████ ░░██████ ░░░░░░░░░ ░░░░░░ ░░░░░░░░ ░░░░░░ ░░░░░░

Envío 6876

Problema 0x5c - Decir si hay una letra repetida

  • Autor: Justin
  • Fecha: 2023-02-19 02:46:55 UTC (Hace alrededor de 1 año)
Caso # Resultado Tiempo Memoria
#1
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Error: Could not find or load main class Main
Caused by: java.lang.ClassNotFoundException: Main
0.074 s 12 KBi
#2
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Error: Could not find or load main class Main
Caused by: java.lang.ClassNotFoundException: Main
0.083 s 12 KBi
#3
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Error: Could not find or load main class Main
Caused by: java.lang.ClassNotFoundException: Main
0.045 s 15 KBi
#4
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Error: Could not find or load main class Main
Caused by: java.lang.ClassNotFoundException: Main
0.091 s 12 KBi
#5
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Error: Could not find or load main class Main
Caused by: java.lang.ClassNotFoundException: Main
0.071 s 12 KBi
#6
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Error: Could not find or load main class Main
Caused by: java.lang.ClassNotFoundException: Main
0.076 s 12 KBi
#7
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Error: Could not find or load main class Main
Caused by: java.lang.ClassNotFoundException: Main
0.086 s 12 KBi
#8
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Error: Could not find or load main class Main
Caused by: java.lang.ClassNotFoundException: Main
0.097 s 12 KBi
#9
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Error: Could not find or load main class Main
Caused by: java.lang.ClassNotFoundException: Main
0.046 s 15 KBi
#10
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Error: Could not find or load main class Main
Caused by: java.lang.ClassNotFoundException: Main
0.091 s 12 KBi
#11
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Error: Could not find or load main class Main
Caused by: java.lang.ClassNotFoundException: Main
0.046 s 15 KBi
#12
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Error: Could not find or load main class Main
Caused by: java.lang.ClassNotFoundException: Main
0.078 s 12 KBi
Puntos totales: 0 / 100

Código

class CalculoArreglo {
	public static void main(String[] args) {
		
		java.util.Scanner inp = new java.util.Scanner(System.in);
		String word = inp.nextLine();
		String letters[] = word.split("");
		boolean found = false;
		
		for(int i = 0; i < letters.length; i++) {
			for(int j = 0; j < letters.length; j++) {
				if(i == j){
					continue;
				} else if(letters[i].equals(letters[j])) {
					found = true;
					break;
				}
			}
		}
		
		if(found) System.out.print("Yes");
		else System.out.print("No");
		
		inp.close();
	}
}