Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Incorrecto
|
0.143 s | 16 KBi |
#2 |
Incorrecto
|
0.132 s | 12 KBi |
#3 |
Incorrecto
|
0.166 s | 12 KBi |
#4 |
Incorrecto
|
0.148 s | 16 KBi |
#5 |
Incorrecto
|
0.128 s | 16 KBi |
#6 |
Incorrecto
|
0.157 s | 12 KBi |
#7 |
Incorrecto
|
0.122 s | 15 KBi |
#8 |
Incorrecto
|
0.128 s | 12 KBi |
#9 |
Incorrecto
|
0.145 s | 16 KBi |
#10 |
Incorrecto
|
0.129 s | 12 KBi |
#11 |
Incorrecto
|
0.138 s | 16 KBi |
#12 |
Incorrecto
|
0.13 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;System.out.println("yes"); break; } if(!r) System.out.println("no"); else System.out.println("yes"); } }