#include<cstdio>
#include<iostream>
#include<cstring>
using namespace std;
const int maxn=105;
int main()
{
int n;
cin>>n;
while(n--)
{
char word[maxn];
scanf("%s",word);
int n=strlen(word);
if(n<=10)
cout<<word<<endl;
else
{
printf("%c%d%c\n",word[0],n-2,word[n-1]);
}
}
return 0;
}
算法之路四:codeforces 71A
最新推荐文章于 2021-04-22 21:01:43 发布