Skip to content
Discussion options

You must be logged in to vote

찾았습니다

for _ in range(i):
num = dq.popleft()
tmp.append(num)
dq.append(num)

i 가 len(elements)의 1을 제외한 약수인 경우 모든 케이스를 얻지 못합니다.
예시) len(elements)가 6이고 i가 3인 경우
elements = [1,2,3,4,5,6]
첫번째 -> [1,2,3]
두번째 -> [4,5,6]
세번째 -> [1,2,3]
네번째 -> [4,5,6]
다섯번째 -> [1,2,3]
->>>>반복만 됨

Replies: 2 comments 3 replies

Comment options

0seob
Apr 18, 2023
Maintainer

You must be logged in to vote
1 reply
@lsvv1217
Comment options

lsvv1217Apr 18, 2023
Maintainer Author

Comment options

You must be logged in to vote
2 replies
@lsvv1217
Comment options

lsvv1217Apr 18, 2023
Maintainer Author

@SangJunni
Comment options

Answer selected bylsvv1217
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
@lsvv1217@0seob@SangJunni