Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Incorrecto
|
0.163 s | 15 KBi |
#2 |
Incorrecto
|
0.132 s | 35 KBi |
#3 |
Incorrecto
|
0.135 s | 23 KBi |
#4 |
Incorrecto
|
0.181 s | 16 KBi |
#5 |
Incorrecto
|
0.168 s | 23 KBi |
#6 |
Incorrecto
|
0.161 s | 15 KBi |
#7 |
Incorrecto
|
0.145 s | 15 KBi |
#8 |
Incorrecto
|
0.16 s | 16 KBi |
#9 |
Incorrecto
|
0.168 s | 15 KBi |
#10 |
Incorrecto
|
0.173 s | 26 KBi |
#11 |
Incorrecto
|
0.153 s | 16 KBi |
#12 |
Incorrecto
|
0.156 s | 16 KBi |
import java.util.Scanner; /** * * @author usuario */ public class Main { public static void main(String[] args) throws java.lang.Exception { Scanner sc = new Scanner(System.in); String word = sc.nextLine(); boolean[] letters = new boolean[128]; String result = "yes"; for(int i=0; i<word.length();i++){ int item = word.charAt(i); if(letters[item]){ result = "no"; break; }else{ letters[item] = true; } } System.out.println(result); } }