ZJU 2932
#include <cstdio> #include <cstring> int main() { char s[1000]; while(gets(s)) { int len = strlen(s); if(s[0] =='#' && len == 1) break; for(int i = 0; i < len; i++) { if(s[i]==' ') PRintf("%%20"); else if(s[i] == '!') printf("%%21"); else if(s[i] == '$') printf("%%24"); else if(s[i] == '%') printf("%%25"); else if(s[i] == '(') printf("%%28"); else if(s[i] == ')') printf("%%29"); else if(s[i] == '*') printf("%%2a"); else printf("%c",s[i]); } printf("/n"); } return 0; }新闻热点
疑难解答