Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Error de compilación
Main.java:11: error: incompatible types: boolean cannot be converted to int if(letters[c-'a'>0]){ ^ Main.java:11: error: incompatible types: int cannot be converted to boolean if(letters[c-'a'>0]){ ^ 2 errors |
||
#2 |
Error de compilación
Main.java:11: error: incompatible types: boolean cannot be converted to int if(letters[c-'a'>0]){ ^ Main.java:11: error: incompatible types: int cannot be converted to boolean if(letters[c-'a'>0]){ ^ 2 errors |
||
#3 |
Error de compilación
Main.java:11: error: incompatible types: boolean cannot be converted to int if(letters[c-'a'>0]){ ^ Main.java:11: error: incompatible types: int cannot be converted to boolean if(letters[c-'a'>0]){ ^ 2 errors |
||
#4 |
Error de compilación
Main.java:11: error: incompatible types: boolean cannot be converted to int if(letters[c-'a'>0]){ ^ Main.java:11: error: incompatible types: int cannot be converted to boolean if(letters[c-'a'>0]){ ^ 2 errors |
||
#5 |
Error de compilación
Main.java:11: error: incompatible types: boolean cannot be converted to int if(letters[c-'a'>0]){ ^ Main.java:11: error: incompatible types: int cannot be converted to boolean if(letters[c-'a'>0]){ ^ 2 errors |
||
#6 |
Error de compilación
Main.java:11: error: incompatible types: boolean cannot be converted to int if(letters[c-'a'>0]){ ^ Main.java:11: error: incompatible types: int cannot be converted to boolean if(letters[c-'a'>0]){ ^ 2 errors |
||
#7 |
Error de compilación
Main.java:11: error: incompatible types: boolean cannot be converted to int if(letters[c-'a'>0]){ ^ Main.java:11: error: incompatible types: int cannot be converted to boolean if(letters[c-'a'>0]){ ^ 2 errors |
||
#8 |
Error de compilación
Main.java:11: error: incompatible types: boolean cannot be converted to int if(letters[c-'a'>0]){ ^ Main.java:11: error: incompatible types: int cannot be converted to boolean if(letters[c-'a'>0]){ ^ 2 errors |
||
#9 |
Error de compilación
Main.java:11: error: incompatible types: boolean cannot be converted to int if(letters[c-'a'>0]){ ^ Main.java:11: error: incompatible types: int cannot be converted to boolean if(letters[c-'a'>0]){ ^ 2 errors |
||
#10 |
Error de compilación
Main.java:11: error: incompatible types: boolean cannot be converted to int if(letters[c-'a'>0]){ ^ Main.java:11: error: incompatible types: int cannot be converted to boolean if(letters[c-'a'>0]){ ^ 2 errors |
||
#11 |
Error de compilación
Main.java:11: error: incompatible types: boolean cannot be converted to int if(letters[c-'a'>0]){ ^ Main.java:11: error: incompatible types: int cannot be converted to boolean if(letters[c-'a'>0]){ ^ 2 errors |
||
#12 |
Error de compilación
Main.java:11: error: incompatible types: boolean cannot be converted to int if(letters[c-'a'>0]){ ^ Main.java:11: error: incompatible types: int cannot be converted to boolean if(letters[c-'a'>0]){ ^ 2 errors |
import java.util.*; public class Main { public static void main(String[] args) throws java.lang.Exception { Scanner sc = new Scanner(System.in); String word = sc.nextLine(); int [] letters = new int[26]; for(Character c: word.toCharArray()){ if(letters[c-'a'>0]){ System.out.println("yes"); break; } letters[c-'a']++; } System.out.println("no"); } }