sdnu1051.水题2
来源:互联网 发布:啊哈算法电子版下载 编辑:程序博客网 时间:2024/06/09 18:47
1051.水题2
Time Limit: 1000 MS Memory Limit: 32768 KB
Total Submission(s): 328 Accepted Submission(s): 107
Description
李观给鲁观写了份只有他能看懂的情书
但是木有关系,万能的鲁观已经发现了破解的方法
现在你要把这个方法自动化,这就是你的任务嗯
但是问题是,情书的内容只有一句话:n 55!w ! pue n a^o7 ! n paau !
Input
一行情书内容
Output
翻译后的结果
Sample Input
n 55!w ! pue n a^o7 ! n paau !
Sample Output
i need u i love u and i miss u
Source
WZ
#include<cstdio>#include<algorithm>#include<iostream>#include<cmath>#include<iomanip>#include<cstring>using namespace std;int main(){ int i,len; char s1[100]={0},s2[100]={0}; gets(s1); len = strlen(s1); for(i=0; i<len; i++){ switch(s1[i]){ case '!': s1[i]='i'; break; case 'u': s1[i]='n'; break; case 'a': s1[i]='e'; break; case 'p': s1[i]='d'; break; case '7': s1[i]='l'; break; case '^': s1[i]='v'; break; case '5': s1[i]='s'; break; case 'w': s1[i]='m'; break; case 'n': s1[i]='u'; break; case 'e': s1[i]='a'; break; case 'o': s1[i]='o'; break; case ' ': s1[i]=' '; break; } } for(i=0; i<len; i++){ s2[i] = s1[len-1-i]; } puts(s2); return 0;}
注意这里要倒序输入。。。为了这个简单的倒序,错了无数遍。。。 所以说百度很重要。。百度百度百度。。。
阅读全文
0 0
- sdnu1051.水题2
- 水题2
- 救基友记2-水题
- Reconnaissance 2(水题)
- 水题:HDU1716-排列2
- hdu 3062 2-sat 水题
- 水题 第三站 排列2
- hdu 1211 2种解法 求逆元 水题
- 【POJ3628】Bookshelf 2 01背包,水题
- HDU2095 find your present (2)【水题】
- CF#317DIV.2,ProblemA,水题
- CF#317Div.2,ProblemB,水题
- 2095 find your present (2)【水题】
- hdu 1716 排列2(水题)
- 水题-Codeforces Round #369 Div.2-B
- 小天使改名(水题 杭电排位赛-2)
- 水题
- 水题
- bzoj 3043 数列操作(差分)
- 区块链开发应用多重签名技术实践数字货币如何实现
- nginx源码阅读(九).事件及连接的定义、连接池
- 学习心得
- 2017.11.6
- sdnu1051.水题2
- 青鸟学习心得
- 记录下一些网址
- 实例讲解RTMPDUMP的使用
- Android中build target,minSdkVersion,targetSdkVersion,maxSdkVersion概念区分
- VFL:Visual format language
- 驽马的改变
- 文章标题
- 十分钟入门RocketMQ