My code is like this.
package main
import "fmt"
func main() {
var n int
fmt.Scanf("%d", &n)
words := make([]string, n)
for i := 0; i < n; i++ {
fmt.Scanf("%s", &words[i])
}
for i := 0; i < n; i++ {
if len(words[i]) > 10 {
fmt.Printf("%c%d%c\n", words[i][0], (len(words[i]) - 2), words[i][len(words[i])-1])
} else {
fmt.Printf("%s\n", words[i])
}
}
}
It has no error when executing this code on my computer, but scoring system says it is wrong answer... What would be the problem?







