Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Incorrecto
|
0.142 s | 12 KBi |
#2 |
Correcto
|
0.141 s | 16 KBi |
#3 |
Correcto
|
0.176 s | 12 KBi |
#4 |
Correcto
|
0.127 s | 12 KBi |
#5 |
Correcto
|
0.134 s | 12 KBi |
#6 |
Incorrecto
|
0.177 s | 12 KBi |
#7 |
Incorrecto
|
0.176 s | 12 KBi |
#8 |
Incorrecto
|
0.154 s | 15 KBi |
#9 |
Incorrecto
|
0.14 s | 15 KBi |
#10 |
Incorrecto
|
0.139 s | 16 KBi |
#11 |
Incorrecto
|
0.178 s | 12 KBi |
#12 |
Incorrecto
|
0.138 s | 12 KBi |
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String l = scan.nextLine(); int[] letras = new int[26]; boolean r = false; for(int i=0; i<l.length(); i++){ letras[l.charAt(i)-'a']++; if(letras[l.charAt(i)-'a']>1) System.out.println("yes"); break; } if(!r) System.out.println("no"); } }