码迷,mamicode.com
首页 > 其他好文 > 详细

n a^o7 !

时间:2014-12-11 20:59:08      阅读:260      评论:0      收藏:0      [点我收藏+]

标签:style   http   io   ar   color   os   sp   for   on   

                                                                           n a^o7 !

题目描述

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)

示例输入

2
n 55!w ! pue n a^o7 ! n paau !
n5!wpuea^o7

示例输出

Case 1: i need u i love u and i miss u
Case 2: loveandmisu

#include <iostream>
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
#include<malloc.h>
#include<stack>
using namespace std;
int main()
{
    int n,i,j;
    char str[110];
    scanf("%d%*c",&n);
    int m=1;
    while(n--)
    {
        gets(str);
        printf("Case %d: ",m);
        for(i=strlen(str)-1;i>=0;i--)
        {
            if(str[i]=='n')
                cout<<"u";
            else if(str[i]=='5')
                cout<<"s";
            else if(str[i]=='!')
                cout<<"i";
            else if(str[i]=='w')
                cout<<"m";
            else if(str[i]=='p')
                cout<<"d";
            else if(str[i]=='u')
                cout<<"n";
            else if(str[i]=='e')
                cout<<"a";
            else if(str[i]=='a')
                cout<<"e";
            else if(str[i]=='^')
                cout<<"v";
            else if(str[i]=='o')
                cout<<"o";
            else if(str[i]=='7')
                cout<<"l";
            else if(str[i]==' ')
                cout<<" ";
        }
        m++;
        cout<<endl;
    }
}

















n a^o7 !

标签:style   http   io   ar   color   os   sp   for   on   

原文地址:http://blog.csdn.net/lucky_vikey/article/details/41870397

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!