n a^o7 !

来源:互联网 发布:被淘宝投诉知识产权 编辑:程序博客网 时间:2024/05/01 12:50

遇到了非常华丽的一个题面,吓得我一脸懵逼不知从何入手。上网搜了一下题解,发现简直了。

题目链接

#include <stdio.h>#include <stdlib.h>#include <string.h>int main(){    int n,i,k;    char st[100];    scanf("%d%*c",&n);    for(k=1;k<=n;k++)    {        //getchar();        gets(st);        int len=strlen(st);        i=len-1;        printf("Case %d: ",k);        while(i>=0)        {            if(st[i]=='n')                printf("u");            else if (st[i]=='5')                printf("s");            else if (st[i]=='!')                printf("i");            else if (st[i]=='w')                printf("m");            else if (st[i]=='p')                printf("d");            else if (st[i]=='e')                printf("a");            else if (st[i]=='^')                printf("v");            else if (st[i]=='o')                printf("o");            else if (st[i]=='7')                printf("l");            else if (st[i]=='u')                printf("n");            else if (st[i]=='a')                printf("e");            else if (st[i]==' ')                printf(" ");            i--;        }        printf("\n");    }    return 0;}


0 0