problem_id
stringlengths 6
6
| buggy_code
stringlengths 8
526k
| fixed_code
stringlengths 12
526k
| labels
listlengths 0
15
⌀ | buggy_submission_id
int64 1
1.54M
| fixed_submission_id
int64 2
1.54M
| user_id
stringlengths 10
10
| language
stringclasses 8
values |
|---|---|---|---|---|---|---|---|
p02812
|
N=int(input())
S=input()
print(s.count('ABC'))
|
n=int(input())
s=input()
print(s.count('ABC'))
|
[
"assignment.variable.change",
"identifier.change",
"misc.typo"
] | 612,852
| 612,853
|
u308914480
|
python
|
p02812
|
def main():
n = int(input())
s = input()
prev = ''
c = 0
for i in s:
if prev == '':
if i == 'A':
prev = 'A'
elif prev == 'A':
if i == 'A':
prev = 'A'
elif i == 'B':
prev = 'B'
else:
prev == ''
elif prev == 'B':
if i == 'A':
prev = 'A'
elif i == 'C':
c += 1
prev = ''
else:
prev = ''
print(c)
if __name__ == '__main__':
main()
|
def main():
n = int(input())
s = input()
prev = ''
c = 0
for i in s:
if prev == '':
if i == 'A':
prev = 'A'
elif prev == 'A':
if i == 'A':
prev = 'A'
elif i == 'B':
prev = 'B'
else:
prev = ''
elif prev == 'B':
if i == 'A':
prev = 'A'
elif i == 'C':
c += 1
prev = ''
else:
prev = ''
print(c)
if __name__ == '__main__':
main()
|
[
"expression.operation.compare.replace.remove",
"assignment.replace.add",
"misc.typo"
] | 612,854
| 612,855
|
u747515887
|
python
|
p02812
|
n = int(input())
s = input()
ans = 0
for i in range(0,n-3):
if s[i] == "A" and s[i+1] == "B" and s[i+2] == "C":
ans += 1
print(ans)
|
n = int(input())
s = input()
ans = 0
for i in range(0,n-2):
if s[i] == "A" and s[i+1] == "B" and s[i+2] == "C":
ans += 1
print(ans)
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 612,866
| 612,867
|
u757274384
|
python
|
p02812
|
n=int(input())
s=list(input())
t=0
for i in range(n):
if s[i]=="A" and s[i+1]=="B" and s[i+2]=="C":
t+=1
print(t)
|
n=int(input())
s=list(input())
t=0
for i in range(n-2):
if s[i]=="A" and s[i+1]=="B" and s[i+2]=="C":
t+=1
print(t)
|
[
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 612,868
| 612,869
|
u271210469
|
python
|
p02812
|
import sys
from itertools import combinations
import math
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
n = I()
s = S()
# print(s.count('ABC'))
ans = 0
for i in range(len(s)-3):
if s[i] == 'A' and s[i+1] == 'B' and s[i+2] == 'C':
ans += 1
print(ans)
|
import sys
from itertools import combinations
import math
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
n = I()
s = S()
# print(s.count('ABC'))
ans = 0
for i in range(len(s)-2):
if s[i] == 'A' and s[i+1] == 'B' and s[i+2] == 'C':
ans += 1
print(ans)
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 612,876
| 612,877
|
u413021823
|
python
|
p02812
|
n=int(input())
s=input()
l=[]
count=0
for i in s:
if i=='A':
l.append('A')
elif i=='B' and l==['A']:
l.append('B')
elif i=='C' and l==['A','B']:
l=[]
count+=1
else:
l=[]
print(count)
|
n=int(input())
s=input()
l=[]
count=0
for i in s:
if i=='A':
l=['A']
elif i=='B' and l==['A']:
l.append('B')
elif i=='C' and l==['A','B']:
l=[]
count+=1
else:
l=[]
print(count)
|
[
"call.arguments.change",
"assignment.value.change"
] | 612,878
| 612,879
|
u272525952
|
python
|
p02812
|
N=input()
S=input()
S.replace('ABC','x')
print(S.count('x'))
|
N=input()
S=input()
ans=S.replace('ABC','x')
print(ans.count('x'))
|
[
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 612,885
| 612,886
|
u674588203
|
python
|
p02812
|
N = int(input())
S = list(input())
count = 0
for i in range(1,N-2):
if S[i] == "A":
if S[i+1] == "B":
if S[i+2] == "C":
count += 1
print(count)
|
N = int(input())
S = list(input())
count = 0
for i in range(0,N-2):
if S[i] == "A":
if S[i+1] == "B":
if S[i+2] == "C":
count += 1
print(count)
|
[
"literal.number.integer.change",
"call.arguments.change",
"control_flow.loop.range.bounds.lower.change"
] | 612,898
| 612,899
|
u918373199
|
python
|
p02812
|
n=int(input())
s=list(input())
count=0
for i in range(n):
if s[i]== 'A':
if (s[i+1]) =='B':
if (s[i+2])=='C':
count+=1
print(count)
|
n=int(input())
s=list(input())
count=0
for i in range(n-2):
if s[i]== 'A':
if (s[i+1]) =='B':
if (s[i+2])=='C':
count+=1
print(count)
|
[
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 612,929
| 612,930
|
u095844416
|
python
|
p02812
|
input = input()
result = 0
for i in range(len(input) - 2):
serach = input[i:i+3]
if serach == "ABC":
result += 1
print(result)
|
num = input()
input = input()
result = 0
for i in range(len(input) - 2):
serach = input[i:i+3]
if serach == "ABC":
result += 1
print(result)
|
[
"assignment.add"
] | 612,945
| 612,946
|
u464626513
|
python
|
p02812
|
n=int(input())
s=str(input())
count=0
for i in range(0, n-3):
if s[i:i+3]=="ABC":
count+=1
print(count)
|
n=int(input())
s=str(input())
count=0
for i in range(0, n-2):
if s[i:i+3]=="ABC":
count+=1
print(count)
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 612,947
| 612,948
|
u105290050
|
python
|
p02812
|
N = int(input())
S = input()
ans = 0
for i in range(N-3):
if S[i:i+3] == 'ABC':
ans += 1
print(ans)
|
N = int(input())
S = input()
ans = 0
for i in range(N-2):
if S[i:i+3] == 'ABC':
ans += 1
print(ans)
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 612,954
| 612,955
|
u038021590
|
python
|
p02812
|
import sys
def main():
N = int(input())
S = input()
cnt = 0
for i in range(N-2):
s = str(S[i:i+2])
if s=='ABC':
cnt += 1
print(cnt)
main()
|
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()
|
[
"literal.number.integer.change",
"assignment.value.change",
"variable_access.subscript.index.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 612,956
| 612,957
|
u571395477
|
python
|
p02812
|
import sys
def main():
N = int(input().split())
S = input()
cnt = 0
for i in range(N-2):
s = str(S[i:i+2])
if s=='ABC':
cnt += 1
print(cnt)
main()
|
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()
|
[
"literal.number.integer.change",
"assignment.value.change",
"variable_access.subscript.index.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 612,958
| 612,957
|
u571395477
|
python
|
p02812
|
n = int(input())
s = input()
ans = 0
for i in range(n):
if s[i] == 'A':
if s[i+1] == 'B':
if s[i+2] == 'C':
ans += 1
print(ans)
|
n = int(input())
s = input()
ans = 0
for i in range(n-2):
if s[i] == 'A':
if s[i+1] == 'B':
if s[i+2] == 'C':
ans += 1
print(ans)
|
[
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 612,970
| 612,971
|
u901757711
|
python
|
p02812
|
N = int(input())
S = input()
ans = 0
for i in range(N-3):
if S[i:i+3] == "ABC":
ans += 1
print(ans)
|
N = int(input())
S = input()
ans = 0
for i in range(N-2):
if S[i:i+3] == "ABC":
ans += 1
print(ans)
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 612,976
| 612,977
|
u135346354
|
python
|
p02812
|
n=int(input())
s=list(input())
count=0
for i in range(n):
if i<=48 :
if s[i]=='A' and s[i+1]=='B' and s[i+2]=='C':
count+=1
print(count)
|
n=int(input())
s=list(input())
count=0
for i in range(n-2):
if i<=48 :
if s[i]=='A' and s[i+1]=='B' and s[i+2]=='C':
count+=1
print(count)
|
[
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 612,986
| 612,987
|
u460386402
|
python
|
p02812
|
n=int(input())
s=list(input())
count=0
for i in range(n):
if i<=48:
if s[i]=='A' and s[i+1]=='B' and s[i+2]=='C':
count+=1
print(count)
|
n=int(input())
s=list(input())
count=0
for i in range(n-2):
if i<=48 :
if s[i]=='A' and s[i+1]=='B' and s[i+2]=='C':
count+=1
print(count)
|
[
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 612,988
| 612,987
|
u460386402
|
python
|
p02812
|
N = int(input())
S = input()
ans = 0
for i in range(N):
if S[i] == "A" and S[i+1] == "B" and S[i+2] == "C":
ans += 1
print(ans)
|
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 += 1
print(ans)
|
[
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 612,993
| 612,994
|
u617718239
|
python
|
p02812
|
a = int(input())
s = input()
cnt = 0
i = 0
while i < a:
if s[i:i+3] == 'ABC':
cnt += 1
i += 3
i += 1
print(cnt)
|
a = int(input())
s = input()
cnt = 0
i = 0
while i < a:
if s[i:i+3] == 'ABC':
cnt += 1
i += 2
i += 1
print(cnt)
|
[
"literal.number.integer.change"
] | 612,995
| 612,996
|
u883866798
|
python
|
p02812
|
n = int(input())
S = input()
A = 0
for i in range(n-3):
clipped_S = S[i:i+3]
if clipped_S == "ABC":
A += 1
print(A)
|
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)
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 613,007
| 613,008
|
u939026953
|
python
|
p02812
|
n=input()
s=input()
print(s.count('abc'))
|
n=input()
s=input()
print(s.count('ABC'))
|
[
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"io.output.change"
] | 613,010
| 613,011
|
u726154863
|
python
|
p02812
|
N = int(input())
S = input()
ans = 0
for i in range(N-2):
if s[i:i+3] == 'ABC':
ans += 1
print(ans)
|
n = int(input())
s = input()
ans = 0
for i in range(n-2):
if s[i:i+3] == 'ABC':
ans += 1
print(ans)
|
[
"assignment.variable.change",
"identifier.change",
"misc.typo",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 613,024
| 613,025
|
u868982936
|
python
|
p02812
|
n = int(input())
s = input()
cnt = 0
for i in range(n):
if(s[i] == "A" and s[i + 1] == "B" and s[i + 2] == "C"):
cnt +=1
print(cnt)
|
n = int(input())
s = input()
cnt = 0
for i in range(n-2):
if(s[i] == "A" and s[i + 1] == "B" and s[i + 2] == "C"):
cnt +=1
print(cnt)
|
[
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 613,030
| 613,031
|
u658388042
|
python
|
p02812
|
n = int(input())
w = input()
ans=0
for i in range(n-3):
if w[i:i+3]=='ABC':
ans+=1
print(ans)
|
n = int(input())
w = input()
ans=0
for i in range(n-2):
if w[i:i+3]=='ABC':
ans+=1
print(ans)
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 613,044
| 613,045
|
u092387689
|
python
|
p02812
|
N = int(input())
S = input()
print(sum(S[i:i + 3] == "ABC" for i in range(N - 3)))
|
N = int(input())
S = input()
print(sum(S[i:i + 3] == "ABC" for i in range(N - 2)))
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 613,058
| 613,059
|
u638282348
|
python
|
p02812
|
n=int(input())
s=input()
count=0
for i in range(n):
if s[i]=="A":
if s[i+1]=="B":
if s[i+2]=="C":
count=count+1
i=i+3
else:
i=i+2
else:
i=i+1
print(count)
|
n=int(input())
s=input()
count=0
for i in range(n-2):
if s[i]=="A":
if s[i+1]=="B":
if s[i+2]=="C":
count=count+1
i=i+3
else:
i=i+2
else:
i=i+1
print(count)
|
[
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 613,062
| 613,063
|
u224119985
|
python
|
p02812
|
def main():
import sys
input = sys.stdin.readline
N = int(input())
S = list(input().rsplit()[0])
ans = 0
for i in range(len(S)-3):
s = "".join(S[i:i+3])
if s == 'ABC':
ans += 1
print(ans)
if __name__ == "__main__":
main()
|
def main():
import sys
input = sys.stdin.readline
N = int(input())
S = list(input().rsplit()[0])
ans = 0
for i in range(len(S)):
s = "".join(S[i:i+3])
if s == 'ABC':
ans += 1
print(ans)
if __name__ == "__main__":
main()
|
[
"expression.operation.binary.remove"
] | 613,076
| 613,077
|
u239917977
|
python
|
p02812
|
N=int(input())
S=input()
ans=0
for i in range(N-2):
if S[i:i+3]=="ABC":
ans+=1
|
N=int(input())
S=input()
ans=0
for i in range(N-2):
if S[i:i+3]=="ABC":
ans+=1
print(ans)
|
[
"call.add"
] | 613,091
| 613,092
|
u000698877
|
python
|
p02812
|
N=int(input())
S=input()
ans=0
for i in range(N-3):
if S[i:i+3]=="ABC":
ans+=1
print(ans)
|
N=int(input())
S=input()
ans=0
for i in range(N-2):
if S[i:i+3]=="ABC":
ans+=1
print(ans)
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 613,093
| 613,092
|
u000698877
|
python
|
p02812
|
n = int(input())
s = input()
ans = 0
for i in range(n-1):
for j in range(i+1, n):
if s[i:j] == 'ABC':
ans += 1
print(ans)
|
n = int(input())
s = input()
ans = 0
for i in range(n-1):
for j in range(i+1, n+1):
if s[i:j] == 'ABC':
ans += 1
print(ans)
|
[
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 613,103
| 613,104
|
u646412443
|
python
|
p02812
|
n = int(input())
s = input()
print(s.count('abc'))
|
n = int(input())
s = input()
print(s.count('ABC'))
|
[
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"io.output.change"
] | 613,105
| 613,106
|
u296989351
|
python
|
p02812
|
n=int(input())
s=list(input())
a=0
for i in range(n):
if s[i]=="A" and s[i+1]=="B" and s[i+2]=="C":
a+=1
print(a)
|
n=int(input())
s=list(input())
a=0
for i in range(n-2):
if s[i]=="A" and s[i+1]=="B" and s[i+2]=="C":
a+=1
print(a)
|
[
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 613,107
| 613,108
|
u806976856
|
python
|
p02812
|
n=int(input())
s=input()
cnt=0
for i in range(1,n-2):
if s[i-1:i+2]=='ABC':
cnt+=1
print(cnt)
|
n=int(input())
s=input()
cnt=0
for i in range(1,n-1):
if s[i-1:i+2]=='ABC':
cnt+=1
print(cnt)
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 613,111
| 613,112
|
u932868243
|
python
|
p02812
|
if __name__ == "__main__":
n = int(input())
s = input()
ans = 0
for i in range(n - 3):
if s[i] == 'A' and s[i + 1] == 'B' and s[i + 2] == 'C':
ans += 1
print(ans)
|
if __name__ == "__main__":
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 += 1
print(ans)
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 613,117
| 613,118
|
u679245300
|
python
|
p02812
|
N=int(input())
S=input()
s=list(S)
total=0
for i in range(N):
if s[i]=="A":
if s[i+1]=="B":
if s[i+2]=="C":
total=total+1
print(total)
|
N=int(input())
S=input()
s=list(S)
total=0
for i in range(N-2):
if s[i]=="A" and s[i+1]=="B" and s[i+2]=="C":
total=total+1
print(total)
|
[
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 613,121
| 613,122
|
u172966990
|
python
|
p02812
|
import sys
def input(): return sys.stdin.readline().strip()
def resolve():
n=int(input())
s=input()
cnt=0
for i in range(n-3):
if s[i:i+3]=='ABC':
cnt+=1
print(cnt)
resolve()
|
import sys
def input(): return sys.stdin.readline().strip()
def resolve():
n=int(input())
s=input()
cnt=0
for i in range(n-2):
if s[i:i+3]=='ABC':
cnt+=1
print(cnt)
resolve()
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 613,129
| 613,130
|
u057964173
|
python
|
p02812
|
n=int(input())
s=list(input())
for i in range(0,n-2):
if s[i]=="A" and s[i+1]=="B" and s[i+2]=="B":
total+=1
print(total)
|
n=int(input())
s=list(input())
total=0
for i in range(0,n-2):
if s[i]=="A" and s[i+1]=="B" and s[i+2]=="C":
total+=1
print(total)
|
[
"literal.string.change",
"control_flow.branch.if.condition.change"
] | 613,133
| 613,134
|
u798093965
|
python
|
p02812
|
n = int(input())
s = input()
c = 0
for i in range(0, n-3):
if s[i:i+3] == "ABC":
c += 1
print(c)
|
n = int(input())
s = input()
c = 0
for i in range(0, n-2):
if s[i:i+3] == "ABC":
c += 1
print(c)
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 613,135
| 613,136
|
u626881915
|
python
|
p02812
|
n=int(input())
s=input()
l=[]
for i in s:
l.append(i)
#print(l)
count=0
for i in range(len(l)):
if l[i]=="A" and l[i+1]=="B" and l[i+2]=="C":
count+=1
print(count)
|
n=int(input())
s=input()
l=[]
for i in s:
l.append(i)
#print(l)
count=0
for i in range(len(l)-2):
if l[i]=="A" and l[i+1]=="B" and l[i+2]=="C":
count+=1
print(count)
|
[
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 613,145
| 613,146
|
u236536206
|
python
|
p02812
|
n = int(input())
a = input()
p = 0
for i in range(n):
if a[i] == "A":
if a[i+1] == "B":
if a[i+2] == "C":
p += 1
print(p)
|
n = int(input())
a = input()
p = 0
for i in range(n-2):
if a[i] == "A":
if a[i+1] == "B":
if a[i+2] == "C":
p += 1
print(p)
|
[
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 613,162
| 613,163
|
u247830763
|
python
|
p02812
|
n = int(input())
s = input()
count = 0
for i in range(n-3):
if s[i:i+3] == "ABC":
count += 1
print(count)
|
n = int(input())
s = input()
count = 0
for i in range(n-2):
if s[i:i+3] == "ABC":
count += 1
print(count)
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 613,178
| 613,179
|
u561883765
|
python
|
p02812
|
n=int(input())
s=input()
count=0
for i in range(len(n)-2):
if s[i]=="A" and s[i+1]=="B" and s[i+2]=="C":
count+=1
print(count)
|
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)
|
[
"call.remove",
"call.arguments.change"
] | 613,180
| 613,181
|
u153259685
|
python
|
p02812
|
n=int(input())
s=input()
count=0
for i in range(len(n)-3):
if s[i]=="A" and s[i+1]=="B" and s[i+2]=="C":
count+=1
print(count)
|
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)
|
[
"call.remove",
"call.arguments.change",
"literal.number.integer.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 613,182
| 613,181
|
u153259685
|
python
|
p02812
|
N=int(input())
S=input()
ans=0
for i in range(N-2):
if S[i:i+3]=='abc' :
ans+=1
print(ans)
|
N=int(input())
S=input()
ans=0
for i in range(N-2):
if S[i:i+3]=='ABC' :
ans+=1
print(ans)
|
[
"literal.string.change",
"literal.string.case.change",
"control_flow.branch.if.condition.change"
] | 613,187
| 613,188
|
u106778233
|
python
|
p02812
|
# -*- coding: utf-8 -*-
n = int(input())
s = input()
index = -1
current_index = 0
counter = 0
for i in range(n):
if 'ABC' in s[i:]:
current_index = s.index('ABC', i)
# print(current_index, s[i:])
if index != current_index:
counter += 1
index = current_index
print(counter)
|
# -*- coding: utf-8 -*-
n = int(input())
s = input()
index = -1
current_index = -1
counter = 0
for i in range(n):
if 'ABC' in s[i:]:
current_index = s.index('ABC', i)
# print(current_index, s[i:])
if index != current_index:
counter += 1
index = current_index
print(counter)
|
[
"assignment.value.change",
"expression.operation.unary.add"
] | 613,189
| 613,190
|
u123849536
|
python
|
p02812
|
n = int(input())
s = input()
count = 0
for k in range(n):
if s[k] == "A" and s[k+1] =="B" and s[k+2] =="C":
count += 1
print(count)
|
n = int(input())
s = input()
count = 0
for k in range(n-2):
if s[k] == "A" and s[k+1] =="B" and s[k+2] =="C":
count += 1
print(count)
|
[
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 613,193
| 613,194
|
u670961163
|
python
|
p02812
|
n = int(input())
s = input()
ans = 0
for i in range(n-3):
if s[i] == "A" and s[i+1] == "B" and s[i+2] == "C":
ans += 1
print(ans)
|
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 += 1
print(ans)
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 613,197
| 613,198
|
u169350228
|
python
|
p02812
|
n = int(input())
lie = input()
li = list(lie)
cnt = 0
for i in range(len(li)):
if li[i] == "A" and li[i+1] == "B" and li[i+2] == "C":
cnt += 1
else:
pass
print(cnt)
|
n = int(input())
lie = input()
li = list(lie)
cnt = 0
for i in range(len(li) - 2):
if li[i] == "A" and li[i+1] == "B" and li[i+2] == "C":
cnt += 1
else:
pass
print(cnt)
|
[
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 613,205
| 613,206
|
u571647099
|
python
|
p02812
|
n = int(input())
lie = input()
li = list(lie)
cnt = 0
for i in range(len(li) - 3):
if li[i] == "A" and li[i+1] == "B" and li[i+2] == "C":
cnt += 1
else:
pass
print(cnt)
|
n = int(input())
lie = input()
li = list(lie)
cnt = 0
for i in range(len(li) - 2):
if li[i] == "A" and li[i+1] == "B" and li[i+2] == "C":
cnt += 1
else:
pass
print(cnt)
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 613,207
| 613,206
|
u571647099
|
python
|
p02812
|
N = int(input())
s = input()
a=0
for i in range (1,N-2):
if s[i:i+2]=="ABC":
a +=1
print(a)
|
N = int(input())
s = input()
a=0
for i in range (0,N-2):
if s[i:i+3]=="ABC":
a +=1
print(a)
|
[
"literal.number.integer.change",
"call.arguments.change",
"control_flow.loop.range.bounds.lower.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 613,212
| 613,213
|
u552201227
|
python
|
p02812
|
n = int(input())
s = list(input())
a = []
count = 0
for i in range(n-3):
a = s[i:i+3]
if a == ["A","B","C"]:
count += 1
print(count)
|
n = int(input())
s = list(input())
a = []
count = 0
for i in range(0,n-2):
a = s[i:i+3]
if a == ["A","B","C"]:
count += 1
print(count)
|
[
"call.arguments.add",
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 613,228
| 613,229
|
u102242691
|
python
|
p02812
|
N = int(input())
S = input()
count = 0
for i in range(N - 3 + 1):
if S[i:i+2] == "ABC":
count += 1
print(count)
|
N = int(input())
S = input()
count = 0
for i in range(0,N-2):
if S[i:i+3] == "ABC": count += 1
print(count)
|
[
"call.arguments.add",
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.remove",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 613,232
| 613,233
|
u283929013
|
python
|
p02812
|
n = int(input())
s = list(input())
cnt = 0
for i in range(n):
if s[i] == "A" and s[i+1] == "B" and s[i+2] == "C":
cnt += 1
else:
pass
print(cnt)
|
n = int(input())
s = list(input())
cnt = 0
for i in range(n-2):
if s[i] == "A" and s[i+1] == "B" and s[i+2] == "C":
cnt += 1
else:
pass
print(cnt)
|
[
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 613,242
| 613,243
|
u037986534
|
python
|
p02812
|
N = int(input())
S = input()
if "ABC" not in S:
print(0)
else:
count = 0
for i in range(N-3):
if "ABC" in S[i:i+3]:
count += 1
print(count)
|
N = int(input())
S = input()
if "ABC" not in S:
print(0)
else:
count = 0
for i in range(N-2):
if "ABC" in S[i:i+3]:
count += 1
print(count)
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 613,244
| 613,245
|
u508164527
|
python
|
p02812
|
N = int(input())
S = input()
count = 0
for i in range(N):
if S[i] == "A" and S[i + 1] == "B" and S[i + 2] == "C":
count += 1
print(count)
|
N = int(input())
S = input()
count = 0
for i in range(N):
try:
if S[i] == "A" and S[i + 1] == "B" and S[i + 2] == "C":
count += 1
except IndexError:
break
print(count)
|
[
"control_flow.break.add"
] | 613,246
| 613,247
|
u085334230
|
python
|
p02812
|
S = str(input())
N = int(input())
print(S.count('ABC'))
|
N = int(input())
S = str(input())
print(S.count('ABC'))
|
[
"assignment.remove",
"assignment.add"
] | 613,250
| 613,251
|
u084320347
|
python
|
p02812
|
n=int(input())
s=input()
t=s.replace('ABC','c')
print(t.count('a'))
|
n=int(input())
s=input()
t=s.replace('ABC','a')
print(t.count('a'))
|
[
"literal.string.change",
"assignment.value.change",
"call.arguments.change"
] | 613,283
| 613,284
|
u692498898
|
python
|
p02812
|
n=int(input())
s=input()
s.replace('ABC','a')
print(s.count('a'))
|
n=int(input())
s=input()
t=s.replace('ABC','a')
print(t.count('a'))
|
[
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 613,285
| 613,284
|
u692498898
|
python
|
p02812
|
icase=0
if icase==0:
n=int(input())
s=input()
icnt=0
for i in range(n-3):
if s[i:i+3]=="ABC":
icnt+=1
print(icnt)
|
icase=150
if icase==150:
n=int(input())
s=input()
icnt=0
for i in range(n-2):
# print(s[i:i+3],i,i+3)
if s[i:i+3]=="ABC":
icnt+=1
print(icnt)
|
[
"literal.number.integer.change",
"assignment.value.change",
"control_flow.branch.if.condition.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 613,293
| 613,294
|
u576432509
|
python
|
p02812
|
N = int(input())
S = input()
count = 0
for i in range(N-3):
if S[i:i+3] == 'ABC':
count += 1
print(count)
|
N = int(input())
S = input()
count = 0
for i in range(N-2):
if S[i:i+3] == 'ABC':
count += 1
print(count)
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 613,299
| 613,300
|
u379716238
|
python
|
p02812
|
n = int(input())
s = input()
ans = 0
for i in range(n - 3):
if s[i:i + 3] == "ABC":
ans += 1
print(ans)
|
n = int(input())
s = input()
ans = 0
for i in range(n - 2):
if s[i:i + 3] == "ABC":
ans += 1
print(ans)
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 613,308
| 613,309
|
u839110000
|
python
|
p02812
|
n = int(input())
s = input()
cnt = 0
for i in range(n-3):
if s[i]=="A" and s[i+1]=="B" and s[i+2]=="C":
cnt += 1
print(cnt)
|
n = int(input())
s = input()
cnt = 0
for i in range(n-2):
if s[i]=="A" and s[i+1]=="B" and s[i+2]=="C":
cnt += 1
print(cnt)
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 613,314
| 613,315
|
u681323954
|
python
|
p02812
|
n = int(input())
s = input()
cnt = 0
for i in range(n):
if s[i]=="A" and s[i+1]=="B" and s[i+2]=="C":
cnt += 1
print(cnt)
|
n = int(input())
s = input()
cnt = 0
for i in range(n-2):
if s[i]=="A" and s[i+1]=="B" and s[i+2]=="C":
cnt += 1
print(cnt)
|
[
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 613,316
| 613,315
|
u681323954
|
python
|
p02812
|
n = int(input())
s = input()
ans = 0
for i in range(n-3):
if s[i]=="A":
if s[i+1]=="B":
if s[i+2]=="C":
ans += 1
print(ans)
|
n = int(input())
s = list(input())
ans = 0
for i in range(n-2):
if s[i]=="A":
if s[i+1]=="B":
if s[i+2]=="C":
ans += 1
print(ans)
|
[
"call.add",
"call.arguments.change",
"literal.number.integer.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 613,319
| 613,320
|
u953379577
|
python
|
p02812
|
n = int(input())
s = input()
print(s.find('ABC'))
|
n = int(input())
s = input()
print(s.count("ABC"))
|
[
"identifier.change",
"call.arguments.change",
"io.output.change",
"literal.string.change"
] | 613,321
| 613,322
|
u935840914
|
python
|
p02812
|
N = int(input())
S = input()
c = 0
for i in range(N):
if S[i] != 'A':
continue
else:
if S[i+1] == 'B' and S[i+2] == 'C' and i <= N-3:
c += 1
print(c)
|
N = int(input())
S = input()
c = 0
for i in range(N-2):
if S[i] != 'A':
continue
else:
if S[i+1] == 'B' and S[i+2] == 'C' and i <= N-3:
c += 1
print(c)
|
[
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 613,329
| 613,330
|
u418420470
|
python
|
p02812
|
import sys
N = input()
S = input()
c = 0
for i in range(N-2):
if S[i]=='A' and S[i+1]=='B'and S[i+2]=='C':
c += 1
print(c)
|
import sys
N = int(input())
S = input()
c = 0
for i in range(N-2):
if S[i]=='A' and S[i+1]=='B'and S[i+2]=='C':
c += 1
print(c)
|
[
"call.add",
"call.arguments.change"
] | 613,331
| 613,332
|
u086776991
|
python
|
p02812
|
N=int(input())
S=str(input())
cnt=0
for i in range(N):
if S[i]=="A" and S[i+1]=="B" and S[i+2]=="C":
cnt += 1
print(cnt)
|
N=int(input())
S=str(input())
cnt=0
for i in range(N-2):
if S[i]=="A" and S[i+1]=="B" and S[i+2]=="C":
cnt += 1
print(cnt)
|
[
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 613,333
| 613,334
|
u443577878
|
python
|
p02812
|
n = int(input())
s = input()
cnt = 0
for i in range(n):
if s[i] == 'A' and s[i+1] == 'B' and s[i+2] == 'C':
cnt += 1
print(cnt)
|
n = int(input())
s = input()
cnt = 0
for i in range(n-2):
if s[i] == 'A' and s[i+1] == 'B' and s[i+2] == 'C':
cnt += 1
print(cnt)
|
[
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 613,341
| 613,342
|
u010178026
|
python
|
p02812
|
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from math import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7
N = INT()
S = input()
cnt = 0
for i in range(N):
if S[i] == "A" and S[i+1] == "B" and S[i+2] == "C":
cnt += 1
print(cnt)
|
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from math import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7
N = INT()
S = input()
cnt = 0
for i in range(N-2):
if S[i] == "A" and S[i+1] == "B" and S[i+2] == "C":
cnt += 1
print(cnt)
|
[
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 613,345
| 613,346
|
u285891772
|
python
|
p02812
|
import sys
import os
ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]
iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]
def main():
if os.getenv("LOCAL"):
sys.stdin = open("input.txt", "r")
N = ii()
S = iss()
print(sum(S[n:n+3] == 'ABC' for n in range(N-3)))
if __name__ == '__main__':
main()
|
import sys
import os
ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]
iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]
def main():
if os.getenv("LOCAL"):
sys.stdin = open("input.txt", "r")
N = ii()
S = iss()
print(sum(S[n:n+3] == 'ABC' for n in range(N-2)))
if __name__ == '__main__':
main()
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 613,347
| 613,348
|
u634079249
|
python
|
p02812
|
#!/usr/bin/env python3
import sys
import numpy as np
def solve(N: int, S: str):
c=0
for i in range(N-3):
if S[i]=='A':
if S[i+1]=='B':
if S[i+2]=='C':
c+=1
print(c)
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()
N = int(next(tokens)) # type: int
S = next(tokens) # type: str
solve(N, S)
if __name__ == '__main__':
main()
|
#!/usr/bin/env python3
import sys
import numpy as np
def solve(N: int, S: str):
c=0
for i in range(N-2):
if S[i]=='A':
if S[i+1]=='B':
if S[i+2]=='C':
c+=1
print(c)
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()
N = int(next(tokens)) # type: int
S = next(tokens) # type: str
solve(N, S)
if __name__ == '__main__':
main()
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 613,349
| 613,350
|
u915879510
|
python
|
p02812
|
N=int(input())
S=input()
ans_1=0
for i in range(0,N-3):
if S[i:i+3]=="ABC":
ans_1+=1
print(ans_1)
|
N=int(input())
S=input()
ans_1=0
for i in range(N):
if S[i:i+3]=="ABC":
ans_1+=1
print(ans_1)
|
[
"call.arguments.change",
"expression.operation.binary.remove"
] | 613,353
| 613,354
|
u444722572
|
python
|
p02812
|
n = int(input())
s = str(input())
cnt = 0
for i in range(n-3):
if s[i:i+3] == "ABC":
cnt += 1
print(cnt)
|
n = int(input())
s = str(input())
cnt = 0
for i in range(n-2):
if s[i:i+3] == "ABC":
cnt += 1
print(cnt)
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 613,355
| 613,356
|
u694810977
|
python
|
p02812
|
n = int(input())
s = input()
count = 0
for i in range(n):
if s[i] == "A":
if s[i+1]+s[i+2] == "BC":
count += 1
print(count)
|
n = int(input())
s = input()
count = 0
for i in range(n-2):
if s[i] == "A":
if s[i+1]+s[i+2] == "BC":
count += 1
print(count)
|
[
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 613,359
| 613,360
|
u482157295
|
python
|
p02812
|
n = int(input())
s = input()
cnt = 0
for i in range(n):
if i == n-3:
break
a_str = s[i] + s[i+1] + s[i+2]
if a_str == 'ABC':
cnt += 1
print(cnt)
|
n = int(input())
s = input()
cnt = 0
for i in range(n):
if i > n-3:
break
a_str = s[i] + s[i+1] + s[i+2]
if a_str == 'ABC':
cnt += 1
print(cnt)
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 613,369
| 613,370
|
u296101474
|
python
|
p02812
|
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)
|
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)
|
[
"control_flow.branch.if.condition.change"
] | 613,384
| 613,385
|
u297046168
|
python
|
p02812
|
n = int(input())
s = input()
print(s.count('abc'))
|
N = int(input())
S = input()
print(S.count('ABC'))
|
[
"assignment.variable.change",
"identifier.change",
"call.arguments.change",
"io.output.change",
"literal.string.change",
"literal.string.case.change"
] | 613,389
| 613,390
|
u896181359
|
python
|
p02812
|
N = int(input())
S = input()
count = 0
for i in range(N-3):
if S[i]+S[i+1]+S[i+2] == "ABC":
count += 1
else:
continue
print(count)
|
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
else:
continue
print(count)
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 613,393
| 613,394
|
u692453235
|
python
|
p02812
|
n = int(input())
s = input()
k = 0
for i in range(n-2):
if s[i] == A and s[i+1] == B and s[i+2] == C:
k += 1
print(k)
|
n = int(input())
s = input()
k = 0
for i in range(n-2):
if s[i] == "A" and s[i+1] == "B" and s[i+2] == "C":
k += 1
print(k)
|
[
"control_flow.branch.if.condition.change"
] | 613,396
| 613,397
|
u189806337
|
python
|
p02812
|
n = int(input())
s = input()
count = 0
for i in range(n-2):
if s[i:i+3] == 'abc':
count += 1
print(count)
|
n = int(input())
s = input()
count = 0
for i in range(n-2):
if s[i:i+3] == 'ABC':
count += 1
print(count)
|
[
"literal.string.change",
"literal.string.case.change",
"control_flow.branch.if.condition.change"
] | 613,409
| 613,410
|
u162612857
|
python
|
p02812
|
n = int(input())
s = list(str(input()))
ans=0
for i in range(len(s) - 3):
if s[i] == 'A':
if s[i + 1] == 'B':
if s[i + 2] == 'C':
ans+=1
print(ans)
|
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)
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 613,449
| 613,450
|
u222668979
|
python
|
p02812
|
N = int(input())
S = input()
ans = 0
for i in range(N-2):
if S[i:i+2] == 'ABC': ans += 1
print(ans)
|
N = int(input())
S = input()
# 任意のi(0≤i≤n-3)について、S[i]以下3文字が'ABC'であるかを確認すればよい
ans = 0
for i in range(N-2):
if S[i:i+3] == 'ABC': ans += 1
print(ans)
|
[
"literal.number.integer.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 613,475
| 613,476
|
u309120194
|
python
|
p02812
|
N = int(input())
S = input()
ans = 0
for i in range(N-2):
if S[i:i+2] == 'ABC': ans += 1
print(ans)
|
N = int(input())
S = input()
ans = 0
for i in range(N-2):
if S[i:i+3] == 'ABC': ans += 1
print(ans)
|
[
"literal.number.integer.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 613,475
| 613,477
|
u309120194
|
python
|
p02812
|
n=int(input())
s=list(input())
cnt=0
for i in range(n-3):
if s[i]=='A' and s[i+1]=='B' and s[i+2]=='C':
cnt+=1
print(cnt)
|
n=int(input())
s=list(input())
cnt=0
for i in range(n-2):
if s[i]=='A' and s[i+1]=='B' and s[i+2]=='C':
cnt+=1
print(cnt)
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 613,480
| 613,481
|
u800058906
|
python
|
p02812
|
n=int(input())
s=input()
c=0
for i in range(n-3):
if s[i:i+3]=="ABC":
c+=1
print(c)
|
n=int(input())
s=input()
c=0
for i in range(n-2):
if s[i:i+3]=="ABC":
c+=1
print(c)
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 613,487
| 613,488
|
u098223184
|
python
|
p02812
|
s = input()
print(s.count('ABC'))
|
input()
s = input()
print(s.count('ABC'))
|
[
"call.add"
] | 613,513
| 613,514
|
u161485415
|
python
|
p02812
|
# 各桁の数値の総和を計算する.
def calc_digit_sum(num):
sums = 0
while num > 0:
sums += num % 10
num //= 10
return sums
n = int(input())
s = input()
cnt = 0
for index in range(n-3):
if s[index:index+3] == "ABC":
cnt += 1
print(cnt)
|
# 各桁の数値の総和を計算する.
def calc_digit_sum(num):
sums = 0
while num > 0:
sums += num % 10
num //= 10
return sums
n = int(input())
s = input()
cnt = 0
for index in range(n-2):
if s[index:index+3] == "ABC":
cnt += 1
print(cnt)
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 613,515
| 613,516
|
u194542339
|
python
|
p02812
|
input()
s = input()
l = len(s)
s.replace('ABC', '')
l2 = len(s)
print((l-l2) // 3)
|
input()
s = input()
l = len(s)
s2 = s.replace('ABC', '')
l2 = len(s2)
print((l-l2) // 3)
|
[
"assignment.value.change",
"identifier.change",
"call.arguments.change"
] | 613,517
| 613,518
|
u763177133
|
python
|
p02812
|
n = int(input()); s = input() ; c = 0
for i in range(n):
a = s[i-3:i]
if a == 'ABC':
c += 1
print(c)
|
n = int(input()); s = input() ; c = 0
for i in range(n-2):
a = s[i:i+3]
if a == 'ABC':
c += 1
print(c)
|
[
"expression.operation.binary.remove"
] | 613,519
| 613,520
|
u045953894
|
python
|
p02812
|
n=int(input())
s=int(input())
print(s.count("ABC"))
|
n=int(input())
s=input()
print(s.count("ABC"))
|
[
"call.remove",
"call.arguments.change"
] | 613,542
| 613,543
|
u940652437
|
python
|
p02812
|
N = int(input())
S = input()
c = 0
for i in range(N - 3):
if S[i] == 'A' and S[i + 1] == 'B' and S[i + 2] == 'C':
c += 1
print(c)
|
N = int(input())
S = input()
c = 0
for i in range(N - 2):
if S[i] == 'A' and S[i + 1] == 'B' and S[i + 2] == 'C':
c += 1
print(c)
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 613,547
| 613,548
|
u790012205
|
python
|
p02812
|
N = int(input())
S = input()
count = 0
for i in range(N-3):
if S[i:i + 3] == "ABC":
count = count + 1
print(count)
|
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 = count + 1
print(count)
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 613,549
| 613,550
|
u063346608
|
python
|
p02812
|
n = input()
w = input()
w.count('ABC')
|
input()
w = input()
print(w.count('ABC'))
|
[
"call.add",
"call.arguments.change"
] | 613,553
| 613,554
|
u473113960
|
python
|
p02812
|
n = int(input())
s = input()
count = 0
for i in range(n-3):
if s[i]=="A" and s[i+1]=="B" and s[i+2]=="C":
count+=1
print(count)
|
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)
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 613,569
| 613,570
|
u463893436
|
python
|
p02812
|
N = int(input())
S = input()
for i in range(N):
if S[i]+S[i+1]+S[i+2] == 'ABC':
a += 1
if i == N - 3:
break
print(a)
|
N = int(input())
S = input()
a = 0
for i in range(N):
if S[i]+S[i+1]+S[i+2] == 'ABC':
a += 1
if i == N - 3:
break
print(a)
|
[
"assignment.add"
] | 613,588
| 613,589
|
u500990280
|
python
|
p02812
|
N = int(input())
S = str(input())
for i in range(N):
if S[i]+S[i+1]+S[i+2] == 'ABC':
a += 1
if i == N - 3:
break
print(a)
|
N = int(input())
S = input()
a = 0
for i in range(N):
if S[i]+S[i+1]+S[i+2] == 'ABC':
a += 1
if i == N - 3:
break
print(a)
|
[
"call.remove",
"assignment.variable.change",
"call.arguments.change"
] | 613,590
| 613,589
|
u500990280
|
python
|
p02812
|
n = int(input())
s = input()
flag = 0
for i in range(n-1):
if i == n-3:
break
if s[i] == 'A':
if s[i+1] == 'B':
if s[i+2] == 'C':
flag += 1
print(flag)
|
n = int(input())
s = input()
flag = 0
for i in range(n-1):
if i == n-2:
break
if s[i] == 'A':
if s[i+1] == 'B':
if s[i+2] == 'C':
flag += 1
print(flag)
|
[
"literal.number.integer.change",
"control_flow.branch.if.condition.change"
] | 613,591
| 613,592
|
u335281728
|
python
|
p02812
|
n = int(input())
s = input()
flag = 0
for i in range(n-1):
if i == n-3:
break
if s[i] == 'A':
if s[i+1] == 'B':
if s[i+2] == 'C':
flag =+ 1
print(flag)
|
n = int(input())
s = input()
flag = 0
for i in range(n-1):
if i == n-2:
break
if s[i] == 'A':
if s[i+1] == 'B':
if s[i+2] == 'C':
flag += 1
print(flag)
|
[
"literal.number.integer.change",
"control_flow.branch.if.condition.change",
"assignment.value.change",
"expression.operation.unary.arithmetic.remove"
] | 613,593
| 613,592
|
u335281728
|
python
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.