| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 135702 | 田子熙 | 删除单词后缀 | C++ | Wrong Answer | 1 MS | 268 KB | 308 | 2025-11-08 11:39:38 |
#include<bits/stdc++.h> using namespace std; int a[125]; int main(){ string s; cin>>s; int b=s.length(); if(b-2=='e' && b-1=='r'){ s.erase(b-2,2); }else if(b-2=='l' && b-1=='y'){ s.erase(b-2,2); }else if(b-3=='i' && b-2=='n' && b-1=='g'){ s.erase(b-3,2); } cout<<s; return 0; }
------Input------
lying
------Answer-----
ly
------Your output-----
lying