Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p03079 (python)

Fixed submission:
# coding: utf-8
# Your code here!
a,b,c = map(int,input().split())
 
if a==b and b==c:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a,b,c == map(int,input().split())

if a==b and b==c:
  print("Yes")
else:
  print("No")
Problem p03318 (python)

Fixed submission:
# coding: utf-8
# Your code here!
k = int(input())
count = 0
ans = []
minN = 10**15

for i in reversed(range(13)):
    minN = 10**15
    for j in reversed(range(1,10**3)):
        num = str(j)+"9"*i
        n = sum([int(k) for k in num])
        n = int(num)/n
        if(minN > n or n==1):
            minN = n
            ans.append(int(num))

for i in list(sorted(list(set(ans))))[:k]:
    print(i)

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# Your code here!
k = int(input())
ans = 10**15
li = []
for i in reversed(list(range(1,10**15))):
    snk = sum([int(j) for j in str(i)])
    if(ans >= i/snk):
        ans = i/snk
        li.append(i)
        
for i in list(reversed(li))[:k]:
    print(i)
Problem p03351 (python)

Fixed submission:
a, b, c ,d = map(int, input().split())

flag = 0

if((a-b)**2<=d**2):
    flag += 1

if((b-c)**2<=d**2):
    flag += 1

if((c-a)**2<=d**2):
    flag += 2

if(flag>=2):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a, b, c ,d = map(int, input().split())

flag = 0

if((a-b)**2<d**2):
    flag += 1

if((b-c)**2<d**2):
    flag += 1

if((c-a)**2<d**2):
    flag += 1

if(flag=>2):
    print("Yes")
else:
    print("No")
Problem p03353 (python)

Fixed submission:
s = input()
k = int(input())

index = []

for i in range(len(s)):
    for j in range(i+1,i+k+1):
        index.append(s[i:j])
    
print(sorted(list(set(index)))[k-1])

Buggy submission (verdict: Runtime Error):
s = input()
k = int(input())

index = []

for i in range(len(s)):
    for j in range(i+1,i+k):
        jyuhuku = 0
        for a in index:
            if(a == s[i:j]):
                jyuhuku = 1
                break
            
        if(jyuhuku == 0):
            index.append(s[i:j])
    
print(sorted(index)[k-1])

Buggy submission (verdict: Runtime Error):
s = input()
k = int(input())

index = []

for i in range(len(s)):
    for j in range(i+1,len(s)+1):
        jyuhuku = 0
        for s in index:
            if(s == s[i:j]):
                jyuhuku = 1
        if(jyuhuku == 0):
            index.append(s[i:j])
    

print(sorted(index)[k-1])
Problem p03370 (python)

Fixed submission:
import math

n, x = map(int, input().split())

min = x
for i in range(n):
    m = int(input())
    x -= m
    if min > m:
        min = m

print(n + math.floor(x/min))

Buggy submission (verdict: Runtime Error):
import math

n, x = map(int, input().split())

min = x
for i in range(n):
    m = int(input())
    x -= m
    if min > m:
        min = m

print(n + math.floor(ans/min))
Problem p03377 (python)

Fixed submission:
a, b, x = map(int, input().split())

if a+b >= x and a <= x:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
n = int(input())

x = list(map(int, input().split()))

soredx = sorted(x)

migi = soredx[int(n/2-1)]
hidari = soredx[int(n/2)]

for i in range(n):
    if(migi<x[i]):
        print(migi)
    else:
        print(hidari)
Problem p03378 (python)

Fixed submission:
n, m, x = map(int, input().split())

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

counta=0;
countb=0;

for i in a:
    if (n<i and i<x) or (x<i and i<n):
        counta+=1

for i in a:
    if (0<i and i<x):
        countb+=1


if (counta<countb):
    ans = counta
else:
    ans = countb

print(ans)

Buggy submission (verdict: Runtime Error):
n, m, x = map(int, input().split())

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

counta=0;
countb=0;

for i in a:
    if (n<a and a<x) or (x<a and a<n):
        counta+=1

for i in a:
    if (0<a and a<x):
        countb+=1

if (counta<countb):
    ans = counta
else:
    ans = countb

print(ans)
Problem p03471 (python)

Fixed submission:
a,b = map(int,input().split())

t = b//1000

f = False

for i in range(t//10+1):
    for j in range((t-i*10)//5+1):
        if a == t - i*9 - j*4 and b == i*10000+j*5000+(a-i-j)*1000 and a-i-j>=0:
            f = True
            break
    if f:
        break

if f:
    print(i,j,a-i-j)
else:
    print(-1,-1,-1)

Buggy submission (verdict: Runtime Error):
    a,b = map(int,input().split())
     
    t = b//1000
     
    f = False
     
    for i in range(t//10+1):
        for j in range((t-i*10)//5+1):
            if a == t - i*9 - j*4 and t == i*10+j*5+(a-i-j) and a-i-j>=0:
                f = True
                break
        if f:
            break
     
    if f:
        print(i,j,a-i-j)
    else:
        print(-1,-1,-1)

Buggy submission (verdict: Runtime Error):
    a,b = map(int,input().split())
     
    t = b//1000
     
    f = False
     
    for i in range(t//10+1):
        for j in range((t-i*10)//5+1):
            if a == t - i*9 - j*4 and t == i*10+j*5+(a-i-j)A and a-i-j>=0:
                f = True
                break
        if f:
            break
     
    if f:
        print(i,j,a-i-j)
    else:
        print(-1,-1,-1)

Buggy submission (verdict: Runtime Error):
    a,b = map(int,input().split())
     
    t = b
     
    f = False
     
    for i in range(t//10+1):
        for j in range((t-i*10)//5+1):
            if a == t - i*9 - j*4 and b == i*10+j*5+(a-i-j) and a-i-j>=0:
                f = True
                break
        if f:
            break
     
    if f:
        print(i,j,a-i-j)
    else:
        print(-1,-1,-1)

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())

t = b//1000

f = False

for i in range(t//10+1):
    for j in range(t//5):
        if a == t - i*9 - j*4 and b == i*10000+j*5000+(a-i-j)*1000 and a-i-j>=0:
            f = True
            break
    if f:
        break

if f:
    print(i,j,a-i-j)
else:
    print(-1,-1,-1)
print(i*10000+j*5000+(a-i-j)*1000)
Problem p03625 (python)

Fixed submission:
n = int(input())

a = input().split()

d = {}
for i in a:
    d[i] = d.get(i,0)+1
    
for i in d:
    d[i] = d[i]//2

s = []
for i in d:
    s += [int(i)]*int(d.get(i))
if(len(s)>=2):
    s.sort()
    print(s[-1]*s[-2])
else:
    print(0)

Buggy submission (verdict: Runtime Error):
n = int(input())

a = input().split()

d = {}
for i in a:
    d[i] = d.get(i,0)+1
    
for i in d:
    d[i] = d[i]//2

s = []
for i in d:
    for _ in range(d.get(i)):
        s.append(int(i))
    s.sort()
    
print(s[-1]*s[-2])
Problem p03109 (python)

Fixed submission:
y,m,d = map(int, input().split('/'))
ans = True
if y <= 2019:
  if m <= 4:
    if d > 30:
      ans = False
  else:
    ans = False
else:
  ans = False
if ans:
  print("Heisei")
else:
  print("TBD")

Buggy submission (verdict: Runtime Error):
y,m,d = map(int, input().split('/'))
ans = True
if y <= 2019:
	if m <= 4:
      if d > 30:
        ans = False
    else:
      ans = False
else:
  ans = False
if ans:
  print("Heisei")
else:
  print("TBD")
Problem p03227 (python)

Fixed submission:
a = input()
if len(a) == 2:
  print(a)
else:
  print(a[::-1])

Buggy submission (verdict: Runtime Error):
a = input()
if len(a) == 2:
  print(a)
else:
  print(reverse(a))
Problem p03679 (python)

Fixed submission:
x,a,b=map(int,input().split())
if a-b>=0:
  print("delicious")
else:
  if abs(a-b) >= x+1:
    print("dangerous")
  else:
    print("safe")

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
if a-b>0:
  print("delicious")
else:
  if abs(a-b) > x+1:
    print("dangerous")
  else:
    print("safe")
Problem p03260 (python)

Fixed submission:
nums = input()

if '2' in nums:
    print("No")
else:
    print("Yes")
#17025159 | nowg's solution for [AtCoder-4250] [Problem A]

Buggy submission (verdict: Runtime Error):
nums = input()

if '2' in nums:
    print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
s = raw_input()
a, b = s.split()

c = int(a) * int(b)
print 'YES' if c % 2 == 1 else 'NO'

Buggy submission (verdict: Runtime Error):
n = int(input())

words = []
for i in range(n):
    words.append(input())

ret = "Yes"
if len(set(words)) != n:
    ret = "No"
else:
    for i in range(n-1):
        if words[i][-1] != words[i+1][0]:
            ret = "No"
            break

print(ret)
##17024960 | nowg's solution for [AtCoder-4250] [Problem A]

Buggy submission (verdict: Runtime Error):
#!/usr/bin/python
# -*- coding: utf-8 -*-
n = int(raw_input())
s = []
for _ in xrange(n):
    s.append(raw_input())

ss = set()
last = None
ret = 'Yes'
for w in s:
    if w in ss:
        ret = 'No'
        break
    if last is None:
        ss.add(w)
        last = w
        continue
    if last[-1] != w[0]:
        ret = 'No'
        break
    ss.add(w)
    last = w

print ret
##17024717 | shenweiqiang's solution for [AtCoder-4252] [Problem B]

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())

if a == 2 or b == 2:
    print("No")
else:
    print("Yes")
##17024510 | nowg's solution for [AtCoder-4250] [Problem A]

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
for c in range(1, 4):
    if (a*b*c) % 2 != 0:
        print('Yes')
        exit()
print('No')
Problem p03331 (python)

Fixed submission:
#!/usr/bin/python
# -*- coding: utf-8 -*-

n=int(raw_input())
maxv=n
for a in xrange(1,n):
  b=n-a
  if a>b: break
  sa=sum([int(x) for x in str(a)])
  sb=sum([int(x) for x in str(b)])
  maxv=min(maxv, sa+sb)
print(maxv)

Buggy submission (verdict: Runtime Error):
n=int(raw_input())
maxv=n
for a in xrang(1,n+1):
  b=n-a
  if a>b: break
  sa=sum([int(x) for x in str(a)])
  sb=sum([int(x) for x in str(b)])
  maxv=min(maxv, sa+sb)
print(maxv)
Problem p02642 (python)

Fixed submission:
N = int(input())

A = list(map(int,input().split()))


b = sorted(list(A))
dp = [0]*(max(A)+1)

m_a = max(A)+1
for i in b:
    dp[i] += 1
    if dp[i]==1 :
        for j in range(i*2, m_a,i):
            dp[j] +=100

print(dp.count(1))

Buggy submission (verdict: Runtime Error):
N = int(input())

A = list(map(int,input().split()))


b = sorted(list(A))
dp = [0]*(max(A)+4)

m_a = max(A)
for i in b:
    dp[i] += 1
    if dp[i]==1 :
        for j in range(i*2, m_a,i):
            dp[j*i] +=100

print(dp.count(1))

Buggy submission (verdict: Runtime Error):
N = int(input())

A = list(map(int,input().split()))



b = sorted(list(set(A)))

x = set(b)

res = x

if b[0]==1:
    print(1)
    exit()

if b[0]==b[-1]:
    print(0)
    exit()

if N == 1:
    print(1)


daburi = []

c = sorted(A)
for i in range(1,N):
    if c[i] == c[i-1]:
        daburi.append(c[i])

daburi = set(daburi)
#print(daburi)

f = False
res = 0


i = 0

s = set(b)

while len(s) >= res:
    for j in x:
        if b[i] == j: 
            continue
        if j%b[i]== 0 :
            s.discard(j)
#            print(s)
    i+=1
    res+=1

print(len(s))

Buggy submission (verdict: Runtime Error):
N = int(input())

A = list(map(int,input().split()))



b = sorted(list(set(A)))

x = set(b)

res = x

if b[0]==1:
    print(1)
    exit()

if b[0]==b[-1]:
    print(0)
    exit()


daburi = []

c = sorted(A)
for i in range(1,N):
    if c[i] == c[i-1]:
        daburi.append(c[i])

daburi = set(daburi)
#print(daburi)

i = 0
while len(x) > 0 :
    tmp = b[i]
    for j in range(2,10**5+3):
        c = tmp* j
        if c in x:
            x.discard(c)
        if b[-1] <= c:
            break
    if len(x) == i:
        break
    i+=1
        
#print(x)
#print(daburi)
print((len(x- daburi)))

Buggy submission (verdict: Runtime Error):
N = int(input())

A = list(map(int,input().split()))



b = sorted(list(set(A)))

x = set(b)

res = x

if b[0]==1:
    print(1)
    exit()

if b[0]==b[-1]:
    print(0)
    exit()


daburi = {}
for i in range(1,N):
    if b[i] == b[i-1]:
        daburi.add(b[i])


i = 0
while len(x) > 0 :
    tmp = b[i]
    for j in range(2,10**5+3):
        c = tmp* j
        if c in x:
            x.discard(c)
        if b[-1] <= c:
            break
    if len(x) == i:
        break
    i+=1
        

print(len(x)- len(daburi))

Buggy submission (verdict: Runtime Error):
N = int(input())

A = list(map(int,input().split()))



b = sorted(list(set(A)))

x = set(b)

res = x

if b[0]==1:
    print(1)
    exit()

if b[0]==b[-1]:
    print(0)
    exit()

i = 0

while len(x) > 0 :
    tmp = b[i]
    for j in range(2,10**5+3):
        c = tmp* j
        if c in x:
            x.discard(c)
        if b[-1] <= c:
            break
    if len(x) == i:
        break
    i+=1
        
    

print(len(x))
Problem p02684 (python)

Fixed submission:
N,K = map(int,input().split())

A = list(map(int,input().split()))

reached = []

check = [0]*(N+1)
now = 1


for _ in range(N):
    check[now]+=1
    if check[now] == 1 :
        reached.append(now)
        now = A[now-1]

    if check[now] > 1:
        break

#print(reached)

for i in range(len(reached)):
    if reached[i]== now:
        cnt = i
        break


roop = len(reached)- cnt
init = len(reached) 

if K < init:
    print(reached[K])
else:
    print(reached[(K-init)%roop+cnt])

Buggy submission (verdict: Runtime Error):
N,K = map(int,input().split())

tmp = list(map(int,input().split()))


A = []
for i in range(N):
    A.append(tmp[i]-1)

check = set([0])

now = 0

jun = [0]
for i in range(N):
    if A[now] not in check:
        check.add(A[now])
        jun.append(A[now])
        now = A[now]
    else:
        break
#print(jun.index(A[now]))
#print(jun)
print(jun[(K-jun.index(A[now])+1)%(len(jun)-jun.index(A[now])+1)]+1)
Problem p02714 (python)

Fixed submission:
import sys

input = sys.stdin.readline


N = int(input())

S = input()

color =list("RGB")

#色がRGBの３色ないとき
for x in color:
    if x not in S:
        print(0)
        exit()

r = 0
g = 0
b = 0
for i in range(len(S)):
    if S[i] == color[0]:
        r+=1
    elif S[i] == color[1]:
        g+=1
    elif S[i] == color[2]:
        b+=1

all = r*g*b

sub = 0
for i in range(N):
    for j in range(i+1,N):
        k = 2*j - i
        #kがN以上の位置にある
        if k >= N:
            continue

        #同じ色がある
        if S[i] == S[j] or S[j] == S[k] or S[k] == S[i] :
            continue
        sub+=1

print(all - sub)

Buggy submission (verdict: Runtime Error):
import numpy as np
import sys

input = sys.stdin.readline


N = int(input())

S = input()

color =list("RGB")

#色がRGBの３色ないとき
for x in color:
    if x not in S:
        print(0)
        exit()

r = 0
g = 0
b = 0
for i in range(len(S)):
    if S[i] == color[0]:
        r+=1
    elif S[i] == color[1]:
        g+=1
    elif S[i] == color[2]:
        b+=1

all = r*g*b

sub = 0
for i in range(N):
    for j in range(i+1,N):
        k = 2*j - i
        #kがN以上の位置にある
        if k >= N:
            continue

        #同じ色がある
        if S[i] == S[j] or S[j] == S[k] or S[k] == S[i] :
            continue
        sub+=1

print(all - sub)
Problem p02742 (python)

Fixed submission:
import numpy as np
import sys

input = sys.stdin.readline

H,W = map(int,input().split())

if H == 1 or W == 1:
    print(1)
else:
    if H*W%2 == 0:
        print(H*W//2)
    else:
        print(H*W//2+1)

Buggy submission (verdict: Runtime Error):
import numpy as np
import sys

input = sys.stdin.readline

H,W = map(int,input())

if H*W%2 == 0:
    print(int(H*W/2))
else:
    print(int(H*W)/2+1)
Problem p02755 (python)

Fixed submission:
a,b = map(int,input().split())


judge = 0
for i in range(1,1001):
    if  int(i*0.08) == a and int(i*0.1) == b:
        judge = 1
        print(i)
        break

if judge == 0:
    print(-1)

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())

x = a/0.08

y = b/0.1


judge = 0

for i in range(10):
    for j in range(10):
        x = (a+i/10)/0.08
        y = (b+j/10)/0.10
        if x == y:
            judge = 1
            print(int(x))
            exit(1)


if judge == 0:
    print(-1)
Problem p02760 (python)

Fixed submission:
# -*- coding:utf-8 -*-
A = []
bingo = 0
for i in range(3):
    a = list(map(int, input().split()))
    A.append(a)

n = int(input())

for i in range(n):
    b = int(input())
    for ai in A:
        if b in ai:
            ai[ai.index(b)] = None

for i in range(3):
    if A[i] == [None, None, None]:
        bingo = 1

    if [A[0][i], A[1][i], A[2][i]] == [None, None, None]:
        bingo = 1

if [A[0][0], A[1][1], A[2][2]] == [None, None, None] or [A[0][2], A[1][1], A[2][0]] == [None, None, None]:
    bingo = 1

print("Yes") if bingo == 1 else print("No")

Buggy submission (verdict: Runtime Error):

a = list(list(map(int,input().split())) for _ in range(3))

N = int(input())

b = list(int(input()) for _ in range(N))


ax = [[0]*3]*3

for k in range(N):
    for i in range(3):
        for j in range(3):
            if a[i][j] == b[k]:ax[i][j]= 1


for i in range(3):
    xcnt = 0
    ycnt = 0
    for j in range(3):
        if ax[i][j] == 1:xcnt +=1
        if ax[j][i] == 1:ycnt +=1


xxcnt = 0
for i in range(3):
    if ax[i][i] == 1:xxcnt+=1

for i in range(3):
    if ax[3-i][i] == 1:xycnt+=1

for i in range(3):
    if ax[i][3-i] == 1:yxcnt+=1

if xcnt == 3 or ycnt == 3 or xxcnt == 3 or xycnt == 3 or yxcnt == 3:
    print("Yes")

else:
    print("No")
Problem p02818 (python)

Fixed submission:
a,b,k = map(int,input().split())

ans_a = 0
ans_b = b
ans_a = max(0,a-k)

if( ans_a == 0):
    ans_b = max(0, b-(k-a))


print("{0} {1}".format(ans_a,ans_b))

Buggy submission (verdict: Runtime Error):
a,b,k = map(int,input().split())

ans_a = max(0,a-k)

if( ans_a == 0):
    ans_b = max(0, b-(k-a))


print("{0} {1}".format(ans_a,ans_b))
Problem p03150 (python)

Fixed submission:
S = input()

key = list("keyence")
target = 'keyence'

flg = False
for i in range(len(S)):
    for j in range(len(S)):
        tmp = S[0:i]+S[j:]

        if tmp == target and not flg:
            print("YES")
            flg = True
            break

if not flg:
    print("NO")

Buggy submission (verdict: Runtime Error):
S = input()

key = list("keyence")

k = 0
f = True
cnt = 0
for i in range(len(S)):
    if S[i] == key[k]:
        f = True
        k+=1
    else:
        if f :
            cnt+=1
        f = False
        

if cnt >1 or k != len(key):
    print("NO")
else:
    print("YES")
Problem p03282 (python)

Fixed submission:
s = input()

k = int(input())

ichi = 0
for i in s:
    if int(i) == 1:
        ichi = ichi +1
    else:
        break


if ichi >= k:
    print(1)
else:
    print(s[ichi])

Buggy submission (verdict: Runtime Error):
s = input()

k = int(input())

ichi = -1
for i in s:
    if int(i) == 1:
        ichi = ichi +1
    else:
        break



if ichi >= k:
    print(1)
else:
    print(s[ichi+1])
Problem p03309 (python)

Fixed submission:
n = int(input())

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


for i in range(len(a)):
    a[i] = a[i] -(i+1)

a.sort()

x=a[int(int(len(a))/2)]

ans = 0
for i in range(len(a)):
    ans =ans+ abs(a[i]-x)

print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))

b = 10000000
for i in range(100):
    sum = 0
    for j in range(n):
        sum = sum + abs(a[j] - (i + n))

    if sum < b:
        c = i
        b = sum


print(c)
Problem p03361 (python)

Fixed submission:
h, w = list(map(int, input().split()))
s = ['.'*(w+2)]

for i in range(h):
	s.append('.'+input()+'.')
s.append('.'*(w+2))

ans = True

for i in range(1, h+1):
	for j in range(1, w+1):
		if s[i][j]=='#':
			if s[i-1][j]=='.' and s[i+1][j]=='.' and s[i][j-1]=='.' and s[i][j+1]=='.':
				ans = False

print('Yes' if ans else 'No')

Buggy submission (verdict: Runtime Error):
import numpy as np

h,w = map(int,input().split())

s = [ list(input()) for i in range(h)]
s = np.array(s)

dy = [-1,0,1,0]
dx = [0,-1,0,1]

ans =True

for i in range(0,h):
    for j in range(0,w):
        flag = False
        if s[i][j] == '#' :
            for k in range(4):
                y = i+dy[k]
                x = i+dx[k]
                if  x < 0 or x >=w or y >= h or y < 0 :continue
#                print(x,y)
                if s[x][y] == '#':
                    flag = True

        if flag :ans = False


if ans :print("No")
else:print("Yes")

Buggy submission (verdict: Runtime Error):
import numpy as np

h,w = map(int,input().split())

s = [ list(input()) for i in range(h)]
s = np.array(s)

dy = [-1,0,1,0]
dx = [0,-1,0,1]

print(s.shape)
ans =True

for i in range(0,h):
    for j in range(0,w):
        flag = False
        if s[i][j] == '#' :
            for k in range(4):
                y = i+dy[k]
                x = i+dx[k]
                if  x < 0 or x >=w or y >= h or y < 0 :continue
#                print(x,y)
                if s[x][y] == '#':
                    flag = True

        if flag :ans = False


if ans :print("No")
else:print("Yes")
Problem p03607 (python)

Fixed submission:

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(readline())
a = []
for i in range(N):
     a.append(int(readline()))

a.sort()

res = 0
cnt = 1
for i in range(1,N):
    if a[i] == a[i-1]:
        cnt+=1
    else:
        if cnt%2:
            res+=1
        else:
            cnt=1

            

if cnt%2:
    print(res+1)
else:
    print(res)

Buggy submission (verdict: Runtime Error):

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(readline())
a = [0]*(10**5+1)
for i in range(N):
    a[int(input())]+=1

res = 0
for i in range(1,10**5+1):
    if a[i]%2:
        res+=1

print(res)

Buggy submission (verdict: Runtime Error):

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(readline())
a = [0]*(10**5+1)
for i in range(N):
    a[int(readline())]+=1

res = 0
for i in range(1,10**5+1):
    if a[i]%2:
        res+=1

print(res)
Problem p03624 (python)

Fixed submission:
import numpy as np
import sys

input = sys.stdin.readline

S = input()

S = sorted(list(set(S[:-1])))


alpha = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']


j = 0
for i in range(len(alpha)):
    if  S[j]== alpha[i] :
        if len(S)-1 != j:j+=1
    else:
        print(alpha[i])
        exit()


print("None")

Buggy submission (verdict: Runtime Error):
import numpy as np
import sys

input = sys.stdin.readline

S = input()

S = sorted(S[:-1])

alpha = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']


s = 0
for t in S:
    if t == alpha[s] :
        s+=1


if s == len(alpha):
    print("None")
else:
    print(alpha[s])
Problem p03238 (python)

Fixed submission:
x=int(input())
if x==1:
	print('Hello World')
else:
	y=int(input())
	z=int(input())
	print(y+z)

Buggy submission (verdict: Runtime Error):
x=int(input())
y=int(input())
z=int(input())
if x==1:
	print('Hello World')
else:
	print(y+z)
Problem p03282 (python)

Fixed submission:
x=input()
m=int(input())
x=list(x)

if len(x)<m:
	m=len(x)
t=1
for i in range(m):
	if x[i]!='1' and t==1:
		t=x[i]
t=int(t)
print(t)

Buggy submission (verdict: Runtime Error):
x=input()
x=list(x)
t=0
k=0
while t==0:
	if x[k]!="1":
		t=x[k]
	k=k+1
print(t)

Buggy submission (verdict: Runtime Error):
x=input()
x=list(x)
t=0
k=0
while t==0:
	if x[k]!="1":
		t=x[k]
	k=k+1
t=int(t)
print(t)
Problem p03328 (python)

Fixed submission:
a = [int(i) for i in input().split()]
b=a[0]
c=a[1]
x=c-b
print(round((x+1)*x/2)-c)

Buggy submission (verdict: Runtime Error):
10 11a = [int(i) for i in input().split()]
b=a[0]
c=a[1]
x=c-b
print(round((x+1)*x/2)-c)
Problem p03997 (python)

Fixed submission:
x=int(input())
y=int(input())
z=int(input())
print(round((x+y)*z/2))

Buggy submission (verdict: Runtime Error):
x=int(input()
y=int(input()
z=int(input()
print((x+y)*z/2)
Problem p03433 (python)

Fixed submission:
N=int(input())
A=int(input())
if(N%500<=A):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N=int(input())
A=int(input())
if((N%500<=A):
  print("Yes")
else:
  print("No")
Problem p03455 (python)

Fixed submission:
a,b=map(int, input().split())
if(a*b%2==0):
  print("Even")
else:
  print("Odd")

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
if(a*b%2==0):
  print("Even")
else:
  print("Odd")