文章
3
粉丝
0
获赞
1
访问
48
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
string str;
//用两个向量分别来接收数字和非数字
vector<char> a,b;
cin>>str;
for(auto x:str){
if(isdigit(x)) a.push_back(x);
else b.push_back(x);
}
//再将两个向量拼接在一起
b.insert(b.end(),a.begin(),a.end());
for(auto x:b){
cout<<x;
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发