include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
bool desc(int n1, int n2) {
return n1 > n2;
}
int main() {
string s;
vector<int> v;
cin >> s;
for (int i = 0; i < s.length(); i++) {
v.push_back(s[i]-'0');
}
sort(v.begin(), v.end(), desc);
for (int i = 0; i < v.size(); i++) {
cout << v[i];
}
}
'Algorithm ๐ง๐ปโ๐ป > ๋ฐฑ์ค(BOJ)' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[๋ฐฑ์ค,c++] 14391๋ฒ - ์ข ์ด ์กฐ๊ฐ (0) | 2021.11.07 |
---|---|
[๋ฐฑ์ค,c++] 1431๋ฒ - ์๋ฆฌ์ผ ๋ฒํธ (0) | 2021.11.07 |
[๋ฐฑ์ค,c++] 14284๋ฒ - ๊ฐ์ ์ด์ด๊ฐ๊ธฐ2 (0) | 2021.11.06 |
[๋ฐฑ์ค,c++] 14241๋ฒ - ์ฌ๋ผ์ ํฉ์น๊ธฐ (0) | 2021.11.06 |
[๋ฐฑ์ค,c++] 1406๋ฒ - ์๋ํฐ (0) | 2021.11.06 |
[๋ฐฑ์ค,c++] 13913๋ฒ - ์จ๋ฐ๊ผญ์ง4 (0) | 2021.11.06 |
๋๊ธ