#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<queue>
using namespace std;
//12bcA+B- 12
int main()
{
string s;
//cin >> s;
getline(cin, s);
queue<char>ss1;
queue<char>ss2;
queue<char>ss3;
queue<char>ss4;
int len = s.size();
for (int i = 0; i < len; i++)
{
if (s[i] >= 'A' && s[i] <= 'F')
ss1.push(s[i]);
else if (s[i] >= 'a' && s[i] <= 'f')
{
ss2.push(s[i]);
}
else if (s[i] >= '0' && s[i] <= '9')
{
ss3.push(s[i]);
}
else
ss4.push(s[i]);
}
while(ss1.size())
{
cout << ss1.front();
ss1.pop();
}
while (ss2.size())
{
cout << ss2.front();
ss2.pop();
}
while (ss3.size())
{
cout << ss3.front();
ss3.pop();
}
while (ss4.size())
{
cout << ss4.front();
ss4.pop();
}
system("pause");
return 0;
}
题目不难,想不到为啥通过只有40%
#汇顶科技##笔试题目#