[20251020] BOJ / G5 / 감소하는 수 / 김민진 #1178
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🧷 문제 링크
감소하는 수
🧭 풀이 시간
30분
👀 체감 난이도
✏️ 문제 설명
가장 큰 자릿수부터 가장 작은 자릿수까지 해당 자릿수의 숫자가 점점 작아지는 수이면 감소하는 수
N번째 감소하는 수 구하기🔍 풀이 방법
0부터num % 10값을 확인하면서num * 10 + i하기..마지막에 감소하는 수가 들어있는 리스트를 정렬해서
N번째 수 출력하기0부터 9까지의 숫자로 만들 수 있는 경우의 수는
2^10 = 1024인데 공집합 포함이니까 숫자는 1023개→
N ≥ 1023이면-1⏳ 회고
브루트포스가 싫다