您的位置:首页 > 其它

71A Way Too Long Words

2015-05-21 15:29 344 查看
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;

int main() {

    //freopen("aa.in", "r", stdin);

    int n;
    string str;
    cin >> n;
    while(n--) {
        cin >> str;
        int len = str.length();
        if(len > 10) {
            printf("%c%d%c\n", str[0], len - 2, str[len-1]);
        } else {
            cout << str << endl;
        }
    }
    return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: