题目链接:http://www.codeforces.com/problemset/problem/71/A
题意:将长字符串改成简写格式。
C++代码:
#include <string>
#include <iostream>
using namespace std;
int n;
string s;
int main()
{
cin >> n;
while (n --)
{
cin >> s;
if (s.length() > )
cout << s[] << s.length()- << s[s.length()-] << endl;
else
cout << s << endl;
}
return ;
}
C++