码迷,mamicode.com
首页 > 其他好文 > 详细

Codeforces 71A Way Too Long Words

时间:2018-06-17 13:31:32      阅读:162      评论:0      收藏:0      [点我收藏+]

标签:分享图片   using   span   ble   word   技术分享   color   set   ems   

技术分享图片

题目链接

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

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

int main()
{
    int n;
    cin>>n;
    while(n--)
    {
        string str;
        cin>>str;
        int len=str.length();
        if(len<=10)
        {
            cout<<str<<endl;
        }else
        {
            len=len-2;
            cout<<str[0]<<len<<str[len+1]<<endl;
        }

    }


    return 0;
}

 

Codeforces 71A Way Too Long Words

标签:分享图片   using   span   ble   word   技术分享   color   set   ems   

原文地址:https://www.cnblogs.com/CMlhc/p/9192584.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!