SDUTACM n a^o7 !
来源:互联网 发布:淘宝付款不发货骗术 编辑:程序博客网 时间:2024/04/30 12:25
题目描述
All brave and intelligent fighters, next you will step into a distinctive battleground which is full of sweet and happiness. If you want to win the battle, you must do warm-up according to my instructions, which can make you in the best state preparing to fight. Now please relax yourself and enjoy the good moment. Before you raise your sharp sword to the enemy who guards the battleground, please allow me to tell you a true and romantic story about a samurai like you.
Samurai hh fell in love with girl ss, who is charming and demure. He realized the truth that he must spend his remaining life with ss, and resolved to pursue the hard-won affection. One day hh wrote a letter to ss, when she opens the letter with excitement her mind was in tangle. She found herself completely not to figure out the meaning about the letter, which said that "n 55!w ! pue n a^o7 ! n paau !". ss also immersed herself in guessing the meaning of that letter for a long time because of her adore to hh. Finally she called hh to ask the meaning of the letter. On the other side of the phone, hh was too nervous to say. Gradually he calmed down himself and told ss to reverse the letter and read it. Then on both ends of the phone comes the voice at the same time "i need u i love u and i miss u".
ss wants to tell each of you however you are Brave And Skilled, you shouldn't forget to express your loyal love and romantic feelings to your prince or princess.
Now the horn sounds for battle,do it by the following input and output. I think each of you will get an "Accepted" in this battle with pleasant mood.
输入
Input contains an integer T in the first line, and then T lines follow .Each line contains a message (only contain 'n5!wpuea^o7!' and
' '(space)), the message's length is no more than 100.
输出
Output the case number and the message. (As shown in the sample output)
示例输入
2n 55!w ! pue n a^o7 ! n paau !n5!wpuea^o7
示例输出
Case 1: i need u i love u and i miss uCase 2: loveandmisu
提示
这道题需要看出来规律,有的同学可能一眼就看出来了,这是把输入的字母倒过来了
#include<stdio.h>#include<stdlib.h>#include<string.h>void main(){ int n,i,j,l;char a[110];scanf("%d\n",&n);for(i=1;i<=n;i++){gets(a);l=strlen(a);printf("Case %d: ",i);for(j=l-1;j>=0;j--){if(a[j]=='!')printf("i");else if(a[j]==' ')printf(" ");else if(a[j]=='u')printf("n");else if(a[j]=='a')printf("e");else if(a[j]=='p')printf("d");else if(a[j]=='n')printf("u");else if(a[j]=='7')printf("l");else if(a[j]=='o')printf("o");else if(a[j]=='^')printf("v");else if(a[j]=='w') printf("m"); else if(a[j]=='5')printf("s");else if(a[j]=='e')printf("a");}printf("\n");}}
- SDUTACM n a^o7 !
- 省赛 n a^o7 !
- [ACM]n a^o7 !
- n a^o7 !
- n a^o7 !
- [2413]n a^o7 !
- n a^o7 !
- n a^o7 !
- n a^o7 !
- n a^o7 !
- n a^o7 !
- n a^o7 !
- n a^o7 !
- n a^o7 !
- n a^o7 !
- n a^o7 !
- n a^o7 !
- n a^o7 !(水题)
- Cocos ui控件Button 一个误导人的小错误
- ubuntu14.04安装cuda6.5简易版本,易操作
- 像素级实现设计稿笔记
- 《Motion Design for iOS》(四十三)
- 笔试题--“完数”(4)
- SDUTACM n a^o7 !
- Volley(2)源码分析
- photoshop启动提示:$$$/ADMDialog/ifontproblemWarning=解决办法
- 有12个苹果,1只香蕉,分给3个小孩,每个小孩都必须最少分到一个水果,求能分多少种?
- 利用MFC 对话框访问控件的七种方法
- 华为OJ——输入n个整数,输出其中最小的k个
- JavaScript基础
- 图结构练习——BFS——从起始点到目标点的最短步数
- sublime常用插件和常见问题