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 ...
随机推荐
- python gpio
打算用python控制gpio,网上找的都是一些关于树莓派如何操作gpio的文档,只针对树莓派.所以就自己封装一下函数,方便以后使用.在linux上已经生成了和gpio相关的文件,只要对文件进行读取即 ...
- Unity导入3D模型的过程与方法
一.介绍 资源是游戏开发中的原材料,也就是组成游戏的模块. Unity只是一个游戏开发引擎,而并不是一个资源开发软件.这就意味着在游戏中需要的资源通常是由一些设计者使用其他软件开发出来的,然后设计者会 ...
- Spring JDBC调用存储函数
以下示例将演示spring jdbc如何调用存储函数.在这个示例中将通过调用存储函数来读取Student表中的一个可用记录信息.传递一个ID并获取学生的姓名. 语法: SimpleJdbcCall j ...
- autofac解析Mvc和Webapi的坑
我们在项目中很早就开始使用autofac,也以为知道与mvc和webapi集成的做法. var builder = new ContainerBuilder(); // Mvc Register bu ...
- jquery选择器玩得不6啊,只能慢慢写判断了,唉..........................
jquery选择器玩得不6啊,只能慢慢写判断了,唉..........................
- WizNote分享笔记至博客
右边的分享按钮 选中后出现如图所示 然后可以进行分享了
- sublime text3支持Vue语法高亮显示
1.下载文件链接: 或https://github.com/vuejs/vue-syntax-highlight 解开压缩包vue-syntax-highlight-master,其内所有文件备用. ...
- Python中MongoDB使用
MongoDB的层级为 database -->collection --> document 安装MongoDB,启动mongo服务 PyMongo模块是Python对MongoDB操作 ...
- mysql执行SQL语句时报错:[Err] 3 - Error writing file '/tmp/MYP0G1B8' (Errcode: 28 - No space left on device)
问题描述: 今天一同事在mysql中执行SQL语句的时候,报了/tmp空间不足的问题,报错如下: [SQL] SELECT f.prov as 字段1, MAX( CASE f.flag_name W ...
- go的精选类库
https://github.com/avelino/awesome-go https://gitee.com/snail/proxy