Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.172 s | 12 KBi |
#2 |
Correcto
|
0.148 s | 16 KBi |
#3 |
Correcto
|
0.127 s | 12 KBi |
#4 |
Correcto
|
0.135 s | 12 KBi |
#5 |
Correcto
|
0.142 s | 12 KBi |
#6 |
Correcto
|
0.172 s | 12 KBi |
#7 |
Correcto
|
0.14 s | 16 KBi |
#8 |
Correcto
|
0.159 s | 16 KBi |
#9 |
Correcto
|
0.173 s | 12 KBi |
#10 |
Correcto
|
0.154 s | 15 KBi |
#11 |
Correcto
|
0.148 s | 16 KBi |
#12 |
Correcto
|
0.134 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) r = true; } if(!r) System.out.println("no"); else System.out.println("yes"); } }