Open
Conversation
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.
이 문제는 먼저 각 칸이 비어있는 4 X N - 3 의 길이를 가진 2차원 배열을 만들어주고, 간격에 따라 겉 면에 별을 찍어주는 형태로 접근하였습니다.
대표적인 재귀 문제 유형으로 return 값에 계속해서 재귀를 통해 접근해주어야 할 범위를 설정해주는 방식입니다.
아마 대부분이 비슷하게 푸셨을 것 같습니다.
이 두 가지가 관건이었습니다. 그 후에는 별을 찍어보며 출력 예시와 비교해 틀린 것이 없는지 꼼꼼히 확인하는 것이 좋습니다.
for i in arr:
print(*i)
로 출력했다가 틀리게 나와서 수 분간 곤욕을 치뤘습니다.