Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
100151 | Kevin | 删除单词后缀 | C++ | Accepted | 1 MS | 268 KB | 256 | 2024-12-05 15:17:18 |
#include<bits/stdc++.h> using namespace std; int i,l; char s[32]; int main(){ scanf("%s",s); l=strlen(s); if(strcmp(&s[l-3],"ing")==0) s[l-3]='\0'; if((strcmp(&s[l-2],"er")==0)||(strcmp(&s[l-2],"ly")==0)) s[l-2]='\0'; puts(s); return 0; }