-
Notifications
You must be signed in to change notification settings - Fork 126
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
[haklee] week 7 #484
[haklee] week 7 #484
Conversation
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.
고생하셨습니다!
|
||
class Solution: | ||
def uniquePaths(self, m: int, n: int) -> int: | ||
return comb(m + n - 2, n - 1) |
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.
와 역시 이래서 파이썬 파이썬 하는군요 ㅋㅋ
저도 TS에서 조합을 사용했는데, 부동소수점 문제로 정확한 계산을 못하더라구요. 그런데 파이썬은 이걸 스무스하게 해결해주네요👍
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.
for j in range(n): | ||
if matrix[i][j] == 0: | ||
col_to_change.add(i) | ||
row_to_change.add(j) |
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.
추가했습니다!
|
||
class Solution: | ||
def uniquePaths(self, m: int, n: int) -> int: | ||
return comb(m + n - 2, n - 1) |
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.
와 역시 이래서 파이썬 파이썬 하는군요 ㅋㅋ
저도 TS에서 조합을 사용했는데, 부동소수점 문제로 정확한 계산을 못하더라구요. 그런데 파이썬은 이걸 스무스하게 해결해주네요👍
답안 제출 문제
체크 리스트
In Review
로 설정해주세요.