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

Fixed submission:
#93a
s=set(input())
x=set(list('abc'))


print('Yes' if s==x else 'No')

Buggy submission (verdict: Runtime Error):
#93b
a,b,k=map(int,input().split())
ans=range(a,b+1)
for i in sorted(set(ans[:k])):# set(ans[-k:])):
    print(i)
for i in sorted(set(ans[-k:])):
    print(i)
#print(sorted(set(ans[:k]) or set(ans[-k:])))

Buggy submission (verdict: Runtime Error):
#93b
a,b,k=map(int,input().split())
ans=range(a,b+1)
for i in sorted(set(a[:k])):
    print(i)
for i in sorted(set(a[-k:])):
    print(i)

Buggy submission (verdict: Runtime Error):
#93a
s=set(input())
x=set(lit('abc'))
print('Yes' if s-x==0 else 'No')
Problem p03386 (python)

Fixed submission:
#93b
a,b,k=map(int,input().split())
c=min(a+k,b)
for i in range(a,c):print(i)
for i in range(max(c,b-k+1),b+1):print(i)

Buggy submission (verdict: Runtime Error):
#93b
a,b,k=map(int,input().split())
ans=[]

if abs(a-b)<=k:
    for _ in range(b-a+1):
        print(a+i)
    exit()
else:
    for i in range(k):
        ans.append(a+i)
        
    for i in range(k):
        ans.append(b-k+i+1)
       
ans=set(ans)
for i in ans:
    print(i)
Problem p03408 (python)

Fixed submission:
#91b
n=int(input())
s=[input() for _ in range(n)]

m=int(input())
t=[input() for _ in range(m)]
ans=0

st=set(s+t)
for i in st:
    ans = max(s.count(i) - t.count(i) , ans)
print(ans)

Buggy submission (verdict: Runtime Error):
#91b
import collections as c

n=int(input())
b_l=sorted([input() for _ in range(n)])
b=c.Counter(b_l)
b=b.most_common()

m=int(input())
r_l=sorted([input() for _ in range(m)])
r=c.Counter(r_l)
r=r.most_common()
ans=0
i=0
while i<=m-1:
    if b[i][0]==r[i][0]:
        temp=b[0][1]-r[0][1]
        i+=1
        if temp>0:
            ans=max(temp,ans)
print(ans)
Problem p03424 (python)

Fixed submission:
#89b
n=int(input())
a=list(set(input()))
print('Three' if len(a)==4 else 'Four')

Buggy submission (verdict: Runtime Error):
#89b
n=int(input())
a=list(input())
a=set(a)
c=['P','W','G','Y']
if c-a==0:
    print('Four')
else:
    print('Three')
Problem p03469 (python)

Fixed submission:
#85a
s=input()
print('2018'+s[4:])

Buggy submission (verdict: Runtime Error):
#85b
n=int(input())
d=set([int(input()) for i in range(n) ])
print(len(d))
Problem p03478 (python)

Fixed submission:
#83b
n,a,b=map(int,input().split())
n=[str(i) for i in range(1,n+1)]
ans=0

for i in n:
    temp=[int(x) for x in list(str(i)) ]
    temp=sum(temp)
    if a<=temp<=b:
        ans+=int(i)

print(ans)

Buggy submission (verdict: Runtime Error):
#83b
n,a,b=map(int,input().split())
n=[str(i) for i in range(1,n+1)]
ans=0

for i in n:
    temp=[int(x) for x in list(str(i)) ]
    temp=sum(temp)
    if a<=temp<=b:
        ans+=i

print(ans)
Problem p03485 (python)

Fixed submission:
#82a
import math
a,b=map(int,input().split())
print(math.ceil((a+b)/2))

Buggy submission (verdict: Runtime Error):
#82b
s=sorted(list(input()))
t=sorted(list(input()))

ss=''.join(s)
tt=''.join(t)

ans=sorted([tt,ss])

