Buggy python submission (verdict: Runtime Error):
N = int(input())
a = list(map(int, input().split()))
 
x = 0
y = 0
z = 0
 
if N % 3 != 0:
  print('No')
 
else:
 
  for i in range(N):
    if a[i] != x and a[i] != y and a[i] != z:
      if x == 0:
        x = a[i]
        continue
      elif y == 0:
        y = a[i]
        continue
      elif z == 0:
        z = a[i]
        continue
      else:
        print('No')
        sys.exit()
 
  if x ^ y == z:
    print('Yes')
  else:
    print('No')

Fixed submission:
import sys

N = int(input())
a = list(map(int, input().split()))
 
x = 0
y = 0
z = 0

if a.count(0) == N:
  print('Yes')
  sys.exit()
  

if N % 3 != 0:
  print('No')
 
elif a.count(0) != 0:
  if a.count(0) != N / 3:
    print('No')
    sys.exit()
    
  else:
    for i in range(N):
      if a[i] != 0 and a[i] != x:
        if x == 0:
          x = a[i]
          continue
        else:
          print('No')
          sys.exit()
        
    print('Yes')
    

else:
  for i in range(N):
    if a[i] != x and a[i] != y and a[i] != z:
      if x == 0:
        x = a[i]
        continue
      elif y == 0:
        y = a[i]
        continue
      elif z == 0:
        z = a[i]
        continue
      else:
        print('No')
        sys.exit()
  
  if x ^ y == z and a.count(x) == a.count(y) and a.count(y) == a.count(z):
    print('Yes')
  else:
    print('No')

Buggy python submission (verdict: Runtime Error):
import sys
 
N = int(input())
a = list(map(int, input().split()))
 
x = 0
y = 0
z = 0
 
if N % 3 != 0:
  print('No')
 
else:
 
  for i in range(N):
    if a[i] != x and a[i] != y and a[i] != z:
      if x == 0:
        x = a[i]
        continue
      elif y == 0:
        y = a[i]
        continue
      elif z == 0:
        z = a[i]
        continue
      else:
        print('No')
        sys.exit()
 
  if x != 0 and y != 0 and z != 0:
    print('Yes')
  else:
    print('No')
import sys

N = int(input())
a = list(map(int, input().split()))

x = 0
y = 0
z = 0

if N % 3 != 0:
  print('No')

else:

  for i in range(N):
    if a[i] != x and a[i] != y and a[i] != z:
      if x == 0:
        x = a[i]
        continue
      elif y == 0:
        y = a[i]
        continue
      elif z == 0:
        z = a[i]
        continue
      else:
        print('No')
        sys.exit()

  if x ^ y == z:
    print('Yes')
  else:
    print('No')
提出情報

Fixed submission:
import sys

N = int(input())
a = list(map(int, input().split()))
 
x = 0
y = 0
z = 0

if a.count(0) == N:
  print('Yes')
  sys.exit()
  

if N % 3 != 0:
  print('No')
 
elif a.count(0) != 0:
  if a.count(0) != N / 3:
    print('No')
    sys.exit()
    
  else:
    for i in range(N):
      if a[i] != 0 and a[i] != x:
        if x == 0:
          x = a[i]
          continue
        else:
          print('No')
          sys.exit()
        
    print('Yes')
    

else:
  for i in range(N):
    if a[i] != x and a[i] != y and a[i] != z:
      if x == 0:
        x = a[i]
        continue
      elif y == 0:
        y = a[i]
        continue
      elif z == 0:
        z = a[i]
        continue
      else:
        print('No')
        sys.exit()
  
  if x ^ y == z and a.count(x) == a.count(y) and a.count(y) == a.count(z):
    print('Yes')
  else:
    print('No')