diff --git a/P14357.cpp b/P14357.cpp new file mode 100644 index 0000000..442a127 --- /dev/null +++ b/P14357.cpp @@ -0,0 +1,28 @@ +#include +using namespace std; +int a[1000005]; +bool m(int a, int b) +{ + return a > b; +} +int main() +{ + string s; + cin >> s; + int cnt = 0; + for (int i = 0; i < s.length(); i++) + { + if ('0' <= s[i] && s[i] <= '9') + { + cnt++; + a[cnt] = s[i] - '0'; + } + } + sort(a + 1, a + cnt + 1, m); + for (int i = 1; i <= cnt; i++) + { + cout << a[i]; + } + cout << endl; + return 0; +} \ No newline at end of file