Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.006 s | 9 KBi |
#2 |
Correcto
|
0.005 s | 10 KBi |
#3 |
Correcto
|
0.005 s | 8 KBi |
#4 |
Correcto
|
0.004 s | 7 KBi |
#5 |
Correcto
|
0.003 s | 29 KBi |
#6 |
Correcto
|
0.004 s | 42 KBi |
#7 |
Correcto
|
0.004 s | 20 KBi |
#8 |
Correcto
|
0.005 s | 21 KBi |
#9 |
Correcto
|
0.005 s | 8 KBi |
#10 |
Correcto
|
0.004 s | 8 KBi |
#11 |
Correcto
|
0.004 s | 27 KBi |
#12 |
Correcto
|
0.005 s | 7 KBi |
package main import "fmt" func repeatedLetter(word string) bool { count := map[rune]int{} for _, char := range word { count[char] += 1; if count[char] > 1 { return true } } return false; } func main() { var input string fmt.Scanln(&input) if repeatedLetter(input) { fmt.Println("yes") } else { fmt.Println("no") } }