https://www.acmicpc.net/problem/1427
1427번: 소트인사이드
첫째 줄에 정렬하려고 하는 수 N이 주어진다. N은 1,000,000,000보다 작거나 같은 자연수이다.
www.acmicpc.net
https://github.com/stellaluminary/Baekjoon
GitHub - stellaluminary/Baekjoon
Contribute to stellaluminary/Baekjoon development by creating an account on GitHub.
github.com
숫자를 자릿수별 list로 받아 역순으로 정렬하고 합쳐서 출력한다.
import sys
input = sys.stdin.readline
n = list(input().rstrip())
n.sort(reverse=True)
print(''.join(n))