qyliang/CodeNanoFix huggingface dataset:
Buggy code:
a,b=map(int,input().split())
if a*500 > b:
    print('Yes')
else:
    print('No')

Fixed code:
a,b=map(int,input().split())
if a*500 >= b:
    print('Yes')
else:
    print('No')
Buggy code:
k, x = map(int, input())
if (500*k) >= x:
  print("Yes")
else:
  print("No")

Fixed code:
k, x = map(int, input().split())

if k * 500 >= x:
    print("Yes")
else:
    print("No")
Buggy code:
K, X = map(int, input().split())
print('Yes' if 500 * X >= K else 'No')

Fixed code:
K, X = map(int, input().split())

if(500*K >= X):
    print("Yes")
else:
    print("No")
Buggy code:
K , X = map(int,input().split())

if K * 500 >= X:
  print("Yes")
else print("No")

Fixed code:
K, X = map(int, input().split())

if K*500 >= X:
	print("Yes")
else:
	print("No")
Buggy code:
n, m = map(int, input().split())

if 500 * n > m:
    print("Yes")
else:
    print("No")

Fixed code:
n, m = map(int, input().split())
 
if 500 * n >= m:
    print("Yes")
else:
    print("No")
Buggy code:
# https://atcoder.jp/contests/abc150/tasks/abc150_a

def read_int_n(): return list(map(int, input().split()))

K, X = read_int_n()

if K*500 > X:
    print("Yes")
else:
    print("No")

Fixed code:
# https://atcoder.jp/contests/abc150/tasks/abc150_a

def read_int_n(): return list(map(int, input().split()))

K, X = read_int_n()

if K*500 >= X:
    print("Yes")
else:
    print("No")
Buggy code:
K,X = map(int,input().split())
if K*500>X:
  print("Yes")
else:
  print("No")

Fixed code:
K,X= map(int,input().split())

if 500 * K >= X:
    print("Yes")
else:
    print("No")
Buggy code:
K,X = map(int, input().split())
print("Yes") if 500*K>X else print("No")

Fixed code:
K,X=map(int,input().split())
summ=500*K
if(summ>=X):
  print('Yes')
else:
  print('No')
Buggy code:
K,X = (int(x) for x in input().split())
if K*500 > X:
    print('Yes')
else:
    print('No')

Fixed code:
K,X = (int(x) for x in input().split())
if K*500 >= X:
    print('Yes')
else:
    print('No')
Buggy code:
X,K= input().split()

if 500 * K >= X:
    print('Yes')
else:
    print('No')

Fixed code:
K,X= map(int,input().split())

if 500 * K >= X:
    print('Yes')
else:
    print('No')
Buggy code:
n, k = map(int,input().spllit())

if n * 500 >= k :
    print("Yes")
else:
    print("No")

Fixed code:
n,k=map(int,input().split())
if n*500>=k:
    print("Yes")
else:
    print("No")
Buggy code:
k, x = map(int,input().split())
if 500*k<x:
    print("Yes")
else:
    print("No")

Fixed code:
k, x = map(int,input().split())
if 500*k<x:
    print("No")
else:
    print("Yes")
Buggy code:
import sys
bbn=1000000007
	
#+++++

		
def main():
	n, k = map(int, input().split())
	ret='Yes' if 500*n > k else 'No'
		
	print(ret)
	
	
#+++++
isTest=False

def pa(v):
	if isTest:
		print(v)

if __name__ == "__main__":
	if sys.platform =='ios':
		sys.stdin=open('inputFile.txt')
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)

Fixed code:
import sys
bbn=1000000007
	
#+++++

		
def main():
	k, x = map(int, input().split())
	ret='Yes' if 500*k >= x else 'No'
		
	print(ret)
	
	
#+++++
isTest=False

def pa(v):
	if isTest:
		print(v)

if __name__ == "__main__":
	if sys.platform =='ios':
		sys.stdin=open('inputFile.txt')
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)
Buggy code:
k,x = input().split()
if k*500 >= x:
  print("Yes")
else:
  print("No")

Fixed code:
k,x = input().split()
if int(k)*500 >= int(x):
  print("Yes")
else:
  print("No")
Buggy code:
N,M = (int(x) for x in input().split())

if N*5 > = M:
  print('Yes')
else:
  print('No')

Fixed code:
N,M = (int(x) for x in input().split())
 
