Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
144351 万骏博 删除数字字符 C++ Wrong Answer 1 MS 276 KB 613 2026-01-21 19:48:13

Tests(0/10):


Code:

#include <bits/stdc++.h> using namespace std; string s,c; int i; int main(){ getline(cin,c); i=c.size(); for(int j=0;j<i;j++){ if(c[j]=='0'||c[j]=='9'||c[j]=='1'||c[j]=='8'||c[j]=='2'||c[j]=='7'||c[j]=='3'||c[j]=='6'||c[j]=='4'||c[j]=='5'){ c=c.erase(j,1); } if(c[j]=='0'||c[j]=='9'||c[j]=='1'||c[j]=='8'||c[j]=='2'||c[j]=='7'||c[j]=='3'||c[j]=='6'||c[j]=='4'||c[j]=='5'){ c=c.erase(j,1); } if(c[j]=='0'||c[j]=='9'||c[j]=='1'||c[j]=='8'||c[j]=='2'||c[j]=='7'||c[j]=='3'||c[j]=='6'||c[j]=='4'||c[j]=='5'){ c=c.erase(j,1); } } cout<<c; return 0; }


Run Info:

------Input------
vvvv23kjhg4lllk89766gff
------Answer-----
vvvvkjhglllkgff
------Your output-----
vvvvkjhglllk6gff