Python solution for watermelon problem

Revision en2, by A-R, 2020-11-22 23:15:43

for i in range(int(input())): w = input() if len(w) <= 10: print(w) else: print(w[0] + str(len(w) — 2) + w[-1])

Tags #codefoces, #twatermelon

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English A-R 2020-11-22 23:15:43 13
en1 English A-R 2020-11-22 23:13:29 164 Initial revision (published)