Given a string of no more than 1000 characters. You are supposed to sort the characters into a substring of all Z's followed by O's, J's, 7's, and the rest of the other characters.
Input
Each case gives a string described by the problem. The string given contains no space.
Output
For each test case, output the resulting string. Note the order of the characters other than Z, O, J and 7 must be kept after sorting.
Sample Input
t7ZJ7OhO7B7O7irZtOhZdayJ77
Sample Output
ZZZOOOOJJ7777777thBirthday
每到‘Z’ ‘O’ ‘J’ ‘7’时,计数并在最后输出
其余传入另一数组,并在最后输出
代码:
#include <iostream>
#include <string.h>
using namespace std;
int main()
{
int o,j,