#include <iostream> #include <string> #include <algorithm> #include <cstdio> using namespace std; string str; char temp; string bubblesort(string str) { for (int i = 0; i < str.length() - 1; i++) { for (int j = 0; j < str.length() - i - 1; j++) { if (str[j] > str[j + 1]) { temp = str[j]; str[j] = str[j + 1]; str[j + 1] = temp; } } } return str; } int main() { //冒泡排序? cin >> str; cout << bubblesort(str) << endl; return 0; } // 64 位输出请用 printf("%lld")