Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Error de compilación
Main.java:10: error: <identifier> expected pubic static String isRepeated(){ ^ 1 error |
||
#2 |
Error de compilación
Main.java:10: error: <identifier> expected pubic static String isRepeated(){ ^ 1 error |
||
#3 |
Error de compilación
Main.java:10: error: <identifier> expected pubic static String isRepeated(){ ^ 1 error |
||
#4 |
Error de compilación
Main.java:10: error: <identifier> expected pubic static String isRepeated(){ ^ 1 error |
||
#5 |
Error de compilación
Main.java:10: error: <identifier> expected pubic static String isRepeated(){ ^ 1 error |
||
#6 |
Error de compilación
Main.java:10: error: <identifier> expected pubic static String isRepeated(){ ^ 1 error |
||
#7 |
Error de compilación
Main.java:10: error: <identifier> expected pubic static String isRepeated(){ ^ 1 error |
||
#8 |
Error de compilación
Main.java:10: error: <identifier> expected pubic static String isRepeated(){ ^ 1 error |
||
#9 |
Error de compilación
Main.java:10: error: <identifier> expected pubic static String isRepeated(){ ^ 1 error |
||
#10 |
Error de compilación
Main.java:10: error: <identifier> expected pubic static String isRepeated(){ ^ 1 error |
||
#11 |
Error de compilación
Main.java:10: error: <identifier> expected pubic static String isRepeated(){ ^ 1 error |
||
#12 |
Error de compilación
Main.java:10: error: <identifier> expected pubic static String isRepeated(){ ^ 1 error |
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(); System.out.println(isRepeated(word)); } pubic static String isRepeated(){ int [] letters = new int[26]; for(Character c: word.toCharArray()){ if(letters[c-'a']>0) return "yes"; letters[c-'a']++; } return "no"; } }