| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 38156 | jiabokai | 验证子串 | C++ | Wrong Answer | 0 MS | 244 KB | 348 | 2024-01-25 14:57:26 |
#include<iostream> #include<cstdio> #include<cstring> using namespace std; int i,l; char s[34]; int main() { 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; }