题目链接: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++

codeforces水题100道 第二十一题 Codeforces Beta Round #65 (Div. 2) A. Way Too Long Words (strings)的更多相关文章

  1. codeforces水题100道 第十一题 Codeforces Round #143 (Div. 2) A. Team (brute force)

    题目链接:http://www.codeforces.com/problemset/problem/231/A题意:问n道题目当中有多少道题目是至少两个人会的.C++代码: #include < ...

  2. codeforces水题100道 第二十七题 Codeforces Round #172 (Div. 2) A. Word Capitalization (strings)

    题目链接:http://www.codeforces.com/problemset/problem/281/A题意:将一个英文字母的首字母变成大写,然后输出.C++代码: #include <c ...

  3. codeforces水题100道 第二十三题 Codeforces Beta Round #77 (Div. 2 Only) A. Football (strings)

    题目链接:http://www.codeforces.com/problemset/problem/96/A题意:判断一个0-1字符串中出现的最长的0字串或者1字串的长度是否大于等于7.C++代码: ...

  4. codeforces水题100道 第二十题 Codeforces Round #191 (Div. 2) A. Flipping Game (brute force)

    题目链接:http://www.codeforces.com/problemset/problem/327/A题意:你现在有n张牌,这些派一面是0,另一面是1.编号从1到n,你需要翻转[i,j]区间的 ...

  5. Codeforces Beta Round #65 (Div. 2)

    Codeforces Beta Round #65 (Div. 2) http://codeforces.com/contest/71 A #include<bits/stdc++.h> ...

  6. codeforces水题100道 第二十六题 Codeforces Beta Round #95 (Div. 2) A. cAPS lOCK (strings)

    题目链接:http://www.codeforces.com/problemset/problem/131/A题意:字符串大小写转换.C++代码: #include <cstdio> #i ...

  7. codeforces水题100道 第二十五题 Codeforces Round #197 A. Helpful Maths (Div. 2) (strings)

    题目链接:http://www.codeforces.com/problemset/problem/339/A题意:重新组合加法字符串,使得按照1,2,3的顺序进行排列.C++代码: #include ...

  8. codeforces水题100道 第二十四题 Codeforces Beta Round #85 (Div. 2 Only) A. Petya and Strings (strings)

    题目链接:http://www.codeforces.com/problemset/problem/112/A题意:忽略大小写,比较两个字符串字典序大小.C++代码: #include <cst ...

  9. codeforces水题100道 第二十二题 Codeforces Beta Round #89 (Div. 2) A. String Task (strings)

    题目链接:http://www.codeforces.com/problemset/problem/118/A题意:字符串转换……C++代码: #include <string> #inc ...

随机推荐

  1. 单表多个Count 条件进行查询拼接小妙用

    单表多数据进行拼接 DROP table if EXISTS tmp_table; CREATE TEMPORARY TABLE tmp_table ( 创建临时表 SELECT p1q04,p2q0 ...

  2. C++自定义异常类

    代码样例: #include <iostream> using namespace std; class illegalParameterValue { public: illegalPa ...

  3. SQL Server 连接远程服务器

    最近要用到sqlserver,将本地的数据更新到远端的sqlserver时,希望能够查看远端sqlserver数据变化. 下载Microsoft SQL Server Management Studi ...

  4. CI框架 -- 驱动器

    驱动器目录及文件结构 下面是驱动器目录和文件结构布局的简单例子: /application/libraries/Driver_name Driver_name.php //驱动器名称 drivers ...

  5. Linux 标准文件描述符

    出于特殊目的,bash shell保留了最早的3个文件描述符0.1.2,如下所示: 1.STDIN标准输入 Shell从STDIN文件描述对应的键盘获得输入,在用户输入时处理每个字符. 范例1:cat ...

  6. Cisco交换机端口聚合(EtherChannel)

    端口聚合,英文简称EtherChannel(以太通道)是由Cisco研发的,应用于交换机之间的多链路捆绑技术.它的基本原理是: 将两个设备间多条物理链路捆绑在一起组成一条逻辑链路,从而达到带宽倍增的目 ...

  7. kubectl error: The connection to the server localhost:8080 was refused

    did you run below commands after kubeadm init To start using your cluster, you need to run (as a reg ...

  8. asp.net网页中添加年月日时分秒星期。

    html代码如下: 现在是<span id="TimeSpan"></span> <script type="text/javascript ...

  9. 非抢占式RCU实现(二),解释:为什么 RCU_NEXT_SIZE 宏值是4?

    参考:2.6.34 一个很奇怪的问题. 没有查找到为什么 RCU_NEXT_SIZE的值为4的原因(包括Documentation),主要是在rcu_state中定义了一个四级的list,感到很有意思 ...

  10. 《HTTP权威指南》学习笔记——HTTP概述

    1.HTTP--因特网的多媒体信使 HTTP使用的是可靠的数据传输协议,能确保数据在传输过程中不会损坏或混乱. 2.Web客户端和服务器 Web服务器(HTTP服务器)根据客户端的请求返回服务端的数据 ...