请各位帮忙看一下为什么一道水题Wrong answer了10086次

jjj0 three bodys 2023-05-02 11:08:04 1

#include<bits/stdc++.h> using namespace std;

string a;

int main(){

int k;

getline(cin,a);

cout<<a<<endl;

k = a.size();

for (int i = 0;i < k;i++){

	if (a[i] != '0' and a[i] != '1' and a[i] != '2' and a[i] != '3' and a[i] != '4' and a[i] != '5' and a[i] != '6' and a[i] != '7' and a[i] != '8' and a[i] != '9'){

		cout<<a[i];

	}


}

return 0;

}

{{ vote && vote.total.up }}

共 1 条回复

jjj0 three bodys

题目是这个:

#196. 删除数字字符