Skip to content

Conversation

@suyeun84
Copy link
Contributor

🧷 문제 링크

https://school.programmers.co.kr/learn/courses/30/lessons/388352

🧭 풀이 시간

30분

👀 체감 난이도

✏️ 문제 설명

1부터 n까지의 서로 다른 정수 5개가 오름차순으로 정렬된 비밀 코드를 가지고 있고, 이 비밀 코드를 맞혀야 함
m번의 시도마다 서로 다른 5개의 정수를 입력하면, 그 중 몇 개가 비밀 코드에 포함되어 있는지 알려줄 때,
비밀 코드로 가능한 정수 조합의 개수 구하기

🔍 풀이 방법

단순 dfs
dfs로 가능한 경우들을 list에 저장해두고, size가 5가 되면
check함수를 통해서 m번의 시도에 부합하는 숫자 조합인지 확인함

⏳ 회고

뭔가 복잡하게 생각했는데 단순했음

@suyeun84 suyeun84 self-assigned this Sep 12, 2025
@suyeun84 suyeun84 added the success 👍 해설을 보지 않고 풀었을 때 label Sep 12, 2025
@suyeun84 suyeun84 merged commit 2b15845 into main Sep 12, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

success 👍 해설을 보지 않고 풀었을 때

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants