[백준] 1038번 감소하는 수 파이썬(Python) 풀이
Cat_Code:
1038번: 감소하는 수 음이 아닌 정수 X의 자릿수가 가장 큰 자릿수부터 작은 자릿수까지 감소한다면, 그 수를 감소하는 수라고 한다. 예를 들어, 321과 950은 감소하는 수지만, 322와 958은 아니다. N번째 감소하는 수를 www.acmicpc.net [문제] [코드] from itertools import combinations N = int(input()) result = [] for i in range(1, 11): for temp in combinations(range(0, 10), i): temp = list(temp) temp.sort(reverse=True) result.append(int("".join(map(str, temp)))) result.sort() try: print(r..