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

Fixed submission:
from collections import defaultdict as dd, deque, Counter
n = int(input())
C = Counter(map(int,input().split()))

if len(C) == 1:
    if list(C)[0] == 0:
        print('Yes')
    else:
        print('No')
elif len(C) == 2:
    it = list(C.items())
    k1,v1 = it[0]
    k2,v2 = it[1]
    if v1 == 2*v2 or v2 == 2*v1 and 0 in [k1,k2]:
        print('Yes')
    else:
        print('No')
elif len(C) == 3:
    it = list(C.items())
    k1,v1 = it[0]
    k2,v2 = it[1]
    k3,v3 = it[2]

    if v1 == v2 == v3 and k1^k2 == k3:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
from collections import defaultdict as dd, deque, Counter
n = int(input())
C = Counter(map(int,input().split()))

if len(C) == 1:
    if C.values()[0] == 0:
        print('Yes')
    else:
        print('No')
elif len(C) == 2:
    it = list(C.items())
    k1,v1 = it[0]
    k2,v2 = it[1]
    if v1 == 2*v2 or v2 == 2*v1 and 0 in [k1,k2]:
        print('Yes')
    else:
        print('No')
elif len(C) == 3:
    it = list(C.items())
    k1,v1 = it[0]
    k2,v2 = it[1]
    k3,v3 = it[2]

    if v1 == v2 == v3 and k1^k2 == k3:
        print('Yes')
    else:
        print('No')
else:
    print('No')
Problem p03047 (python)

Fixed submission:
n,k=map(int,input().split())
print(n-k+1)

Buggy submission (verdict: Runtime Error):
# floor(N/m) = N % m

def divisors(n):
    D = []
    for d in range(1,int((n)**.5)+1):
        if n%d == 0:
            D.append(d)
            if n//d != d:
                D.append(n//d)
    return D

def solve(n):
    s = 0

    for d in divisors(n):
        m = d - 1
        if m and (m+1)*(n//m) == n:
            s += m
    return s


n = int(input())
print(solve(n))

Buggy submission (verdict: Runtime Error):
n = int(input())
S = [input() for _ in range(n)]

count = 0
ba = 0
wa = 0
bw = 0
for s in S:
    count += s.count('AB')
    if s[0] == 'B' and s[-1] == 'A':
        ba += 1
    elif s[0] == 'B':
        bw += 1
    elif s[-1] == 'A':
        wa += 1

if ba:
    count += ba - 1
    ba = 1
if ba:
    if wa and bw:
        count += 2
        wa -= 1
        bw -= 1
        ba -= 1
    if ba:
        if wa < bw:
            wa += 1
        else:
            bw += 1
count += min(wa,bw)

print(count)
Problem p03049 (python)

Fixed submission:
n = int(input())
S = [input() for _ in range(n)]

count = 0
ba = 0
wa = 0
bw = 0
for s in S:
    count += s.count('AB')
    if s[0] == 'B' and s[-1] == 'A':
        ba += 1
    elif s[0] == 'B':
        bw += 1
    elif s[-1] == 'A':
        wa += 1

if ba:
    count += ba - 1
    ba = 1
if ba:
    if wa and bw:
        count += 2
        wa -= 1
        bw -= 1
        ba -= 1
    if ba:
        if wa < bw:
            wa += 1
        else:
            bw += 1
count += min(wa,bw)

print(count)

Buggy submission (verdict: Runtime Error):
n = int(input())
S = [input() for _ in range(n)]

count = 0
ba = 0
wa = 0
bw = 0
for s in S:
    count += s.count('AB')
    if s[0] == 'B' and s[-1] == 'A':
        ba += 1
    elif s[0] == 'B':
        bw += 1
    elif s[-1] == 'A':
        wa += 1

if ba:
    count += ba - 1
    ba = 1
if ba:
    if wa and bw:
        count += 2
        wa -= 1
        bw -= 1
        ba -= 1
    if ba:
        if wa < bw:
            wa += 1
        else:
            bw += 1
count += min(wa,bw)

print(count)´
Problem p02554 (python)

Fixed submission:
n = int(input())

ten = 10**n
nine = 9**n
eight = 8**n

n_zero = ten - nine #19
n_zn = eight #64

a = (ten - n_zero * 2 - n_zn)

if a < 0:
  a = -a

print(a % (10**9+7))

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

n_zero = 10**n - 9**n #19
n_nine = 10**n - 9**n #19
n_non_zn = 8**n #64

a = (10**n - n_zero - n_nine - n_zn)

if a < 0:
  a = -a

print(a % (10**9+7))
Problem p02576 (python)

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

import math

print(t*math.ceil(n/x))

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

import math

print(t*math.ceil(int(input())/x))
Problem p02630 (python)

Fixed submission:
from collections import Counter
n = int(input())
A = list(map(int, input().split()))
C = Counter(A)
ans = sum(A)
q = int(input())
for i in range(q):
    b, c = map(int, input().split())
    if c not in C.keys():
        C[c] = 0
    if b in C.keys():
        ans += (c-b)*C[b]
        C[c] += C[b]
        C[b] = 0
    print(ans)

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

base=sum(A)

from collections import Counter

ad=Counter(A)

for _ in range(Q):
    b,c=map(int.input().split())
    if ad[b]!=0:
        base+=(c-b)*ad[b]
        ad[c]+=ad[b]
        ad[b]=0
    print(base)

Buggy submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input().split()))
Q=int(input())
L=[0]*100000
for i in range(1,100000):
    a=A.count(i)
    L[i]=a
