아래와 같은 반례가 있으니 참고해 보세요.
반례는 https://testcase.ac/problems/5397 에서도 확인해볼 수 있습니다.
입력:
1 -3-x
출력:
런타임 에러
Traceback (most recent call last):
File "Main.py", line 80, in <module>
it=l.pop(it)
File "Main.py", line 34, in pop
node.prev.next=node.next
AttributeError: 'NoneType' object has no attribute 'next'
정답 코드 출력:
x

jinoh1030 1년 전
25%에서 런타임에러(attribute error)가 뜨는데 왜 그런지 모르겠습니다. 도와주세요ㅠㅠㅠㅠ