Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.197 s | 19 KBi |
#2 |
Correcto
|
0.136 s | 16 KBi |
#3 |
Correcto
|
0.147 s | 18 KBi |
#4 |
Correcto
|
0.199 s | 27 KBi |
#5 |
Correcto
|
0.153 s | 16 KBi |
#6 |
Correcto
|
0.168 s | 38 KBi |
#7 |
Correcto
|
0.2 s | 20 KBi |
#8 |
Correcto
|
0.162 s | 14 KBi |
#9 |
Correcto
|
0.2 s | 22 KBi |
#10 |
Correcto
|
0.14 s | 16 KBi |
#11 |
Correcto
|
0.131 s | 16 KBi |
#12 |
Correcto
|
0.133 s | 15 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) r = true; } if(!r) System.out.println("no"); else System.out.println("yes"); } }