ans=sum(A)
for _ in range(Q):
    B,C=map(int,input().split())
    ans+=L[B]*(C-B)
    L[C]+=L[B]
    L[B]=0
    print(ans)
Problem p02631 (python)

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
x=0
for a in A:
    x^=a
ans=''
for a in A:
    ans+=str(x^a)+' '
print(ans)

Buggy submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input().split()))
Q=int(input())
L=len(A)
S=sum(A)

for i in range(Q):
    ans=0
    B,C=map(int,input().split())
    for j in range(L):
        if A[j]==B:
            A[j]=C
            S+=(C-B)
    ans=S
    print(ans)
Problem p02639 (python)

Fixed submission:
#170A
#Five Variables

x = list(map(int,input().split()))
print(x.index(0)+1)

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python
# coding: utf-8

# In[19]:


#170A
#Five Variables

X=list(map(int,input().split()))
for i in range(5):
    if X[i]==0:
        print(i+1)
        break


# In[ ]:


x = list(map(int,input().split()))
print(x.index(0)+1)
Problem p02713 (python)

Fixed submission:
#162C
#Sum of gcd of Tuples (Easy)

import math

k=int(input())+1
ans=0
for a in range(1,k):
    for b in range(1,k):
        g=math.gcd(a,b)
        for c in range(1,k):
            ans+=math.gcd(g,c)
print(ans)

Buggy submission (verdict: Runtime Error):
#162C
#Sum of gcd of Tuples (Easy)

import math

k=int(input())+1
ans=0
for a in range(1,k):
    for b in range(1,k):
        g=math.gcd(a,b)
        for c in range(1,k):
            ans+=gcd(g,c)
print(ans)
Problem p02730 (python)

Fixed submission:
s=input()
n=len(s)
n1=(n-1)//2
n2=(n+3)//2
s1=s[:n1]
s2=s[n2-1:]

for i in range(1,n1+1):
    if s[i-1]!=s[-i]:
        print('No')
        exit()
