HDU 4730 We Love MOE Girls (2013成都网络赛,签到水题)
We Love MOE Girls
Time Limit: 1000/500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 208 Accepted Submission(s): 157
In this world, Nanako has a special habit. When talking with others, she always ends each sentence with "nanodesu".
There are two situations:
If a sentence ends with "desu", she changes "desu" into "nanodesu", e.g. for "iloveyoudesu", she will say "iloveyounanodesu". Otherwise, she just add "nanodesu" to the end of the original sentence.
Given an original sentence, what will it sound like aften spoken by Nanako?
For each test case, the only line contains a string s, which is the original sentence.
The length of sentence s will not exceed 100, and the sentence contains lowercase letters from a to z only.
ohayougozaimasu
daijyoubudesu
Case #2: daijyoubunanodesu
太水了
/* ***********************************************
Author :kuangbin
Created Time :2013-9-15 0:04:49
File Name :G:\2013ACM练习\2013网络赛\2013成都网络赛\1003.cpp
************************************************ */ #pragma comment(linker, "/STACK:1024000000,1024000000")
#include <stdio.h>
#include <string.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <string>
#include <math.h>
#include <stdlib.h>
#include <time.h>
using namespace std;
#define REP(I, N) for (int I=0;I<int(N);++I)
#define FOR(I, A, B) for (int I=int(A);I<int(B);++I)
#define DWN(I, B, A) for (int I=int(B-1);I>=int(A);--I)
#define REP_1(I, N) for (int I=1;I<=int(N);++I)
#define FOR_1(I, A, B) for (int I=int(A);I<=int(B);++I)
#define DWN_1(I, B, A) for (int I=int(B);I>=int(A);--I)
#define REP_C(I, N) for (int N____=int(N),I=0;I<N____;++I)
#define FOR_C(I, A, B) for (int B____=int(B),I=A;I<B____;++I)
#define DWN_C(I, B, A) for (int A____=int(A),I=B-1;I>=A____;--I)
#define REP_1_C(I, N) for (int N____=int(N),I=1;I<=N____;++I)
#define FOR_1_C(I, A, B) for (int B____=int(B),I=A;I<=B____;++I)
#define DWN_1_C(I, B, A) for (int A____=int(A),I=B;I>=A____;--I)
#define DO(N) while(N--)
#define DO_C(N) int N____ = N; while(N____--)
#define TO(i, a, b) int s_=a<b?1:-1,b_=b+s_;for(int i=a;i!=b_;i+=s_)
#define TO_1(i, a, b) int s_=a<b?1:-1,b_=b;for(int i=a;i!=b_;i+=s_)
#define SQZ(I, J, A, B) for (int I=int(A),J=int(B)-1;I<J;++I,--J)
#define SQZ_1(I, J, A, B) for (int I=int(A),J=int(B);I<=J;++I,--J) int main()
{
//freopen("in.txt","r",stdin);
//freopen("out.txt","w",stdout);
int T;
scanf("%d",&T);
string str;
int iCase = ;
while(T--)
{
iCase++;
cin>>str;
int n = str.length();
if(n >= && str[n-] == 'd' && str[n-] == 'e' && str[n-] == 's' && str[n-] == 'u')
{
str[n-] = 'n';
str[n-] = 'a';
str[n-] = 'n';
str[n-] = 'o';
str += "desu";
}
else str += "nanodesu";
printf("Case #%d: ",iCase);
cout<<str<<endl;
}
return ;
}
HDU 4730 We Love MOE Girls (2013成都网络赛,签到水题)的更多相关文章
- HDU 4737 A Bit Fun (2013成都网络赛)
A Bit Fun Time Limit: 5000/2500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total S ...
- HDU 4734 F(x) (2013成都网络赛,数位DP)
F(x) Time Limit: 1000/500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submiss ...
- HDU 4733 G(x) (2013成都网络赛,递推)
G(x) Time Limit: 2000/500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submiss ...
- HDU 4731 Minimum palindrome (2013成都网络赛,找规律构造)
Minimum palindrome Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Other ...
- HDU 4764 Stone (2013长春网络赛,水博弈)
Stone Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submi ...
- HDU 4762 Cut the Cake (2013长春网络赛1004题,公式题)
Cut the Cake Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Tota ...
- HDU 4750 Count The Pairs (2013南京网络赛1003题,并查集)
Count The Pairs Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others ...
- HDU 4758 Walk Through Squares (2013南京网络赛1011题,AC自动机+DP)
Walk Through Squares Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Oth ...
- HDU 4738 Caocao's Bridges (2013杭州网络赛1001题,连通图,求桥)
Caocao's Bridges Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) ...
随机推荐
- javascript本地缓存方案-- 存储对象和设置过期时间
cz-storage 解决问题 1. 前端js使用localStorage的时候只能存字符串,不能存储对象 cz-storage 可以存储 object undefined number string ...
- 使用html+css+js实现倒计时,开启你痛苦的倒计时吧
使用html+css+js实现倒计时,开启你痛苦的倒计时吧 效果图: 这是我痛苦的倒计时,呜呜呜 好啦,再痛苦还是要分享代码,代码如下,复制即可使用: <!DOCTYPE html> &l ...
- dede图集内容页调用
{dede:productimagelist} <li> <img src="[field:imgsrc/]" width="92" heig ...
- SQL SERVER 断开所有连接(转)
通过sql server management studio对数据进行管理,比如数据库改名等,经常遇到有正在运行的连接,以致无法操作,这时候断掉所有的连接很有必要.代码如下:(会断掉某个库的所有连接, ...
- LanguageTag
LanguageTag */--> div.org-src-container { font-size: 85%; font-family: monospace; } pre.src { bac ...
- vector 测试
vector 测试 */--> div.org-src-container { font-size: 85%; font-family: monospace; } pre.src { backg ...
- git/github 生成密钥
当从本地提交文件到github的时候,提交不成功,报错,可能问题就是你还没有生成ssh秘钥 github要使用ssh密钥的原因: git使用https协议,每次pull, push都要输入密码,相当的 ...
- mysql-noinstall.zip免安装版的优化配置和精简
1.准备工作 下载mysql的最新免安装版本mysql-noinstall-5.5.25a-win32.zip,解压缩到相关目录,如:d:\\ mysql-noinstall-5.1.53-win32 ...
- mac 用密钥远程登陆
window远程登陆命令:mstsc A为本地主机(即用于控制其他主机的机器) ;B为远程主机(即被控制的机器Server), 假如ip为192.168.60.110;A和B的系统都是Linux 在A ...
- CentOS 升级Python3.X和pip3
目的:实现python3 and python2 共存,pip2 and pip3共存 一.安装依赖 yum install openssl-devel -y yum install zlib-dev ...