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 ...
随机推荐
- 对C语言中指针的入门理解
通过一个例子引出对指针的概念理解 1,例子 #include<stdio.h> int main(void) { ; //小张的身高 ; //小李的身高 ; //小王的身高 int *xi ...
- 关于session_cache_expire 的理解
session_cache_limiter,它是session在客户端的缓存方式,有nocache,private,private_no_expire,publice主这几种. cache是属于浏览器 ...
- jquery选择器玩得不6啊,只能慢慢写判断了,唉..........................
jquery选择器玩得不6啊,只能慢慢写判断了,唉..........................
- python numpy 下载地址
网上找了半天,终于把要安装的资料找到了.其他的不怎么全,就自己再次总结一下写. 我自己安装的是python 2.7.所以以下的东东都是针对2.7的软件. numpy :http://s ...
- spark not contain
参考网址 http://stackoverflow.com/questions/33608526/is-there-a-way-to-filter-a-field-not-containing-som ...
- ASP.net在网页上显示当前时间,利用AJAX不刷新网页
前台页面代码: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default. ...
- 主调度器schedule
中断处理完毕后,系统有三种执行流向: 1)直 ...
- CorelDRAW中如何分布对象
分布对象功能主要用来控制选择对象之间的距离,可以满足用户对均匀间距的要求,通常用于选择三个或三个以上的物体,将他们之间的距离平均分布.本教程将详解CorelDRAW中关于分布对象的操作. CorelD ...
- Pair programming
Pair programming is an agile software development technique in which two programmers work together a ...
- vim在系统剪切板的复制与粘贴
https://blog.csdn.net/zhangxiao93/article/details/53677764