标签:des style class blog c code
Time Limit: 2000/1000 MS
(Java/Others) Memory Limit: 32768/32768 K
(Java/Others)
Total Submission(s): 1680 Accepted
Submission(s): 1215
1 #include<stdio.h> 2 #include<string.h> 3 #include<stdlib.h> 4 #define maxn 101 5 char str[maxn]; 6 int main() 7 { 8 while(gets(str)!=NULL&&str[0]!=‘#‘) 9 { 10 for(int i=0;i<strlen(str);i++) 11 { 12 if(str[i]==‘ ‘) printf("%%20"); 13 else if(str[i]==‘$‘)printf("%%24"); 14 else if(str[i]==‘!‘)printf("%%21"); 15 else if(str[i]==‘%‘)printf("%%25"); 16 else if(str[i]==‘(‘)printf("%%28"); 17 else if(str[i]==‘)‘)printf("%%29"); 18 else if(str[i]==‘*‘)printf("%%2a"); 19 else printf("%c",str[i]); 20 } 21 putchar(10); 22 } 23 return 0; 24 }
HDUOJ-------2719The Seven Percent Solution,布布扣,bubuko.com
HDUOJ-------2719The Seven Percent Solution
标签:des style class blog c code
原文地址:http://www.cnblogs.com/gongxijun/p/3737990.html