[20260207] BOJ / P5 / IQ Test / 한종욱 #1899
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.
🧷 문제 링크
https://www.acmicpc.net/problem/18665
🧭 풀이 시간
70분
👀 체감 난이도
✏️ 문제 설명
초기 집합에 0, 1, 2가 있다. 집합 내의 수로$x^{2}-y$ 연산을 통해 집합에 수를 추가할 수 있다. n을 43번 이내로 만들려고 한다. 그 과정을 출력하라.
🔍 풀이 방법
n을 기준으로 n보다 큰$x^{2}$ 의 x의 최솟값을 찾고, 거기에 대한 y값도 찾는다. 그리고 재귀함수를 진행한다.
⏳ 회고
되게 간단한 문제였는데, 정말 잘못 생각했다. 어려운 재귀를 아직 못 푸는 것 같아서 더 연습해야겠다.