Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
apple = []
for _ in range(n):
    a = str(input())
    if a not in apple:
        apple.append(a)
    else:
        apple.remove(a)
print(len(apple))

Fixed submission:
n = int(input())
apple = []
for _ in range(n):
    apple.append(int(input()))
apple = sorted(apple)
apple.append(0)
count = 0
ans = 1
for i in range(n):
    if apple[i] == apple[i + 1]:
        ans += 1
    else:
        if ans%2 == 0:
            ans = 1
        else:
            count += 1
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
apple = []
for _ in range(n):
    a = int(input())
    if a not in apple:
        apple.append(a)
    else:
        apple.remove(a)
print(len(apple))

Fixed submission:
n = int(input())
apple = []
for _ in range(n):
    apple.append(int(input()))
apple = sorted(apple)
apple.append(0)
count = 0
ans = 1
for i in range(n):
    if apple[i] == apple[i + 1]:
        ans += 1
    else:
        if ans%2 == 0:
            ans = 1
        else:
            count += 1
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
apple = []
for _ in range(n):
    apple.append(str(input()))
a = set(apple)
count = 0
for i in a:
    b = apple.count(i)
    if b%2 != 0:
        count += 1
    else:
        pass
print(count)

Fixed submission:
n = int(input())
apple = []
for _ in range(n):
    apple.append(int(input()))
apple = sorted(apple)
apple.append(0)
count = 0
ans = 1
for i in range(n):
    if apple[i] == apple[i + 1]:
        ans += 1
    else:
        if ans%2 == 0:
            ans = 1
        else:
            count += 1
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
apple = []
for _ in range(n):
    apple.append(str(input()))
a = set(apple)
count = 0
for i in a:
    b = apple.count(i)
    if b%2 != 0:
        count += 1
    else:
        pass
print(count)

Fixed submission:
n = int(input())
apple = []
for _ in range(n):
    apple.append(int(input()))
apple = sorted(apple)
apple.append(0)
count = 0
ans = 1
for i in range(n):
    if apple[i] == apple[i + 1]:
        ans += 1
    else:
        if ans%2 == 0:
            ans = 1
        else:
            count += 1
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
apple = []
for _ in range(n):
    apple.append(str(input()))
orange = []

if len(set(apple)) == len(apple):
    orange = []
else:    
    for i in apple:
        if i not in orange:
            orange.append(i)
        else:
            orange.remove(i)
print(len(orange))

Fixed submission:
n = int(input())
apple = []
for _ in range(n):
    apple.append(int(input()))
apple = sorted(apple)
apple.append(0)
count = 0
ans = 1
for i in range(n):
    if apple[i] == apple[i + 1]:
        ans += 1
    else:
        if ans%2 == 0:
            ans = 1
        else:
            count += 1
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
apple = []
for _ in range(n):
    apple.append(str(input()))
orange = []
for i in apple:
    if i not in orange:
        orange.append(i)
    else:
        orange.remove(i)
print(len(orange))

Fixed submission:
n = int(input())
apple = []
for _ in range(n):
    apple.append(int(input()))
apple = sorted(apple)
apple.append(0)
count = 0
ans = 1
for i in range(n):
    if apple[i] == apple[i + 1]:
        ans += 1
    else:
        if ans%2 == 0:
            ans = 1
        else:
            count += 1
print(count)