parkershamblin's blog

By parkershamblin, history, 3 years ago, In English

Hi, this is my first day on Codeforces and I'm currently struggling to get started. Here is the link to the problem I am trying to solve:

I am not sure why my submission keeps failing on test 1.

lines = input()
lines = lines.splitlines()
n = int(lines[0])

for word in lines[1:n+1]:
    if len(word) > 10:
        abrv = f"{word[0]}{len(word[1:-1])}{word[-1]}"

Does anyone have any ideas?

Thanks, Parker.

Full text and comments »

  • Vote: I like it
  • -10
  • Vote: I do not like it