我希望你是我独家记忆

一段永远封存的记忆,随风而去
posts - 263, comments - 31, trackbacks - 0, articles - 3
   :: 首页 :: 新随笔 ::  :: 聚合  :: 管理

HLOJ_1146

Posted on 2009-07-02 15:14 Hero 阅读(115) 评论(0)  编辑 收藏 引用 所属分类: 代码如诗--ACM
 1 //HLOJ 1146  Accepted  0 196 623 C++  
 2 
 3 #include <iostream>
 4 using namespace std ;
 5 
 6 char str[330] ;
 7 
 8 int main()
 9 {
10     while( gets( str ) )    
11     {
12         if( strcmp( str, "END" ) == 0 ) break ;
13 
14         int len = strlen( str ) ;
15         forint i=0; i<len; i++ )
16         {
17             if( str[i]=='A'||str[i]=='W'||str[i]=='F' ) str[i] = 'I' ;
18             else if( str[i]=='C' ) str[i] = 'L' ;
19             else if( str[i]=='M' ) str[i] = 'o' ;
20             else if( str[i]=='S' ) str[i] = 'v' ;
21             else if( str[i]=='D'||'P'==str[i]||'G'==str[i]||'B'==str[i] ) str[i] = 'e' ;
22             else if'L'==str[i] ) str[i] = 'Y' ;
23             else if'X'==str[i] ) str[i] = 'u' ;
24         }
25 
26         printf( "%s\n", str ) ;
27     }
28     return 0 ;
29 }

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理