71A

Posted ozxics

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了71A相关的知识,希望对你有一定的参考价值。

#include <iostream>
#include <string>
using namespace std;

int main()
{
	string word;
	int length, n;
	cin>>n;
	for(int i=0; i<n; ++i)
	{
		cin>>word;
		length=word.size();
		if(length>10)
			cout<<word[0]<<length-2<<word[length-1]<<endl;
		else
			cout<<word<<endl;
	}
	return 0;
}

  

以上是关于71A的主要内容,如果未能解决你的问题,请参考以下文章