Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
144375 万骏博 删除数字字符 C++ Wrong Answer 0 MS 272 KB 242 2026-01-21 21:02:17

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=1;j<i;j++){ if(c[j]>='0'&&c[j]<='9'){ c=c.erase(j,1); cout<<c; } } cout<<c; return 0; }


Run Info:

------Input------
vvvv23kjhg4lllk89766gff
------Answer-----
vvvvkjhglllkgff
------Your output-----
vvvv3kjhg4lllk89766gffvvvv3kjhglllk89766gffvvvv3kjhglllk9766gffvvvv3kjhglllk966gffvvvv3kjhglllk96gffvvvv3kjhglllk96gff