주어진 정수 배열에서 유일한 고유 요소를 가져 오는 아래 코드를 작성했습니다.코드 종료 상태 255
def lonelyinteger(a):
for x in a:
answer = a.count(x)
if(a.count(x) < 2)
answer=x
return answer
if __name__ == '__main__':
a = input()
b = map(int, raw_input().strip().split(" "))
print lonelyinteger(b)
오류
File "solution.py", line 5 if(a.count(x) < 2) ^ SyntaxError: invalid syntax
Exit Status 255
나는 당신이 그 라인의 끝에서 :
누락
가 오 촬영, 감사 부지 – NikhilGoud