codeforces水题100道 第二十一题 Codeforces Beta Round #65 (Div. 2) A. Way Too Long Words (strings)
题目链接: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)的更多相关文章
- codeforces水题100道 第十一题 Codeforces Round #143 (Div. 2) A. Team (brute force)
题目链接:http://www.codeforces.com/problemset/problem/231/A题意:问n道题目当中有多少道题目是至少两个人会的.C++代码: #include < ...
- codeforces水题100道 第二十七题 Codeforces Round #172 (Div. 2) A. Word Capitalization (strings)
题目链接:http://www.codeforces.com/problemset/problem/281/A题意:将一个英文字母的首字母变成大写,然后输出.C++代码: #include <c ...
- 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++代码: ...
- 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]区间的 ...
- Codeforces Beta Round #65 (Div. 2)
Codeforces Beta Round #65 (Div. 2) http://codeforces.com/contest/71 A #include<bits/stdc++.h> ...
- codeforces水题100道 第二十六题 Codeforces Beta Round #95 (Div. 2) A. cAPS lOCK (strings)
题目链接:http://www.codeforces.com/problemset/problem/131/A题意:字符串大小写转换.C++代码: #include <cstdio> #i ...
- codeforces水题100道 第二十五题 Codeforces Round #197 A. Helpful Maths (Div. 2) (strings)
题目链接:http://www.codeforces.com/problemset/problem/339/A题意:重新组合加法字符串,使得按照1,2,3的顺序进行排列.C++代码: #include ...
- 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 ...
- codeforces水题100道 第二十二题 Codeforces Beta Round #89 (Div. 2) A. String Task (strings)
题目链接:http://www.codeforces.com/problemset/problem/118/A题意:字符串转换……C++代码: #include <string> #inc ...
随机推荐
- SAP 金税接口代码 供参考
程序可以通过抓取 客户 开票信息等 下载文本 导出 需要事先创建好几个structure zc0000sdt0016, zc0000sdt0017 REPORT zc0000sdr0016 NO ST ...
- 【Android】解决Android横竖屏切换数据丢失问题的方法
解决方案1:在Androidmanifest.xml的activity标签中加入android:screenOrientation="portrait",可以屏蔽横屏 <ac ...
- 无法定位序数 12384 于动态链接库 mfc90.dll
场景: 运行 vs2008 编译生成的一个 exe 错误: 无法定位序数 12384 于动态链接库 mfc90.dll 原因: 缺少vc++ 2008 运行库. vcredist 全称Microsof ...
- CI框架 -- 核心文件 之 Exceptions.php
使用CI框架,我们通常使用一下三个函数处理错误: show_error('消息' [, int $status_code = 500 ] ) show_404('页面' [, 'log_error'] ...
- git 出错 bad index file sha1 signature
error: bad index file sha1 signature fatal: index file corrupt 解决方法:使用git命令执行: $ rm -f .git/index $ ...
- UART Receive FIFO and Receive Timeout
为什么UART要有FIFO? 现代的CPU运转速度越来越快.UART的波特率通常达不到10M,在没有FIFO的情况下.每次填充数据给UART 或者 从UART取数据都会占用CPU的时间.这是极大的浪费 ...
- jsTree 插件
html代码 <div id="jstree1"></div> js代码: <script src="__STATIC__/h5/js/jq ...
- 元素加了position:absolute则该元素的text-align:center居中失效的解决办法
position:absolute; top:50%; left:50%; -webkit-transform: translate(-50%,-50%); -moz-transform: trans ...
- Android 内存
memory usage of this progress under 15MB for 1GB RAM device Android内存机制分析下篇:分析APP内存使用情况http://mobile ...
- Bootstrap——导航居中
这是采用了栅格,设置缩进,使看起来居中,但是手机浏览会靠到最左边.另外center-block类好像也不管用. <div class="row"> <ul cla ...