提交时间:2024-08-14 17:52:12
运行 ID: 50214
#include<bits/stdc++.h> using namespace std; int main() { int l; char s[34]; cin>>s; l=strlen(s); if(l>2){ if(strcmp(&s[l-2],"er")==0||strcmp(&s[l-2],"ly")==0){ s[l-2]='\0'; } } if(l>3){ if(strcmp(&s[l-3],"ing")==0){ s[l-3]='\0'; } } cout<<s; return 0; }