초급반 / 김세현 / 돌게임-9655, 합분해-2225, 선수과목-14567#33
Open
sehxxnee wants to merge 4 commits intoAlom-codingTest:mainfrom
Open
초급반 / 김세현 / 돌게임-9655, 합분해-2225, 선수과목-14567#33sehxxnee wants to merge 4 commits intoAlom-codingTest:mainfrom
sehxxnee wants to merge 4 commits intoAlom-codingTest:mainfrom
Conversation
hwangjaehee
reviewed
Mar 26, 2025
Contributor
There was a problem hiding this comment.
상길이(SK)는 n이 홀수 일 때 이길 수 있고, 짝수 일 때는 방법이 없이 창영이(CY)가 이기기 때문에 해당 코드를 작성하신 것 같습니다.
이렇게 코드를 작성하게 한 의도를 주석과 함께 적어주셨다면 더 좋았을 것 같습니다!
이에 코드리뷰를 통해 세현님께서 생각하셨을 코드 작성 의도를 남기겠습니다.
/*
게임을 상근이가 먼저 시작하고, 돌은 1개 혹은 3개만 가져갈 수 있으므로 상대방(창영)의 선택지는 n-1 혹은 n-3이 되어, 다시 상근이가 가져갈 수 있는 다음 경우의 수는 n-2, n-4, n-6 총 3가지가 되는 등
결국엔 상길이(SK)는 n이 홀수일 때 이길 수 있고, 짝수 일 때는 방법이 없이 창영이(CY)가 이기게 됩니다.
*/
이 내용을 주석과 함께 남겨주시면 좋았을 것 같습니다!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
선수과목 진행 중