if ss==tt:
    print('No')
else:
    print(['No','Yes'][ans[0]==ss])
Problem p03543 (python)

Fixed submission:
#79a
n=input()
if n[0]==n[1] and n[1]==n[2] :
    print('Yes')
elif n[1]==n[2] and n[2]==n[3] :
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
#79a
n=input().split()
if n[0]==n[1] and n[1]==n[2] :
    print('Yes')
elif n[1]==n[2] and n[2]==n[3] :
    print('Yes')
else:
    print('No')
Problem p03598 (python)

Fixed submission:
#74b
n = int(input())
k = int(input())
x = list(map(int,input().split()))
ans=0
for i in range(n):
    ans+=min(2*x[i],2*(k-x[i]))
print(ans)

Buggy submission (verdict: Runtime Error):
#74b
n = int(input())
k = int(input())
x = list(map(int,input().split()))
ans=0

for i in range(n):
    ans+=min(2*x[i],2*(k-x[i])

print(ans)
Problem p03623 (python)

Fixed submission:
#71a
x,a,b = map(int,input().split())
print('A' if abs(x-a)<abs(x-b) else 'B')

Buggy submission (verdict: Runtime Error):
#71a
x,a,b = map(int,input().split())
print('A' if abs(x-a)<(x-c) else 'B')

Buggy submission (verdict: Runtime Error):
#71a
x,a,b=map(int,input().split())
print('A' if abs(x-a)<(x-c) else 'B')
Problem p03643 (python)

Fixed submission:
#68a
n=input()
print('ABC'+ n )

Buggy submission (verdict: Runtime Error):
#68a
n=input()
pritn('ABC'+n)
Problem p03729 (python)

Fixed submission:
#60a
a,b,c = input().split()
if a[-1]==b[0] and b[-1]==c[0]:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
#60b
a,b,c =map(int,input().split())
i=0
aa=a
while i<b:
    i+=1
    if aa%b == c:
        print('YES')
        exit()
    aa+=a
print('NO')
Problem p03760 (python)

Fixed submission:
#58b
o = input()
e = input()
ans=[]
for i,j in zip(o,e):
    ans.append(i+j)
    
if len(o)>len(e):
    ans.append(o[-1])

print(''.join(ans))

Buggy submission (verdict: Runtime Error):
#58b
o = input()
e = input()
ans=[]
for i in range(len(o)):
    ans.append(o[i]+e[i])
print(''.join(ans))
Problem p03795 (python)

Fixed submission:
#55a
n = int(input())
x = 800*n
y = (n//15)*200
print(x-y)

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

for i in range(1,n+1):
    p*=i

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

Fixed submission:
#55b
n = int(input())
p=1

for i in range(1,n+1):
    p = i*p%(10**9+7)

print(p)

Buggy submission (verdict: Runtime Error):
#55b
n = int(input())
p=1

for i in range(1,n+1):
    p = p*i

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

Buggy submission (verdict: Runtime Error):
#55b
n=int(input())
p=1
for i in range(1,n+1):
    p = p*i
print(a%(10**9+7))
Problem p03827 (python)

Fixed submission:
#52b
n = int(input())
s = input()
ans = [0]

for i in s:
    if i=='I':
        ans.append(ans[-1]+1)
    else:
        ans.append(ans[-1]-1)
#print(ans)

print(max(ans))

Buggy submission (verdict: Runtime Error):
#52b
n = int(input())
s = input()
ans = [0]

for i in s:
    if s[i]=='I':
        ans.append(ans[-1]+1)
    else:
        ans.append(ans[-1]-1)

print(max(ans))
Problem p03845 (python)

Fixed submission:
#50b
#n　問題数
n = int(input())
#t 時間
t = [int(i) for i in input().split()]
#m ドリンクの種類
m = int(input())
ans = []

for i in range(m):
    a,b = map(int,input().split())
    temp = sum(t) - t[a-1] + b
    ans.append(temp)

for i in range(m):
    print(ans[i])

Buggy submission (verdict: Runtime Error):
#50b
#n　問題数
n = int(input())
#t 時間
t = [int(i) for i in input().split()]
#m ドリンクの種類
m = int(input())
ans = []
for i in range(m):
    a,b = map(int,input().split())
    temp = sum(t) - t[a-1] + b
    ans[i] = temp
for i in range(m):
    print(ans[i])
Problem p03852 (python)

Fixed submission:
#49a
s = input()
if s=='a' or s=='i' or s=='u' or s=='e' or s=='o':
    print('vowel')
else:
    print('consonant')

Buggy submission (verdict: Runtime Error):
#49a
s = input()
if s=='a' or s=='i' or s=='u' or s='e' or s='o':
    print('vowel')
else:
    print('consonant')
Problem p03860 (python)

Fixed submission:
#48a
a = list(input().split())
ans = a[0][0]+a[1][0]+a[2][0]
print(ans)

Buggy submission (verdict: Runtime Error):
a = list(input().split())
ans = a[0][0]+b[0][0]+c[0][0]
print(ans)
Problem p04030 (python)

Fixed submission:
#43b
s = list(input())
a =''

for i in s:
    if i =='0' or i =='1':
        a = a+i
    else:
        #最後の一つをスライス
        a = a[:-1]
print(a)

Buggy submission (verdict: Runtime Error):
#43b
s = list(input())
ans =''

for i in s:
    if i =='0' or i =='1':
        a+=i
    else:
        #最後の一つをスライス
        a = a[:-1]
print(a)
Problem p03261 (python)

Fixed submission:
a=int(input())
x=[]
flag=0
for i in range(a):
    s=input()
    if i==0:
        x.append(s)
        continue
    #print(s,x[i-1])
    if s in x or x[i-1][len(x[i-1])-1]!=s[0] :
        x.append("1")
        flag=1
    else:
        x.append(s)
if flag == 0:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):

n=int(input())
w=[input()]
check=True
for i in range (1,n):
    x = input()
    if x in w or w[i-1][len(x[i-1])-1]!=x[0]:
        check=False
    w.append(x)
if check:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
import sys
n=int(input())
w=[input()]
check=True
for i in range (1,n):
    x = input()
    if x in w or w[i-1][len(x[i-1])-1]!=x[0]:
        check=False
    w.append(x)
if check:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
a=int(input())
x=[].append(input())
flag=0
for i in range(1,a):
    s=input()
    if s in x or x[i-1][len(x[i-1])-1]!=s[0] :
        x.append("1")
        flag=1
    else:
        x.append(s)
if flag == 0:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
import sys
n=int(input())
w=[].append(input())

check=True
for i in range (1,n-1,1):
    x = input()
    print(w)
    if x in w or x[0]!=w[i-1][len(w[i-1])-1]:
        check=False
        w.append("0")
    else:
        w.append(x)
if check:
    print('YES')
else:
    print('NO')
Problem p03264 (python)

Fixed submission:
n = int(input())
if n&1==0:
    print((n//2)**2)
else:
    print((n//2)*(n//2+1))

Buggy submission (verdict: Runtime Error):
if val1 % 2 == 0:
        print(int((val1 // 2) * (val1 // 2)))
    else:
        val1 = val1 + 1
        print(int(((val1 // 2) * (val1 // 2)) - (val1 // 2)))

Buggy submission (verdict: Runtime Error):
    if n & 1 == 0:
        print((n // 2) ** 2)
    else:
        print((n // 2) * (n // 2 + 1))

Buggy submission (verdict: Runtime Error):
    if val1 % 2 == 0:
        print(int((val1 // 2) * (val1 // 2)))
    else:
        val1 = val1 + 1
        print(int(((val1 // 2) * (val1 // 2)) - (val1 // 2)))

Buggy submission (verdict: Runtime Error):
    if val1 % 2 == 0:
        print(int((val1 / 2) * (val1 / 2)))
    else:
        val1 = val1 + 1
        print(int(((val1 / 2) * (val1 / 2)) - (val1 / 2)))

Buggy submission (verdict: Runtime Error):
aa

Buggy submission (verdict: Runtime Error):
    if val1 % 2 == 0:
        print(int((val1 / 2) * (val1 / 2)))
    else:
        val1 = val1 + 1
        print(int(((val1 / 2) * (val1 / 2)) - (val1 / 2)))

Buggy submission (verdict: Runtime Error):
val1=int(input())
if val1%2==0:
    print((val1/2)*(val1/2))
else:
    val1=val1+1
    print(((val1/2)*(val1/2))-(val1/2)

Buggy submission (verdict: Runtime Error):
k=input()  
odd=1
even=0
for i in range(2,k+1): 
     if i%2==0:
        even+=1
     else:
           odd+=1
print(odd*even)
Problem p03239 (python)

Fixed submission:
N,T=map(int,input().split())
l=[]
for i in range(N):
    c,t=map(int,input().split())
    if t <= T:
        l.append(c)
if not l:
    print("TLE")
else:
    print(min(l))

Buggy submission (verdict: Runtime Error):
N,T=map(int,input().split())
l=[]
for i in range(N):
    c,t=map(int,input().split())
    if t < T:
        l.append(c)
if l =[]:
    print("TLE")
elif:
    print(min(l))
Problem p03433 (python)

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

Buggy submission (verdict: Runtime Error):
n1 = int(input())
n2 = int(input())
 
if n1%500<n2:
  print(Yes)
else:
  print(No)

Buggy submission (verdict: Runtime Error):
n1 = input()
n2 = input()

if n1%500<n2:
  print(Yes)
else:
  print(No)
Problem p03434 (python)

Fixed submission:
N=int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
S=0
for i in range(N):
  if i%2==0:
    S+=a[i]
  else:
    S-=a[i]
print(S)

Buggy submission (verdict: Runtime Error):
N=int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)

for i in range(N):
  if i%2==1:
    S+=a[i]
  else:
    S-=a[i]
print(S)

Buggy submission (verdict: Runtime Error):
N=int(input())
a = list(map(int, input().split()))
a2= sorted(a,reverse=True)

for i in range(N):
  if i%2==1:
    S+=a2[i]
    a.remove(max(a))
  else:
    S-=a2[i]
print(S)

Buggy submission (verdict: Runtime Error):
N=int(input())
a = list(map(int, input().split()))
a2= sort(a,reverse=True)

for i in range(N):
  if i%2==1:
    S+=a2[i]
    a.remove(max(a))
  else:
    S-=a2[i]
print(S)

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

for i in range(N):
  if i%2==1:
    S+=max(a)
    a.remove(max(a))
  else:
    S-=max(a)
    a.remove(max(a))
print(S)

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

for i in range(N):
  if i%2=1:
    S+=max(a)
    a.remove(max(a))
  else:
    S-=max(a)
    a.remove(max(a))
print(S)

Buggy submission (verdict: Runtime Error):
N=int(input())
a=input().split()
a2=sorted(a,reverse=True)
b1=a2[1::2]
b2=a2[0::2]
alice=sum(b1)
bob=sum(b2)
print(alice-bob)

Buggy submission (verdict: Runtime Error):
N=int(input())
a=input().split()
a2=sorted(a,reverse=True)
alice=sum(a2[1::2])
bob=sum(a2[0::2])
print(alice-bob)

Buggy submission (verdict: Runtime Error):
N=int(input())
a=input().split()
alice=0
bob=0

a2=sorted(a,reverse=true)

alice=sum(a2[1::2])
bob=sum(a2[0::2])
print(alice-bob)

Buggy submission (verdict: Runtime Error):
N=int(input())
a=input().split()
alice=0
bob=0
while len(a) !=0:
  alice+=max(a)
  a.remove(max(a))
  if len(a) !=0:
    bob+=max(a)
    a.remove(max(a))
  else: break
print(alice-bob)

Buggy submission (verdict: Runtime Error):
N=int(input())
a=input().split()
alice=0
bob=0
while len(a) !=0:
  alice+=max(a)
  a.remove(max(a))
  bob+=max(a)
  a.remove(max(a))
print(alice-bob)

Buggy submission (verdict: Runtime Error):
N=int(input())
a=input().split()
alice=0
bob=0
while len(a) !=0:
  alice+=max(a)
  a.remove(max(a))
  bob+==max(a)
  a.remove(max(a))
print(alice-bob)

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

while len(a) !=0:
  alice+=max(a)
  a.remove(max(a))
  bob+==max(a)
  a.remove(max(a))
print(alice-bob)
Problem p03574 (python)

Fixed submission:
h,w=map(int,input().split())
s=[input() for _ in range(h)]
for i in range(h):
    l=""
    for j in range(w):
        if s[i][j]=="#":
            l+="#"
        else:
            l+=str(sum([t[max(0,j-1):min(w,j+2)].count("#") for t in s[max(0,i-1):min(h,i+2)]]))
    print(l)

Buggy submission (verdict: Runtime Error):
h,w=map(int,input().split())
s=[input() for _ in range(h)]
for i in range(h):
  l = ""
  for j in range(w):
    if s[i][j] == "#":
      l += "#"
    else:
      l += sum(s[t][max(0,j-1):min(w,j+2)].count("#") for t in [max(0,i-1):min(h,i+2)])
print(l)
Problem p03238 (python)

Fixed submission:
N = int(input())

if N == 1 :
    print( 'Hello World' )
else :
    A = int(input())
    B = int(input())
    print( A + B )

Buggy submission (verdict: Runtime Error):
N,T = map(int,input().split())
back=[]

for i in range(N):
    a,b = map(int,input().split())
    if b >= T:
        back.append(a)

if len(back) == 0:
    print('TLE')
else:
    print(min(back))
Problem p03609 (python)

Fixed submission:
# coding: utf-8

s = input().split()

x = int(s[0])
t = int(s[1])

if (x - t) < 0 : 
    print(0) 
else :
    print(x - t)

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

x = int(input())
t = int(input())

1<= x <=10^99
1<= t <=10^99

if (x - t) < 0 : 
    print(0) 
else :
    print(x - t)
Problem p03378 (python)

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

    cost_move_to_left = 0
    cost_move_to_right = 0
    for i in a:
        if i > x:
            cost_move_to_left += 1
        elif i < x:
            cost_move_to_right += 1

    print(cost_move_to_left if cost_move_to_left < cost_move_to_right else cost_move_to_right)



if __name__ == '__main__':
    main()

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

    c = n // 2
    for i in range(n):
        if i < c:
            print(a[c])
        else:
            print(a[c - 1])


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

Fixed submission:
a = int(input())
if a == 1:
    print("Hello World")
else:
    b = int(input())
    c = int(input())
    print('{}'.format(b+c))

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
kouyaku_max = m // n
kouyaku = 1
for i in range(min(kouyaku_max,int(m**0.5)),0,-1):
    if ((m % (i) == 0) and (n*i <= m)):
        kouyaku = i
        break

print('{}'.format(kouyaku))

Buggy submission (verdict: Runtime Error):
a = int(input())
if a == 1:
    print("Hello World")
else:
    b, c = map(int, input().split())
    print('{}'.format(b+c))
Problem p03773 (python)

Fixed submission:
a, b = map(int, input().split())
c = a + b
if c < 24:
    print(c)
else:
    print(c - 24)

Buggy submission (verdict: Runtime Error):
a, b = int(input().split())
c = a + b
if c <= 24:
    print(c)
else:
    print(c - 24)

Buggy submission (verdict: Runtime Error):
a, b = int(input().split())
print(a)
c = a + b
if c <= 24:
    print(c)
else:
    print(c - 24)
Problem p03796 (python)

Fixed submission:
input_len = int(input())
ans = 1
for i in range(1, input_len+1):
    ans = (i * ans) % (10 ** 9 + 7)

print(ans)

Buggy submission (verdict: Runtime Error):
input_len = input()
ans = 1
for i in range(1, input_len+1):
    ans *= i

ans = ans % (10 ** 9) + 7
print(ans)
Problem p03261 (python)

Fixed submission:
n = int(input())
word = []
for i in range(n):
	word.append(input())

if len(word) != len(set(word)):
	print("No")
	exit()

for i in range(1,len(word)):
	if word[i-1][-1] != word[i][0]:
		print("No")
		exit()

print("Yes")

Buggy submission (verdict: Runtime Error):
n = int(input())
word = []
for i in range(n):
	word.append(input())

if is_unique(word) == False:
	print("No")
	exit()

for i in range(1,len(word)):
	if word[i-1][-1] != word[i][0]:
		print("No")
		exit()

print("Yes")

Buggy submission (verdict: Runtime Error):
n = int(input())
word = []
for i in range(n):
	word.append(input())

if is_unique(word) == False:
	print("No")
	exit()

for i in range(1,len(word)):
	if word[i-1][-1] != word[i][-1]:
		print("No")
		exit()

print("Yes")
Problem p03262 (python)

Fixed submission:
n,x = map(int, input().split())
city = []
sub = []
city = list(map(int, input().split()))

for i in range(len(city)):
	sub.append(abs(x - city[i]))

def gcd(a,b):
	if b == 0:
		return a
	return gcd(b, a%b)


if len(sub) == 1:
	print(sub[0])
elif len(sub) == 2:
	print(gcd(sub[0],sub[1]))
else:
	p = gcd(sub[0], sub[1])
	for i in range(2,len(sub)):
		p = gcd(p,sub[i])
	print(p)

Buggy submission (verdict: Runtime Error):
n,x = map(int, input().split())
city = []
sub = []
city = list(map(int, input().split()))

for i in range(len(city)):
	sub.append(abs(x - city[i]))


def gcd(a,b):
	if b == 0:
		return a
	return gcd(b, a%b)


if sub == 1:
	print(sub[0])
elif sub == 2:
	print(gcd(sub[0],sub[1]))
else:
	p = gcd(sub[0], sub[1])
	for i in range(2,len(sub)):
		p = gcd(p,sub[i])
	print(p)

Buggy submission (verdict: Runtime Error):
n,x = map(int, input().split())
city = []
sub = []
city = list(map(int, input().split()))

for i in range(len(city)):
	sub.append(abs(x - city[i]))

def gcd(a,b):
	if b == 0:
		return a
	return gcd(b, a%b)

p = gcd(sub[0], sub[1])
if sub == 1:
	print(sub[0])
elif sub == 2:
	print(gcd(sub[0],sub[1]))
else:
	for i in range(2,len(sub)):
		ans = gcd(p,sub[i])
		p = ans
	print(p)

Buggy submission (verdict: Runtime Error):
n,x = map(int, input().split())
city = []
sub = []
city = list(map(int, input().split()))

for i in range(len(city)):
	sub.append(abs(x - city[i]))

def gcd(a,b):
	if b == 0:
		return a
	return gcd(b, a%b)

p = gcd(sub[0], sub[1])
for i in range(2,len(sub)):
	ans = gcd(p,sub[i])
	p = ans

print(p)

Buggy submission (verdict: Runtime Error):
n,x = map(int, input().split())
city = []
sub = []
city = list(map(int, input().split()))

for i in range(len(city)):
	sub.append(abs(x - city[i]))

def gcd(a,b):
	if b == 0:
		return a
	return gcd(b, a%b)

p = gcd(sub[0], sub[1])
for i in range(2,len(sub)):
	ans = gcd(p,sub[i])

print(ans)

Buggy submission (verdict: Runtime Error):
n,x = map(int, input().split())
city = []
sub = []
city = list(map(int, input().split()))

for i in range(len(city)):
	sub.append(abs(x - city[i]))

def gcd(a,b):
	if b == 0:
		return a
	return gcd(b, a%b)

for i in range(1,len(sub)):
	ans = gcd(sub[i-1], sub[i])

print(ans)
Problem p03285 (python)

Fixed submission:
N = int(input())
ans = "No"

for i in range(100):
    for j in range(100):
        if i*7+j*4==N:
            ans = "Yes"
            
print (ans)

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

for i in range(100):
	for j in range(100):
		if i*7+j*4 == N:
			ans = "Yes"

print(ans)
Problem p03288 (python)

Fixed submission:
r = int(input())

if r < 1200:
	print("ABC")
elif r < 2800:
	print("ARC")
else:
	print("AGC")

Buggy submission (verdict: Runtime Error):
s = input()
text = s[2:-1]
r = s.replace('A', '')
r = r.replace('C', '')

if s[0] != 'A' pr text.count('C') != 1 or r != r.lower():
	print('WA')
	exit()

print('AC')

Buggy submission (verdict: Runtime Error):
s = input()
a = False
b = False
c = False
cnt = 0
k = 0

if s[0] == 'A':
	a = True

for c in range(s[2],s[-1]):
	if c == 'C':
		cnt += 1
if cnt == 1:
	b = True

for c in s:
	if c != 'A' or c != 'C':
		if c.islower() == True:
			k += 1

if k == len(s):
	c = True


if a == b == c == True:
	print("AC")
else:
	print("WC")
Problem p03289 (python)

Fixed submission:
s = input()
text = s[2:-1]
r = s.replace('A', '')
r = r.replace('C', '')

if s[0] != 'A' or text.count('C') != 1 or r != r.lower():
    print('WA')
else:
	print('AC')

Buggy submission (verdict: Runtime Error):
s = input()
a = False
b = False
c = False
cnt = 0
k = 0

if s[0] == 'A':
	a = True

for c in range(s[2],s[-1]):
	if c == 'C':
		cnt += 1
if cnt == 1:
	b = True

for c in s:
	if c != 'A' or c != 'C':
		if c.islower() == True:
			k += 1

if k == s.length():
	c = True


if a == b == c == True:
	print("AC")
else:
	print("WC")
Problem p03243 (python)

Fixed submission:
N=int(input())
Y=[111,222,333,444,555,666,777,888,999]
for i in range(9):
  if N<=Y[i]:
    print(Y[i])
    break

Buggy submission (verdict: Runtime Error):
N=input()
Y=[111,222,333,444,555,666,777,888,999]
for i in range(9):
  if N<=Y[i]:
    print(Y[i])
    break
Problem p03238 (python)

Fixed submission:
a=int(input())
if a == 1:
  print("Hello World")
elif a == 2:
  A = int(input())
  B = int(input())
  print(A+B)

Buggy submission (verdict: Runtime Error):
a=int(input())
if a = 1:
  print("Hello World")
elif a = 2:
  A = int(input())
  B = int(input())
  print(A+B)
Problem p03447 (python)

Fixed submission:
x = int(input())
a = int(input())
b = int(input())

x -= a
x -= (int)(x/b)*b

print(x)

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

x -= a
x -= (int)(x/b)*b

print(x)
Problem p03238 (python)

Fixed submission:
n = int(input())

if n==1:
	print('Hello World')
else:
	a = int(input())
	b = int(input())
	print(a + b)

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

if n==1:
	print('Hello World')
else:
	a = input()
	b = input()
	print(a + b)