字符移动 题解:
#include<bits/stdc++.h>
using namespace std;
int main()
{
string str, num, ot;
cin >> str;
for(int i = 0; i < str.size(); i ++)
{
if(str[i] >= '0' && str[i] <= '9')
num += str[i];
else
ot += str[i];
}
str = ot + num;
cout << str;
return 0;
}
登录后发布评论
暂无评论,来抢沙发