for i in range(1,n1//2+1):
    if s1[i-1]!=s1[-i]:
        print('No')
        exit()
print('Yes')

Buggy submission (verdict: Runtime Error):
for i in range(1,n1+1):
    if s[i-1]!=s[-i] or s1[i-1]!=s1[-i]:
        print('No')
        exit()
print('Yes')
Problem p02761 (python)

Fixed submission:
n, m = map(int, input().split())
ans = ['0'] * n
for i in range(m):
    s, c = map(int,input().split())
    if s == 1 and c == 0 and n != 1:
        print(-1)
        break
    if ans[s-1] != '0' and c != ans[s-1]:
        print(-1)
        break
    ans[s-1] = c
else:
    if n == 1 and int(ans[0]) == 0:
        print(0)
        exit()
    elif ans[0] == '0':
        ans[0] = '1'
    ans = map(str, ans)
    print(''.join(ans))

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
ans = ['0'] * n
for i in range(m):
    s, c = map(int,input().split())
    if s == 1 and c == 0 and n != 1:
        print(-1)
        break
    if ans[s-1] != '0' and c != ans[s-1]:
        print(-1)
        break
    ans[s-1] = c
else:
    if n == 1 and int(ans[0]) == 0:
        print(0)
        break
    elif ans[0] == '0':
        ans[0] = '1'
    ans = map(str, ans)
    print(''.join(ans))
Problem p02684 (python)

Fixed submission:
n,k = map(int,input().split())
a = list(map(int,input().split()))
b = 1
c = [0] * n
c[0] = 1
m = 0
while c[b-1] < 2 and k > 0:
	b = a[b-1]
	c[b-1] += 1
	k -= 1
while c[b-1] < 3 and k > 0:
	b = a[b-1]
	c[b-1] += 1
	m += 1
if k == 0:
	print(b)
else:
	o = k % m
	for i in range(o):
		b = a[b-1]
	print(b)

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
a = list(map(int,input().split()))
b = 1
c = [0] * n
c[0] = 1
m = 0
while c[b-1] < 2 and k > 0:
	b = a[b-1]
	c[b-1] += 1
	k -= 1
while c[b-1] < 3 and k > 0:
	b = a[b-1]
	c[b-1] += 1
	m += 1
o = k % m
for i in range(o):
	b = a[b-1]
print(b)
Problem p02687 (python)

Fixed submission:
s = input()
if s == 'ABC':
	print('ARC')
else:
	print('ABC')

Buggy submission (verdict: Runtime Error):
s = input()
if s = 'ABC':
	print('ARC')
else:
	print('ABC')
Problem p02717 (python)

Fixed submission:
a,b,c=map(str,input().split())
print(c+" "+a+" "+b)

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
print(c+" "+b+" "+a)
Problem p03001 (python)

Fixed submission:
w, h, x, y = map(int,input().split())
if w/2 == x and h/2 == y:
        max = (w*h)/2
        print("{} 1".format(max))
else:
        max = (w*h)/2
        print("{} 0".format(max))

Buggy submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-

w, h, x, y = map(int,input().split())
if w/2 == x and h/2 == y:
        max = (w*h)/2
        print("{} 1".format(max))
else:
        max = (w*h)/2
        print("{} 0".format(max))
~
Problem p03331 (python)

Fixed submission:
n = int(input())
l = []
for a in range(1,n):
        sum = 0
        sum1 = 0
        b = n - a
        for i in range(len(str(a))):
                sum += int(str(a)[i])
        for i in range(len(str(b))):
                sum1 += int(str(b)[i])
        l.append(sum+sum1)
print(min(l))

Buggy submission (verdict: Runtime Error):
n = int(input())
l = []
for a in range(2,n-1):
        sum = 0
        sum1 = 0
        b = n - a
        for i in range(len(str(a))):
                sum += int(str(a)[i])
        for i in range(len(str(b))):
                sum1 += int(str(b)[i])
        l.append(sum+sum1)
print(min(l))

Buggy submission (verdict: Runtime Error):
n = int(input())
list = []
for a in range(1,n-1):
        sum = 0
        sum1 = 0
        b = n - a
        for j in range(len(str(a))):
                sum += int(str(a)[j])
        for k in range(len(str(b))):
                sum1 += int(str(b)[k])
        list.append(sum + sum1)
print(min(list))

Buggy submission (verdict: Runtime Error):
n = int(input())
list = []
for a in range(2,n-1):
        sum = 0
        sum1 = 0
        b = n - a
        for j in range(len(str(a))):
                sum += int(str(a)[j])
        for k in range(len(str(b))):
                sum1 += int(str(b)[k])
        list.append(sum + sum1)
print(min(list))

Buggy submission (verdict: Runtime Error):
n = int(input()
list = []
for a in range(2,n-1):
        sum = 0
        sum1 = 0
        b = n - a
        for j in range(len(str(a))):
                sum += int(str(a)[j])
        for k in range(len(str(b))):
                sum1 += int(str(b)[k])
        list.append(sum + sum1)
print(min(list))
Problem p03434 (python)

Fixed submission:
n = input()
a = map(int, input().split())
new_list = sorted(a, reverse=True)
sum = 0
for i,n in enumerate(new_list):
        if i % 2 == 0:
                sum += n
        else:
                sum -= n
print(sum)

Buggy submission (verdict: Runtime Error):
n = input()
a = map(int, input().split())
new_list = sorted(a, reverse=True)
sum = 0
for i,n in enumerate(new_list):
        if i % 2 == 0:
                sum += n
        else:
                sum -= n
print(sum)
~
Problem p03455 (python)

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

Buggy submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-

a,b = map(int, input().split())
sum = a * b
if sum % 2 == 0:
        print("Odd")
else:
        print("Even")
~
Problem p03493 (python)

Fixed submission:
#-*- coding:utf-8 -*-

a,b,c = (int(x) for x in input())
list = [a, b, c]
count = 0
for i in list:
	if i == 1:
		count += 1
print(count)

Buggy submission (verdict: Runtime Error):
s = (int(x) for i in input())
count = 0
if[i for i in s if i == 1]:
	count+=1
print(count)

Buggy submission (verdict: Runtime Error):
s = (int, input().split())
count = 0
for i in s if s==1:
	count+=1

Buggy submission (verdict: Runtime Error):
-*- coding:utf-8 -*-

a,b,c = (int(x) for x in input())
list = [a, b, c]
count = 0
for i in list:
	if i == 1:
		count += 1
print(count)

Buggy submission (verdict: Runtime Error):
-*- coding:utf-8 -*-

a,b,c = int(x) for x in input()
list = [a, b, c]
count = 0
for i in list:
	if i == 1:
		count += 1
print(count)
Problem p03658 (python)

Fixed submission:
n, k = map(int, input().split())
l = list(map(int, input().split()))
l = sorted(l, reverse=True)
sum = 0
for i in range(k):
        sum += l[i]
print(sum)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
l = list(map(int, input().split()))
l = sorted(l, reverse=True)
sum = 0
for i in range(k):
        sum += l[i]
print(sum)
~
Problem p02886 (python)

Fixed submission:
N = int(input())
d = [int(i) for i in input().split()]
ans = 0
for i in range(N):
    for j in range(i+1,N):
        ans += d[i]*d[j]
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
d = [int(i) for i in input().split()]
ans = 0
for i in range(N):
    for j in range(i+1,N):
        ans += d[i]*d[j]
print(ans
Problem p02953 (python)

Fixed submission:
N = int(input())
H = [int(i) for i in input().split()]
for i in range(N-1,0,-1):
    if(H[i] < H[i-1]):
        H[i-1] -= 1
for i in range(N-1):
    if(H[i] > H[i+1]):
        print("No")
        exit()
print("Yes")

Buggy submission (verdict: Runtime Error):
N = int(input())
H = [int(i) for i in input().split()]
for i in range(N-1):
    if(i == N-2):
        if(H[i] == H[i+1] + 1 or H[i] == H[i+1]):
            H[i] == H[i+1]
        if(H[i] <= H[i+1]):
            continue
        if(H[i] > H[i+1] + 1):
            print("No")
            exit()
    if(H[i] == H[i+1] + 1 or H[i] == H[i+1]):
        H[i] == H[i+1]
    if(H[i] <= H[i+1]):
        continue
    if(H[i] > H[i+1] + 1):
        print("No")
        exit()
    if(H[i] > H[i+1] and H[i+1] > H[i+2]):
        print("No")
        exit()
print("Yes")
Problem p02621 (python)

Fixed submission:
a=int(input())
print(a+(a**2)+(a**3))

Buggy submission (verdict: Runtime Error):
s,t=input().split()
ans=0
for i in range(len(s)):
  if s[i]!=t[i]:
    ans+=1
print(ans)
Problem p02640 (python)

Fixed submission:
x,y=map(int,input().split())
if x*2>y:
    print('No')
else:
  if y%2==1 :
    print('No')
  else:
    if x*4<y :
      print('No')
    else:
      print('Yes')

Buggy submission (verdict: Runtime Error):
x,y=map(int,input().split())
if x*2>y:
    print('No')
else:
  if y%2==1 :
    print('No')
else:
  if x*4<y :
    print('No')
else:
    print('Yes')
Problem p02645 (python)

Fixed submission:
s=input()
print(s[:3])

Buggy submission (verdict: Runtime Error):
s=input()
print(input()[:3])
Problem p02658 (python)

Fixed submission:
import numpy as np
n=int(input())
a=list(map(int,input().split()))
ans=1
if 0 in a:
    print(0)
    exit()
for i in range(n):
    ans=ans*a[i]
    if ans>10**18 and not 0 in a:
      print(-1)
      exit()
if ans>10**18:
    anscheck=False
else:
    anscheck=True
print(ans if anscheck else -1)

Buggy submission (verdict: Runtime Error):
import operator as op
n=int(input())
a=list(map(int,input().split()))
ans=reduce(operator.mul,a,1)
if ans>10**18:
    anscheck=False
else:
    anscheck=True
print(ans if anscheck else -1)
Problem p02705 (python)

Fixed submission:
r=int(input())
print(2*r*3.141592)

Buggy submission (verdict: Runtime Error):
r=int(input()
print(2*r*3.141592)
Problem p02706 (python)

Fixed submission:
n,m=map(int,input().split())
a=sum(list(map(int,input().split())))
if n-a>=0:
    print(n-a)
else:
    print(-1)

Buggy submission (verdict: Runtime Error):
n=int(input())
m=int(input())
a=list(map(int,input().split()))
print(n-sum(a))
Problem p02717 (python)

Fixed submission:
#!/usr/bin/env python3
import sys


def solve(X: int, Y: int, Z: int):
    print(Z,X,Y)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  # type: int
    Y = int(next(tokens))  # type: int
    Z = int(next(tokens))  # type: int
    solve(X, Y, Z)

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
N,K=map(int,input().split())
l=abs(N//K)
p=K*l
for i in range(1,10000):
	if abs(N-(K*(l+i)))<abs(N-p):
		p=p+i
print(abs(N-p))

Buggy submission (verdict: Runtime Error):
N=int(input())
K=int(input())
l=abs(N//K)
p=K*l
for i in range(1,10000):
	if abs(N-(K*(l+1)))<abs(N-p):
		p=p+1
print(abs(N-p))
Problem p02747 (python)

Fixed submission:
#!/usr/bin/env python3
import sys
import re

YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(S: str):
    if len(S)%2!=0:
        print("No")
        exit()
    l=S[::2];count=0;p=S[1::2]
    #if len(l)
    for i in range(len(l)):
        if l[i]=="h":
            count+=1
        if p[i]=="i":
            count+=1
    if count==len(S):
        print(YES)
    else:
        print(NO)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    solve(S)

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
import sys
import re

YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(S: str):
    if len(S)%2!=0:
        print("No")
    l=S[::2];count=0;p=S[1::2]
    for i in range(len(l)):
        if l[i]=="h":
            count+=1
        if p[i]=="i":
            count+=1
    if count==len(S):
        print(YES)
    else:
        print(NO)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    solve(S)

if __name__ == '__main__':
    main()
Problem p02993 (python)

Fixed submission:
def main():
    s = str(input())
    if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
        print('Bad')
    else:
        print('Good')
            
main()

Buggy submission (verdict: Runtime Error):
s=str(input())
if s[0]==s[1] or s[1]==s[2] or s[2]==s[3]:
	print('Bad')
    else:
    	print('Good')
Problem p03037 (python)

Fixed submission:
n,m=map(int,input().split())
L=[]
M=[]
for i in range(m):
  l,m=map(int,input().split())
  L.append(l)
  M.append(m)
  
a=max(L)
b=min(M)
if a<=b:
  print(b-a+1)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
L=[list(map(int,input().split()) for _ in range(m)]
  
a=max(L)
b=min(M)
if a<=b:
  print(b-a+1)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
l=[]
m=[]
for i in range(m):
  ll,mm=map(int,input().split())
  l.append(ll)
  m.append(mm)
a=max(l)
b=min(m)
if a<=b:
  print(b-a+1)
else:
  print(0)
Problem p03260 (python)

Fixed submission:
a,b=map(int,input().split())
for i in range(1,4):
  if (a*b*i)%2!=0:
    print("Yes")
    exit()
print("No")

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

Fixed submission:
s=str(input());a=["A","K","I","H","A","B","A","R"]
if s=="AKIHABARA":
    print("YES")
elif "K" not in s or "I" not in s or "H" not in s or "B" not in s or "R" not in s:
    print("NO")
else:
    s=list(s)
    for i in range(len(a)):
        if s[i]!=a[i]:
           s.insert(i,"A")
        #print(s,a,i)
        if s==a or s==["A","K","I","H","A","B","A","R","A"]:
            print("YES")
            break
        else:
            pass
    else:
         print("NO")

Buggy submission (verdict: Runtime Error):
s=str(input());a=["A","K","I","H","A","B","A","R"]
if s=="AKIHABARA":
    print("YES")
elif len(s)<5:
    print("NO")
else:
    s=list(s)
    for i in range(len(a)):
        if s[i]!=a[i]:
           s.insert(i,"A")
        #print(s,a,i)
        if s==a or s==["A","K","I","H","A","B","A","R","A"]:
            print("YES")
            break
        else:
            pass
    else:
         print("NO")
Problem p03624 (python)

Fixed submission:
s=input()
a=list("abcdefghijklmnopqrstuvwxyz")
for x in a:
    if x not in s:
        print(x)
        exit()
print("None")

Buggy submission (verdict: Runtime Error):
s=list(input())
if len(s)==26:
    print("None")
    exit()
a=["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=set(s)
s=list(s)
s.sort()
for i in range(26):
    if a[i]!=s[i]:
        print(a[i])
        break
else:
    print("None")
Problem p03778 (python)

Fixed submission:
w,a,b=map(int,input().split())
if a+w<b:
    print(b-a-w)
else:
  if a<=b+w and a+w>=b:
    print(0)
  else:
    print(a-b-w)

Buggy submission (verdict: Runtime Error):
w,a,b=map(int,input().split())
if a+w<b:
    print(b-a-w)
else:
  if a<=b+w and a+w>=b:
    print(0)
else:
    print(a-b-w)
Problem p03860 (python)

Fixed submission:
print("A"+input()[8]+"C")

Buggy submission (verdict: Runtime Error):
a,b,c=map(list,input().split())
print("".join("A",b[0],"C"))

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
print("A",b[0],"C")
Problem p02612 (python)

Fixed submission:
N = int(input())
n = 1000
while N > n:
    n += 1000
print(n - N)

Buggy submission (verdict: Runtime Error):
n = 1000
while N > n:
  n =+ 1000
print(N - n)
Problem p02613 (python)

Fixed submission:
N = int(input())
judge_list = []
judge = ['AC', 'WA', 'TLE', 'RE']
judge_dict = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
for i in range(N):
    judge_list.append(str(input()))
for k in judge:
    judge_dict[k] = judge_list.count(k)
print(f"AC x {judge_dict['AC']}")
print(f"WA x {judge_dict['WA']}")
print(f"TLE x {judge_dict['TLE']}")
print(f"RE x {judge_dict['RE']}")

Buggy submission (verdict: Runtime Error):
N = int(input())
judge_list = []
judge = ['AC', 'WA', 'TLE', 'RE']
for i in range(N):
    judge_list.append(str(input()))
for k in judge:
    judge_dict[k] = judge_list.count(k)
print(f"AC x {judge_dict['AC']}")
print(f"WA x {judge_dict['WA']}")
print(f"TLE x {judge_dict['TLE']}")
print(f"RE x {judge_dict['RE']}")
Problem p02639 (python)

Fixed submission:
x_list = list(map(int, input().split()))
for i in range(5):
    if x_list[i] == 0:
        print(i + 1)

Buggy submission (verdict: Runtime Error):
x_list = [input()]
for i in range(5):
  if x_list[i] == 0:
    print(i)