string도 sort 사용가능하다는 것!
string str = to_string(n); sort(str.begin(), str.end(), greater<char>()); answer = stoll(str);