codeforces 71A

http://codeforces.com/problemset/problem/71/A

 1 #include<iostream>
 2 #include<string>
 3 using namespace std;
 4 string a;
 5 int main()
 6 {
 7     int n;
 8     cin>>n;
 9     for(int i=0;i<n;i++)
10     {
11         cin>>a;
12          if(a.length()>10)
13             cout<<a[0]<<a.length()-2<<a[a.length()-1]<<endl;
14          else
15             cout<<a<<endl;
16     }
17     return 0;
18 }

 

posted @ 2013-08-12 22:30  JKXQJ  阅读(242)  评论(0编辑  收藏  举报