프로그래머스 12933 정수 내림차순으로 배치하기

1 개요[ | ]

프로그래머스 12933 정수 내림차순으로 배치하기

2 C++[ | ]

#include <string>
#include <vector>
#include <algorithm>
using namespace std;

long long solution(long long n) {
    string s = to_string(n);
    sort(s.begin(), s.end(), greater());
    return stoll(s);
}
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}