标签:
Time Limit: 1000MS | Memory Limit: 65536K | |
Total Submissions: 10871 | Accepted: 5100 |
Description
Input
Output
Sample Input
you are what you do
Sample Output
we are what we do
1 #include <stdio.h> 2 #include <string.h> 3 char str[1003]; 4 5 int main(){ 6 int i; 7 while(gets(str)){ 8 for(i = 0; str[i] != ‘\0‘; i++){ 9 if(str[i] == ‘y‘ && str[i+1] == ‘o‘ && str[i+2] == ‘u‘){ 10 printf("we"); 11 i += 2; 12 } else { 13 printf("%c", str[i]); 14 } 15 } 16 printf("\0"); 17 printf("\n"); 18 } 19 return 0; 20 }
标签:
原文地址:http://www.cnblogs.com/qinduanyinghua/p/5796993.html