if N*500 >= M:
  print('Yes')
else:
  print('No')
Buggy code:
K, X = map(int, input().split())
if 500 * K >= X:
    print('Yse')
else:
    print('No')

Fixed code:
K,X=map(int, input().split())
if 500*K >= X:
    print('Yes')
else:
    print('No')
Buggy code:
import sys
row = sys.stdin.readline

def read_ints(row):
    return list(map(int, row().split()))
  
K,X = read_ints(row)
print("Yes" if K * X >=  2000 else "No")

Fixed code:
import sys
row = sys.stdin.readline

def read_ints(row):
    return list(map(int, row().split()))
  
K,X = read_ints(row)
print("Yes" if K * 500 >=  X else "No")
Buggy code:
k, x = input().split("")
k = int(k)
x = int(x)
if 500*k >= x:
  print('Yes')
else:
  print('No')

Fixed code:
k, x = map(int, input().split())

if (500 * k) >= x:
  print('Yes')
else:
  print('No')
Buggy code:
K, X = map(int, input().split())

if (500 * X) >= K:
    print('Yes')
else:
    print('No')


Fixed code:
#A
K,X=map(int,input().split())

if K*500>=X:
  print('Yes')
else:
  print('No')
Buggy code:
K, X = map(int, input().split())

if (500 * x) >= K:
    print('Yes')
