博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
A.Little Sub and Applese
阅读量:4631 次
发布时间:2019-06-09

本文共 1149 字,大约阅读时间需要 3 分钟。

Description

’Why are you always repeating what I say?’ says Applese, a friend of Little Sub.

’Because it is the most important quality of mankind.’ says Little Sub.
Now it is your turn to repeat what Applese says.
Generally, each sentence Applese says will only contains ’A’..’Z’, ’a’..’z’, ’0’..’9’, space, ’!’ and ’.’.
Each sentence will definitely end with either ’!’ or ’.’. If it ends with ’.’, change it to ’!’ instead.
Applese has just passed his 17th birthday, we wish him and his friends very good luck in the future study and programming competitions.

Input

There are multiple cases, please read until the end of file.

Each case will only contain one sentence in one line, indicating what Applese says. The total length of all sentences will not exceed 1000000.

Output

Output the answer in one line for each case.

Author

YE, Zicheng

题解:给你一个带空格的字符串,如果结尾是".",改成"!"后输出.
超级水题.
#include 
#include
const int N=1e6+5;using namespace std;char s[N];int main(){ while(cin.getline(s,N-3)){ int len=strlen(s); if(s[len-1]=='.') s[len-1]='!'; cout<
<

转载于:https://www.cnblogs.com/-yjun/p/10549878.html

你可能感兴趣的文章
第四章 读书笔记
查看>>
我不为人人,人人不为我
查看>>
iOS网络编程(三) 异步加载及缓存图片---->SDWebImage
查看>>
Qt qml 模拟iphone slide to unlock 的聚光动画文字效果
查看>>
spoj104 highways 生成树计数(矩阵树定理)
查看>>
nginx配置多个域名
查看>>
ARM寻址方式
查看>>
pandas之时间序列
查看>>
补肾的十大食物是什么?
查看>>
iPhone开发之 - 苹果推送通知服务(APNs)编程
查看>>
ASP常用读取数据2个调用方式
查看>>
【大话UWB定位】之蓝牙定位的烦恼
查看>>
算法3-高级排序
查看>>
每天一个linux命令(17):whereis 命令
查看>>
Angular4+路由
查看>>
Codeforces-234C Weather
查看>>
面向对象编程思想及其相关内容
查看>>
Leetcode解题笔记-3sum
查看>>
Android 3.0 Hardware Acceleration
查看>>
【2011 Greater New York Regional 】Problem G: Rancher's Gift
查看>>