Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Incorrecto
|
0.101 s | 16 KBi |
#2 |
Correcto
|
0.092 s | 16 KBi |
#3 |
Correcto
|
0.101 s | 16 KBi |
#4 |
Correcto
|
0.096 s | 16 KBi |
#5 |
Correcto
|
0.111 s | 13 KBi |
#6 |
Incorrecto
|
0.093 s | 16 KBi |
#7 |
Incorrecto
|
0.081 s | 16 KBi |
#8 |
Incorrecto
|
0.101 s | 16 KBi |
#9 |
Incorrecto
|
0.099 s | 16 KBi |
#10 |
Incorrecto
|
0.105 s | 16 KBi |
#11 |
Incorrecto
|
0.096 s | 16 KBi |
#12 |
Incorrecto
|
0.092 s | 16 KBi |
import java.util.*; public class Main { public static void main(String[] args) throws java.lang.Exception { Scanner sc = new Scanner(System.in); String word = sc.nextLine(); int [] letters = new int[26]; for(Character c: word.toCharArray()){ if(letters[c-'a']>0){ System.out.println("yes"); break; } letters[c-'a']++; } System.out.println("no"); } }