Skip to content

Conversation

@gimdongwon
Copy link
Owner

3번 요청드립니다 ㅜㅜ 어젯밤부터 하는데 답이 안나오네요.. 어디가 잘못된걸까요

selected += 1
while arr[selected] == 0:
selected += 1
if arr[selected] != 0:
Copy link
Collaborator

Choose a reason for hiding this comment

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

while문 어차피 탈출해서 따로 조건 안줘도 되지 않을까요?

Copy link
Owner Author

Choose a reason for hiding this comment

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

아하 if문은 필요없긴하네유,,

def solution (n,k,cmd):
selected = k
stack = []
board = [i+1 for i in range(n)]
Copy link
Collaborator

Choose a reason for hiding this comment

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

board 사용하는 구간이 없는거 같습니다

Copy link
Owner Author

Choose a reason for hiding this comment

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

앗 그렇네요ㅜㅜ 근데 저는 왜 안되는지가 궁금..

Copy link
Collaborator

Choose a reason for hiding this comment

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

저는 테스트 3개만 통과해서 왜그런지 모르겠네요....

Copy link
Owner Author

Choose a reason for hiding this comment

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

ㅋㅋㅋㅋ 저도 정확도 테스트는 대여섯개는 맞아요 ㅜㅜ 어렵군.. 오늘 이놈이다!

@gimdongwon gimdongwon added the Code Review Code Review label Jul 15, 2021
for item in cmd:
# print(item)
# print(arr, selected, stack)
if len(item) == 3:
Copy link
Collaborator

Choose a reason for hiding this comment

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

반례 찾아왔습니다 "U 14" 이런식으로도 들어올 수 있다고 하네요

Copy link
Owner Author

Choose a reason for hiding this comment

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

아아 맞네요!! >= 바꾸니깐 정확성 다 맞습니다 진현님 짱 😍

Copy link
Owner Author

Choose a reason for hiding this comment

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

효율성 5개까지 맞네요 ㅎㅎ

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

Labels

Code Review Code Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants