| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 152335 | 陈骏睿 | 删除单词后缀 | C++ | Wrong Answer | 1 MS | 272 KB | 613 | 2026-04-25 12:26:17 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ string s; int c=0,i; cin>>s; int l=s.size(); if(s[l-1]=='r'&&s[l-2]=='e'){ s.erase(l-2,2); cout<<s; } if(s[l-1]=='y'&&s[l-2]=='l'){ s.erase(l-2,2); cout<<s; } if(s[l-1]=='g'&&s[l-2]=='n'&&s[l-3]=='i'){ s.erase(l-3,3); cout<<s; } return 0; }
------Input------
Hi
------Answer-----
Hi
------Your output-----