-
Notifications
You must be signed in to change notification settings - Fork 1
Conversation
- (r,c)가 4번 사각형일 때, return 3*half*half + go(n-1, r-half, c-half) | ||
|
||
""" | ||
def go(n, r, c): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Go가 뭔가 힘이나고 좋은 함수명인 것 같아서 웃고 갑니다 ㅎㅎ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
풀이가 유사하여 보기 편했습니다! 빠킹독 최고!!
2. base condition | ||
- n = 0일 때, return 0 | ||
|
||
3. 재귀식 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
재귀식이 저랑 같은 것 같아요!! 수민님과 같은 식이 유도된 것 같아 성장한 기분이 듭니다 ㅎㅎ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저는 재귀를 활용해서 푼 문제의 풀이를 설명할 때 어떻게 해야하나 항상 고민이 많았는데 역시 짬에서 나오는 간단 명료한 풀이 설명에 무릎을 탁! half
라는 변수 명이 와닿아서 n번 사각형에 대한 점화식이 단 번에 이해가는 것 같습니다. 아래 코드 영역에서 n사분면 표기를 n번 사각형으로 표기해주신다면 완벽할 것 같습니다~
@zsmalla 헉 완전 이상하다고 생각을 못하고 있었어요! 반영해서 수정했습니다 :) 감사합니다 지수님👍👍👍 |
PR Summary
풀이시간: 25분
<input>
<solution>