본문 바로가기
python-algorithm

codeforce 71A. Way Too Long Words

by 무적김두칠 2022. 4. 28.

1
2
3
4
5
6
n=int(input())
for i in range(n):
    s=input()
    if len(s)<=10 : ans=s
    else : ans=s[0]+str(len(s)-2)+s[-1]
    print(ans)
cs
반응형

'python-algorithm' 카테고리의 다른 글

codeforces 282 A. Bit++  (0) 2022.04.28
codeforce 112A. Petya and Strings  (0) 2022.04.28
Codeforces A. Watermelon  (0) 2022.04.28
leetcode 1910. Remove All Occurrences of a Substring  (0) 2022.04.26
leetcode 46. Permutations  (0) 2022.04.26

댓글