zoukankan      html  css  js  c++  java
  • 【模拟】n a^o7 !

    n a^o7 !

     

    Time Limit: 1000MS Memory limit: 65536K

    题目描述

     

    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<stdio.h>
    #include<string.h>
    #include<stdlib.h>
    
    int main()
    {
        char s[1000];
        int t, k=1;
        scanf("%d", &t);
        getchar();
        while(t--)
        {
            gets(s);
    
            for(int i=0; i<strlen(s); i++)
            {
                switch(s[i])
                {
                    case 'n': {s[i] = 'u'; break;}
                    case 'u': {s[i] = 'n'; break;}
                    case '5': {s[i] = 's'; break;}
                    case '!': {s[i] = 'i'; break;}
                    case 'w': {s[i] = 'm'; break;}
                    case 'p': {s[i] = 'd'; break;}
                    case 'e': {s[i] = 'a'; break;}
                    case 'a': {s[i] = 'e'; break;}
                    case '^': {s[i] = 'v'; break;}
                    case 'o': {s[i] = 'o'; break;}
                    case '7': {s[i] = 'l'; break;}
                }
            }
            printf("Case %d: ", k++);
            for(int i=strlen(s)-1; i>=0; i--)
            {
                if(i==0)
                    printf("%c
    ", s[i]);
                else
                    printf("%c", s[i]);
            }
    
        }
        return 0;
    }
  • 相关阅读:
    DeepLearning.ai学习笔记(二)改善深层神经网络:超参数调试、正则化以及优化--Week2优化算法
    DeepLearning.ai学习笔记(二)改善深层神经网络:超参数调试、正则化以及优化--Week1深度学习的实用层面
    通俗理解决策树中的熵&条件熵&信息增益
    KNN实现手写数字识别
    softmax分类算法原理(用python实现)
    DeepLearning.ai学习笔记(一)神经网络和深度学习--Week4深层神经网络
    博客园自定义皮肤扁平化设计
    神经网络权重初始化问题
    OpenVirteX 安装
    从个人的角度谈谈本次GNTC大会的收获
  • 原文地址:https://www.cnblogs.com/6bing/p/4121821.html
Copyright © 2011-2022 走看看