Skip to content

초급반 / 김세현 / 돌게임-9655, 합분해-2225, 선수과목-14567 #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

sehxxnee
Copy link
Contributor

선수과목 진행 중

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

상길이(SK)는 n이 홀수 일 때 이길 수 있고, 짝수 일 때는 방법이 없이 창영이(CY)가 이기기 때문에 해당 코드를 작성하신 것 같습니다.
이렇게 코드를 작성하게 한 의도를 주석과 함께 적어주셨다면 더 좋았을 것 같습니다!

이에 코드리뷰를 통해 세현님께서 생각하셨을 코드 작성 의도를 남기겠습니다.

/*
게임을 상근이가 먼저 시작하고, 돌은 1개 혹은 3개만 가져갈 수 있으므로 상대방(창영)의 선택지는 n-1 혹은 n-3이 되어, 다시 상근이가 가져갈 수 있는 다음 경우의 수는 n-2, n-4, n-6 총 3가지가 되는 등
결국엔 상길이(SK)는 n이 홀수일 때 이길 수 있고, 짝수 일 때는 방법이 없이 창영이(CY)가 이기게 됩니다.
*/
이 내용을 주석과 함께 남겨주시면 좋았을 것 같습니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants