#include <iostream> #include <string.h> using namespace std; int main(){ char s[1001]; while(gets(s)!=NULL){ int len = (int)strlen(s); for(int j=0;j<len;j++){ if(s[j]=='o'&&s[j+1]=='c'&&s[j+2]=='c'&&s[j+3]=='u'&&s[j+4]=='p'&&s[j+5]=='a'&&s[j+6]=='t'&&s[j+7]=='i'&&s[j+8]=='o'&&s[j+9]=='n'){ printf("OH-OH-OH-QQ-PEI-PEI-SHION"); j+=9; } else printf("%c",s[j]); } printf("\n"); } return 0; } |
Double click to view unformatted code.