Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.041 s | 14 KBi |
#2 |
Correcto
|
0.044 s | 14 KBi |
#3 |
Correcto
|
0.039 s | 14 KBi |
#4 |
Correcto
|
0.041 s | 14 KBi |
#5 |
Correcto
|
0.083 s | 15 KBi |
#6 |
Correcto
|
0.041 s | 14 KBi |
#7 |
Correcto
|
0.033 s | 14 KBi |
#8 |
Correcto
|
0.077 s | 50 KBi |
#9 |
Correcto
|
0.042 s | 13 KBi |
#10 |
Correcto
|
0.07 s | 10 KBi |
#11 |
Correcto
|
0.073 s | 10 KBi |
#12 |
Correcto
|
0.092 s | 40 KBi |
import java.io.*; class Main { public static void main(String[] args) throws IOException{ String palabra = ""; String resultado = "no"; BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); palabra = bf.readLine(); for(int i=0;i<palabra.length();i++){ int cont = 0; for(int j=0;j<palabra.length();j++){ if(palabra.charAt(i)==palabra.charAt(j)){ cont++; } } if(cont>1){ resultado="yes"; } } System.out.println(resultado); } }