else:
    print(('No')


Fixed code:
K, X = map(int, input().split())

if K*500 >= X:
    ans = 'Yes'
else:
    ans = 'No'

print(ans)
Buggy code:
num = int(input()).split()
if num[0] * 500 > num[1]: print("Yes")
else: print("No")

Fixed code:
num = input().split()
if int(num[0])*500 >= int(num[1]):
    print("Yes")
else: 
    print("No")
Buggy code:
from sys import stdin

a, b = stdin.readline().rstrip().split()

if a*500 >= b:
    print('Yes')
else:
    print("No")


Fixed code:
from sys import stdin

a, b = stdin.readline().rstrip().split()

if int(a)*500 >= int(b):
    print('Yes')
else:
    print("No")
Buggy code:
k,x=map(int,input().split())

if 500*k>x:
  print('Yes')
else:
  print('No')

Fixed code:
k,x  = map(int,input().split())
ans = "Yes"if k*500 >=x else "No"
print(ans)
Buggy code:
K, X = map(int, input().split())
print("Yes" if 500*K > = X else "No")


Fixed code:
K, X = map(int, input().split())

if 500 * K >= X:
    ans = 'Yes'
else:
    ans = 'No'

print(ans)
Buggy code:
K, X = map(int, input().split())
if 500*K > X:
    print('Yes')
else:
    print('No')

Fixed code:
K, X = map(int, input().split())
if X <= 500*K:
    print('Yes')
else:
    print('No')
Buggy code:
K, X = map(int, input().split())
print("Yes" if 500*K > = 2000 else "No")

Fixed code:
K, X = map(int, input().split())

if K*500 >= X:
  print('Yes')
else:
  print('No')
Buggy code:
k,x=map(int,input().split())
if k >= x:
  print("Yes")
else:
  print("No")

Fixed code:
k,x=map(int,input().split())
if k * 500 >= x:
  print("Yes")
else:
  print("No")
Buggy code:
K, X = list(map(int,input().split()))

def main():
    coin = 500
    if x <= coin*K:
        print("Yes")

    else:
        print("No")

if __name__ == "__main__":
    main()


Fixed code:
K, X = list(map(int,input().split()))

def main():
    coin = 500
    if X <= coin*K:
        print("Yes")

    else:
        print("No")

if __name__ == "__main__":
    main()
Buggy code:
K,X = map(int, input().split())
v = 500 * K
if s >= X:
    print("Yes")
else:
    print("No")


Fixed code:
K,X = map(int,input().split())
if 500 * K >= X :
    print('Yes')
else :
    print('No')
Buggy code:
K,X=map(int,raw_input().split())
if K*500>=X:
  print "Yes"
else:
  print "No"

Fixed code:
K, X = map(int, input().split())

if (K*500 >= X):
    print("Yes")
else :
    print("No")
Buggy code:
K, X = map(int, input().split())

if 500 * X >= X:
    print("Yes")
else:
    print("No")

Fixed code:
K, X = list(map(int, input().split()))

if 500 * K >= X:
    print('Yes')
else:
    print('No')
Buggy code:
a,x=map(int, input().split())

if(a*500>=X):
    print('Yes')
else:
    print('No')


Fixed code:
a,X=map(int, input().split())

if(a*500>=X):
    print('Yes')
else:
    print('No')
Buggy code:
k, x = map(int, input().split())
cost=500*k
if x >=cost:
    print("Yes")
else:
    print("No")

Fixed code:
k, x = map(int, input().split())

if 500*k >= x:
    print('Yes')
else:
    print('No')
Buggy code:
K, X = map(int, input().split())
k = K * 500
if k > X:
  print('Yes')
else:
  print('No')

Fixed code:
K,X = map(int, input().split())
if K * 500 >= X:
    print("Yes")
else:
    print("No")
Buggy code:
a, b = map(int, input().split())
money = 500 * a
if money <= b:
  print('Yes')
else:
  print('No')

Fixed code:
a, b = map(int, input().split())
money = 500 * a
if money >= b:
  print('Yes')
else:
  print('No')
Buggy code:
k, x = map(int,input().split())
if 500*k > x:
  print('Yes')
else:
  print('No')

Fixed code:
k, x = map(int,input().split())
if 500*k >= x:
  print('Yes')
else:
  print('No')
Buggy code:
(K, X) = list(map(int, input().split()))

if (K * 500) > K:
    print("Yes")
else:
    print("No")

Fixed code:
(K, X) = list(map(int, input().split()))

if (K * 500) >= X:
    print("Yes")
else:
    print("No")
Buggy code:
import sys; readline = sys.stdin.readline
from collections import deque

k, x = map(int, readline().split())

if k * 500 >= x:
    print('yes')
else:
    print('No')

Fixed code:
import sys; readline = sys.stdin.readline
from collections import deque

k, x = map(int, readline().split())

if k * 500 >= x:
    print('Yes')
else:
    print('No')
Buggy code:
k, x = map(int, input().split())

n = k * 500

if n = > x:
  print('Yes')
else:
  print('No')

Fixed code:
k, x = map(int, input().split())

if 500 * k >= x:
    print('Yes')
else:
    print("No")
Buggy code:
K,X = map(int, input().split())
print("Yes") if 500*X > K else print("No")

Fixed code:
K, X = map(int, input().split())
print("Yes") if 500 * K >= X else print("No")
Buggy code:
a,b = map(int, input().split())
if a * 500 > b:
  print("Yes")
else:
  print("No")

Fixed code:
a,b = map(int, input().split())
if a * 500 >= b:
  print("Yes")
else:
  print("No")
Buggy code:
K, X = map(int,input().split())
if 500 * K > X:
    print("Yes")
else:
    print("No")

Fixed code:
K, X = map(int,input().split())

if (K*500) >= X:
    print("Yes")
else:
    print("No")
Buggy code:
k, x = map(int, input().split())
if 500 * k > x:
  print("Yes")
else:
  print('No')

Fixed code:
k, x = map(int, input().split())
if 500 * k >= x:
  print("Yes")
else:
  print('No')
Buggy code:
N = int(input())
S = str(input())
count = 0
for i in range(N-2):
    if S[i] == A and S[i+1] == B ans S[i+2] == C:
        count += 1
print(count)

Fixed code:
N = int(input())
S = str(input())
count = 0
for i in range(N-2):
    if S[i] == "A" and S[i+1] == "B" and S[i+2] == "C":
        count += 1
print(count)
Buggy code:
n = int(input())
s = input()

ans = 0
for i in range(n):
    if s[i:i+2] == 'ABC':
        ans += 1

print(ans)

Fixed code:
n = int(input())
s = input()
 
ans = 0
for i in range(n - 2):
    if s[i:i+3] == 'ABC':
        ans += 1

print(ans)
Buggy code:
a=int(input())
b=input()
for 
for i in range(a-2):
	if b[a:a] == "A":
		if b[a+1:a+1] == "B":
			if b[a+2:a+2] == "C":
				sum+=1
			pass
		pass
	pass
print(sum)


Fixed code:
a=int(input())
b=input()
sum=0
for i in range(a-2):
	if b[i:i+1] == "A":
		if b[i+1:i+2] == "B":
			if b[i+2:i+3] == "C":
				sum+=1
			pass
		pass
	pass
print(sum)
Buggy code:
A=int(input())
B=input().split()
print(B.count("ABC"))


Fixed code:
A=int(input())
B=input()
print(B.count("ABC"))
Buggy code:
_ = input()
S = input()
print(len(S.split("ABC") - 1)

Fixed code:
_ = input()
S = input()
print(len(S.split("ABC")) - 1)
Buggy code:
N = int(input())
S = [i for i in range(N)]
cnt = 0

for i in range(0, N-2):
  if S[i]=='A' and S[i+1]=='B' and S[i+2]=='C':
    cnt+=1

print(cnt)

Fixed code:
N = int(input())
S = input()
S = [i for i in S]
cnt = 0

for i in range(0, N-2):
    if S[i]=='A' and S[i+1]=='B' and S[i+2]=='C':
        cnt+=1

print(cnt)
Buggy code:
n = int(input())
s = input()

query = 'ABC'
ans = 0
i = 0 
while i<n:
  i = s.find(query,i)
  print(i)
  if i>=0:
    ans +=1
    i+=1
  else:
    break    

print(ans)    

Fixed code:
n = int(input())
s = input()

query = 'ABC'
ans = 0
i = 0 
while i<n:
  i = s.find(query,i)  
  if i>=0:
    ans +=1
    i+=1
  else:
    break    

print(ans)
Buggy code:
n = int(input())
s = input()
cnt = 0
for i in range(0, n-2):
    if s[i:i+3] == "ABC":
        cnt += 1
    print(i)
print(cnt)

Fixed code:
n = int(input())
s = input()
cnt = 0
for i in range(0, n-2):
    if s[i:i+3] == "ABC":
        cnt += 1
print(cnt)
Buggy code:
N = int(input())
S = input()

ans = 0

for i in range(N-2):
    if S[i] == "A" and S[i+1] == "B" and S[i+2] == "C":
        ans = ans + 1
          

Fixed code:
N = int(input())
S = input()

ans = 0

for i in range(N-2):
    if S[i] == "A" and S[i+1] == "B" and S[i+2] == "C":
        ans = ans + 1
    
print(ans)
Buggy code:
N=list(input())
ans=0
for i in range(len(N)-2):
  if N[i]=='A':
    if N[i+1]=='B':
      if N[i+2]=='C':
        ans=ans+1
print(N)        

Fixed code:
M=int(input())
N=list(input())
ans=0
for i in range(len(N)-2):
  if N[i]=='A':
    if N[i+1]=='B':
      if N[i+2]=='C':
        ans=ans+1
print(ans)
Buggy code:
N = int(input())
S = input()

ans = 0
str_list = list(S)

for i in range (len(str_list)-2):
  if(str_list[i] == "A"):
    if(str_list[i+1] == "B"):
      if(str[i+2] == "C"):
        ans += 1

print(ans)

Fixed code:
N = int(input())
S = input()

ans = 0
str_list = list(S)

for i in range (len(str_list)-2):
  if(str_list[i] == "A"):
    if(str_list[i+1] == "B"):
      if(str_list[i+2] == "C"):
        ans += 1

print(ans)
Buggy code:
#!/usr/bin/env python
def main():
    S = input()    
    ans = 0
    for i in range(len(S) - 2):
        if S[i: i+3] == "ABC":
            ans += 1
    print(ans)

if __name__ == '__main__':
    main()



Fixed code:
#!/usr/bin/env python
def main():
    N = int(input())
    S = input()    
    ans = 0
    for i in range(len(S) - 2):
        if S[i: i+3] == "ABC":
            ans += 1
    print(ans)

if __name__ == '__main__':
    main()
Buggy code:
N = int(input())
S = input()

ans = 0
for i in range(N-2):
  if S[i:i+2] == 'ABC': ans += 1
    
print(ans)

Fixed code:
N = int(input())
S = input()
 
ans = 0
for i in range(N-2):
  if S[i:i+3] == 'ABC': ans += 1
    
print(ans)
Buggy code:
n = input()
s = input()
x = 0
for i in range(n - 2)
	if s[i:3] == "ABC"
  		x += 1

Fixed code:
n = int(input())
s = input()
x = 0

for i in range(n-2):
    if s[i:i+3] == "ABC":
        x += 1

print(x)
Buggy code:
for i in range(0,n-2):
    if s[i] == 'A':
        if s[i+1] == 'B':
            if s[i+2] == 'C':
                c += 1
        
print(c)

Fixed code:
n = int(input())
s = input()

c = 0

for i in range(0,n-2):
    if s[i] == 'A':
        if s[i+1] == 'B':
            if s[i+2] == 'C':
                c += 1
        
print(c)
Buggy code:
n=int(input())
s = list(input())
cnt=0
for i in range(n-2):
    print(s[i:i+3])
    if s[i:i+3] ==['A', 'B', 'C']:
        
        cnt+=1
print(cnt)

Fixed code:
n=int(input())
s = list(input())
cnt=0
for i in range(n-2):
    
    if s[i:i+3] ==['A', 'B', 'C']:
        
        cnt+=1
print(cnt)
Buggy code:
N=int(input())
S=input()
S.count('ABC')

Fixed code:
N = int(input())
S=input()
print(S.count('ABC'))
Buggy code:
n=int(input())
s=list(input())
d=0
for i in range(n):
  if n-i>=2:
    
    if s[i]=='A' and s[i+1]=='B' and s[i+2]=='C':
      d+=1
  
print(c)    


Fixed code:
n=int(input())
s=list(input())
d=0
for i in range(n):
  if n-(i+1)>=2:
    if s[i]=='A' and s[i+1]=='B' and s[i+2]=='C':
      d+=1
  else:
    pass
print(d)
Buggy code:
n=int(input())
s=input()
s.replace('ABC','a')
print(s.count('a'))

Fixed code:
n=int(input())
s=input()
t=s.replace('ABC','a')
print(t.count('a'))
Buggy code:
n = int(input())
words = input()

count ≒ 0
for i in range(n - 2):
  if words[i] == 'A':
    if words[i + 1] == 'B':
      if words[i + 2] == 'C':
        count += 1
print(count)

Fixed code:
n = int(input())
words = input()

count = 0
for i in range(n - 2):
  if words[i] == 'A':
    if words[i + 1] == 'B':
      if words[i + 2] == 'C':
        count += 1
print(count)
Buggy code:
N = int(input())
S = input()
cut = 0
for n in range(N+1):
    if S[n] == 'A' and S[n + 1] == 'B' and S[n + 2] == 'C':
        cut += 1

print(cut)

Fixed code:
N = int(input())
S = input()
cut = 0
for n in range(N - 2):
    if S[n] == 'A' and S[n + 1] == 'B' and S[n + 2] == 'C':
        cut += 1

print(cut)
Buggy code:
n = int(input())
s = input()

for i in range(n - 2):
    if s[i] == 'A' and s[i + 1] == 'B' and s[i + 2] == 'C':
        count += 1
print(count)


Fixed code:
n = int(input())
s = input()
count = 0

for i in range(n - 2):
    if s[i] == 'A' and s[i + 1] == 'B' and s[i + 2] == 'C':
        count += 1

print(count)
Buggy code:
N = int(input())
S = input()
ans = 0
for i in range(N - 2):
    if S[i] == "A" and [i + 1] == "B" and S[i + 2] == "C":
        ans += 1
print(ans)

Fixed code:
N = int(input())
S = input()
count = 0
for i in range(N-2):
    if S[i] == "A" and S[i+1] == "B" and S[i+2] == "C":
        count += 1
print(count)
Buggy code:
total = int(input())
text = input()

res = 0

for x in range(0, total-1):
  if x == "A":
    if x+2 =< total:
      if text[x+1] == "B" and text[x+2] == "C":
        res += 1
      
print(res)

Fixed code:
total = int(input())
text = input()

res = 0

if total >= 3:
    for x in range(0, total - 1):
        if text[x] == "A":
            if x + 3 <= total:
                if text[x + 1] == "B" and text[x + 2] == "C":
                    res += 1

print(res)
Buggy code:
N=int(input())
A=input()

i=0
ans=0
while(True):
  if i>N-3:
    break
  if A[i]=='A' and A[i+1]=='B' and A[i+2]=='C':
    ans+=1
    i+=3
  else:
    i+=1

Fixed code:
N=int(input())
A=input()

i=0
ans=0
while(True):
  if i>N-3:
    break
  if A[i]=='A' and A[i+1]=='B' and A[i+2]=='C':
    ans+=1
    i+=3
  else:
    i+=1
print(ans)
Buggy code:
N = input()
S = input()
# N = 10
# S = 'ZABCDBABCQ'

ans = 0

for i in range(N - 2):
    if S[i:i+3] == 'ABC':
       ans += 1
print(ans)


Fixed code:
N = int(input())
S = input()
# N = 10
# S = 'ZABCDBABCQ'

ans = 0

for i in range(N - 2):
    if S[i:i+3] == 'ABC':
       ans += 1

print(ans)
Buggy code:
a = input()
print(a.count('ABC'))

Fixed code:
a = input()
b = input()
print(b.count('ABC'))
Buggy code:
N = int(input())
S = input()
c = 0
for i in range(N-2):
  if S[i:i+3]=="ABC":
    c += 0
print(c)

Fixed code:
N = int(input())
S = input()
c = 0
for i in range(N-2):
  if S[i:i+3]=="ABC":
    c += 1
print(c)
Buggy code:
import sys

def main():
    N = int(input().split())
    S = input()

    cnt = 0
    for i in range(N-2):
        s = str(S[i]) + str(S[i+1]) + str(S[i+2])
        if s=='ABC':
            cnt += 1

    print(cnt)
main()

Fixed code:
import sys

def main():
    N = int(input())
    S = input()

    cnt = 0
    for i in range(N-2):
        s = str(S[i:i+3])
        if s=='ABC':
            cnt += 1

    print(cnt)
main()
Buggy code:
n = int(input())
s = input()

count = 0
for i in range(n-2):
    if s[i:i+3] == 'abc':
        count += 1
print(count)


Fixed code:
n = int(input())
s = input()

count = 0
for i in range(n-2):
    if 'ABC' in s[i:i+3]: count += 1
print(count)
Buggy code:
input()
s = input()
i = s.find('ABC')
n = 0
while i != -1:
  i = s.find('ABC'[i+3:])
print(n)


Fixed code:
input()
s = input()
n = 0
i = 0
while i != -1:
  i = s.find('ABC')
  s = s[i+3:]
  n += 1
print(n-1)
Buggy code:
N = input()
S = input()

n = str.count('ABC')
print(n)

Fixed code:
N = input()
S = input()

n = S.count('ABC')
print(n)
Buggy code:
def p_b():
    n = int(input())
    s = input()
    ans = 0
    for i in range(n - 2):
        if "ABC" == s[i:i + 3]:
            ans += 1
            
p_b()

Fixed code:
def p_b():
    n = int(input())
    s = input()
    ans = 0
    for i in range(n - 2):
        if "ABC" == s[i:i + 3]:
            ans += 1
    print(ans)
    
p_b()
Buggy code:
N = int(input())
S = input()
count = 0
for i in range(N-2):
  print(S[i:i+3])
  if S[i:i+3] == 'ABC':
    count += 1
print(count)

Fixed code:
N = int(input())
S = input()
count=0
for i in range(N-2):
    if S[i:i+3]=="ABC":
        count+=1
print(count)
Buggy code:
n = input()
print(inpur().count("ABC"))

Fixed code:
n = input()
print(input().count("ABC"))
Buggy code:
S=input()
print(S.count('ABC'))

Fixed code:
N = input()
S = input()

print(S.count("ABC"))
Buggy code:
n = int(input())
s = input()
count = 0

for i in range(n-2):
    if s[i]+s[i+1]+s[i+2] == 'abc':
        count += 1

print(count)

Fixed code:
n = int(input())
s = input()
count = 0

for i in range(n-2):
    if s[i]+s[i+1]+s[i+2] == 'ABC':
        count += 1

print(count)
Buggy code:
N = int(input())
S = input()
c = 0
for i in range(N-2):
  S[i] + S[i+1] + S[i+2] == 'ABC'
  c += 1
print(c)


Fixed code:
N = int(input())
S = input()
c = 0
for i in range(N-2):
  if (S[i] + S[i+1] + S[i+2]) == 'ABC':
    c += 1
print(c)
Buggy code:
N = int(input())
s = input()
cnt = 0
for i in range(N-2):
  print(s[i:i+3])
  if s[i:i+3] =="ABC":
    cnt += 1
print(cnt)

Fixed code:
N = int(input())
s = input()
cnt = 0
for i in range(N-2):
  if s[i:i+3] =="ABC":
    cnt += 1
print(cnt)
Buggy code:
N = int(input())
S = input()
S.count('ABC')

Fixed code:
N=int(input())
S=input()


print(S.count('ABC'))
Buggy code:
N = int(input())
S = input()

cnt = 0
ans = 0
print(S)
for i in S:
	if S[cnt] == "A":
		if S[cnt:cnt+3] == "ABC":
			ans += 1
	cnt += 1
	if N - 3 == cnt:
		break

print(ans)

Fixed code:
N = int(input())
S = input()

cnt = 0
ans = 0
for i in S:
	if S[cnt:cnt+3] == "ABC":
		ans += 1
	cnt += 1
	if cnt == (N - 3):
		if S[cnt:cnt+3] == "ABC":
			ans += 1
		break
print(ans)
Buggy code:
n = input()
s = input()
count = 0
for i in range(1, int(n)-1):
    print(s[i-1] + s[i] + s[i+1])
    if s[i-1] + s[i] + s[i+1] == "ABC":
        count = count + 1
print(count)

Fixed code:
n = input()
s = input()
count = 0
for i in range(1, int(n)-1):
    if s[i-1] + s[i] + s[i+1] == "ABC":
        count = count + 1
print(count)
Buggy code:
n = int(input())
S = input()
A = 0
for i in range(n-3):
  clipped_S = S[i:i+2]
  if clipped_S == "ABC"
    A += 1
print(A)

Fixed code:
n = int(input())
S = input()
A = 0
for i in range(n-2):
  clipped_S = S[i:i+3]
  if clipped_S == "ABC":
    A += 1
print(A)
Buggy code:
def main():
    N = int(input())
    S = str(input())
    print (S)
    if 'ABC' in S :
        C = S.split('ABC')
        #print (C)
        print (len(C)-1)


if __name__ == '__main__':
    main()

Fixed code:
def main():
    N = int(input())
    S = str(input())
    #print (S)
    if 'ABC' in S :
        C = S.split('ABC')
        #print (C)
        print (str(len(C)-1))
    else :
        print ('0')


if __name__ == '__main__':
    main()
Buggy code:
N=int(input())
S=input()
result=0
for i in range(N):
  if [i:i+3]=='ABC':
    result+=1
print(result)


Fixed code:
N=int(input())
S=input()
count=0
for i in range(N):
  if S[i:i+3]=='ABC':
    count+=1
print(count)
Buggy code:
N=int(input())
S=input()
result=0
for i in range(N):
  if [i:i+3]=='ABC':
    result+=!
print(result)


Fixed code:
N=int(input())
S=input()
result=0
for i in range(N):
  if S[i:i+3]=='ABC':
    result+=1
print(result)
Buggy code:
import re

n = int(input())
s = input()

abc = re.compile('ABC')

count = abc.findall(s)
print(count)

Fixed code:
import re
 
n = int(input())
s = input()
 
abc = re.compile('ABC')
 
count = len(abc.findall(s))
print(count)
Buggy code:
def resolve():
    _, S = [input() for i in range(2)]

    print(S.count('abc'))


if __name__ == "__main__":
    resolve()

Fixed code:
def resolve():
    _, S = [input() for i in range(2)]

    print(S.count('abc') + S.count('ABC'))


if __name__ == "__main__":
    resolve()
Buggy code:
n = int(input())
s = list(str(input()))
ans=0
for i in range(len(s) - 3):
    if list[i] = 'A':
        if list[i + 1] = 'B':
            if list[i + 2] = 'C':
                ans+=1
print(ans)

Fixed code:
n = int(input())
s = list(str(input()))
ans=0
for i in range(len(s) - 2):
    if s[i] == 'A':
        if s[i + 1] == 'B':
            if s[i + 2] == 'C':
                ans+=1
print(ans)
Buggy code:
n = int(input())
s = input()
ss = "ABC"
cnt = 0
for i in range(n-2):
  if s[i:i+3] == ss:
    print(s[i:i+3],i)
    cnt += 1
print(cnt)

Fixed code:
n = int(input())
s = input()
ss = "ABC"
cnt = 0
for i in range(n-2):
  if s[i:i+3] == ss:
    #print(s[i:i+3])
    cnt += 1
print(cnt)
Buggy code:
n = int(input())
s = input()

i = -1
c = 0

while True:
	i = s.find('ABC', i + 1)
	if i == -1:
		break
	c++
print(c)

Fixed code:
n = int(input())
s = input()

i = -1
c = 0

while True:
	i = s.find('ABC', i + 1)
	if i == -1:
		break
	c += 1
print(c)