-
Notifications
You must be signed in to change notification settings - Fork 0
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
[이지민] - 사과나무, 괄호 회전하기 #274
Conversation
tmp = s[0] | ||
s.pop(0) | ||
s.append(tmp) |
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.
실제로 회전을 시켜주면 항상 0 ~ n-1 인덱스로 탐색하면 되는군요
share += numbers[i] // 2 | ||
rest += numbers[i] % 2 |
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.
저는 if를 추가적으로 붙여줬는데 그냥 이렇게만 해도 되는군요!!
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.
고생하셨습니다!
s.pop(0) | ||
s.append(tmp) |
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.
옹... 이렇게 리스트로 만들어서 직접 빼서 넣어주는 방식도 직관적이라 괜찮네요!
isCorrect = False | ||
else: | ||
for i in range(3): | ||
if stack[-1] == start[i]: |
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.
굿굿!~ 고생하셨슴다!
📌 from issue #271 📌
📋문제 목록📋