Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import math

def nroot(a, n, x=1.0, eps=1e-7):
    while abs(a - x**n) > eps:
        x = ( (n-1)*x + a/(x**(n-1)) ) / n
    return x


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

sa = nroot(a)
sb = nroot(b)
sc = nroot(c)

if sa + sb < sc:
    print('Yes')
else:
    print('No')

Fixed submission:
import math

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

# a + b + 2 sqrt(ab) < c
# c - a - b > 2 sqrt(ab)
# (c - a - b)^2 > 4ab

if (c - a - b)**2 > 4 * a * b and c - a - b > 0:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Time Limit Exceeded):
N, A, B = map(int, input().split())

c = 0
bc = 0

while True:
    if c > N:
        ans = bc
        break
    c += A
    bc += A
    if c > N:
        ans = bc - (c - N)
        break
    c += B

print(ans)

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

sumAB = A + B
c = N // sumAB
k = N % sumAB
if k < A:
    ans = A * c + k
else:
    ans = A * c + A

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N, A, B = map(int, input().split())

l = ''

while len(l) < N:
    for i in range(A):
        l += 'b'
    for i in range(B):
        l += 'r'

ln = l[:N]

ans = ln.count('b')

print(ans)

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

sumAB = A + B
c = N // sumAB
k = N % sumAB
if k < A:
    ans = A * c + k
else:
    ans = A * c + A

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
S = input()
Q = int(input())

for i in range(Q):
    Query = list(input().split())
    #print(Query)
    if len(Query) == 1:
        S = S[::-1]
        #print(S)
    else:
        if Query[1] == '1':
            S = Query[2] + S
            #print(S + '+++1')
        else:
            S += Query[2]
            #print(S + '+++2')

print(S)

Fixed submission:
from collections import deque

S = input()
S = deque(S)
Q = int(input())
Query1 = 0
flag = False
for i in range(Q):
    Queryi = input().split()
    if Queryi[0] == '1':
        Query1 += 1
        flag = not flag
    else:
        if (Queryi[1] == '1') ^ flag:
            S.appendleft(Queryi[2])
        else:
            S.append(Queryi[2])

if Query1 % 2 != 0:
    S.reverse()

ans = ''.join(S)
print(ans)
Buggy python submission (verdict: Runtime Error):
import numpy as np
import sys

for i in range(3):
    A = list(map(int, input().split()))
N = int(input())
b = []
for i in range(N):
    k = int(input())
    b.append(k)
for k in b:
    for row in A:
        for elem in row:
            if k == elem:
                elem = 0


row = np.sum(A, axis=1)
for i in range(3):
    if row[i] == 0:
        print('Yes')
        sys.exit()


col = np.sum(A, axis=0)
for i in range(3):
    if col[i] == 0:
        print('Yes')
        sys.exit()

c = 0
for i in range(3):
    c += A[i][i]
if c == 0:
    print('Yes')
    sys.exit()

c = 0
for i in range(3):
    c += A[3-i-1][i]
if c == 0:
    print('Yes')
    sys.exit()

print('No')

Fixed submission:
import numpy as np
import sys

A = np.zeros((3, 3), dtype=np.int64)
for i in range(3):
    l, m, n = map(int, input().split())
    A[i][0] = l
    A[i][1] = m
    A[i][2] = n
N = int(input())
b = []
for i in range(N):
    k = int(input())
    b.append(k)
for k in range(N):
    for i in range(3):
        for j in range(3):
            if b[k] == A[i][j]:
                A[i][j] = 0


row = np.sum(A, axis=1)
for i in range(3):
    if row[i] == 0:
        print('Yes')
        sys.exit()


col = np.sum(A, axis=0)
for i in range(3):
    if col[i] == 0:
        print('Yes')
        sys.exit()

c = 0
for i in range(3):
    c += A[i][i]
if c == 0:
    print('Yes')
    sys.exit()

c = 0
for i in range(3):
    c += A[3-i-1][i]
if c == 0:
    print('Yes')
    sys.exit()

print('No')
Buggy python submission (verdict: Runtime Error):
S = input()

ls = len(S)

ans = ''
for i in range(ls):
    ans.append('x')

print(ans)

Fixed submission:
S = input()

ls = len(S)

ans = ''
for i in range(ls):
    ans += 'x'

print(ans)

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

ls = len(S)

ans = ''
for i in range(ls):
    ans.append(x)

print(ans)

Fixed submission:
S = input()

ls = len(S)

ans = ''
for i in range(ls):
    ans += 'x'

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

A.sort()

count = 0
for i in range(N):
    if A[i] == A[i+1]:
        count += 1
        break

if count == 0:
    print('YES')
else:
    print('NO')    

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

A.sort()

count = 0
for i in range(N-1):
    if A[i] == A[i+1]:
        count += 1
        break

if count == 0:
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Runtime Error):
def f(x):
    if x == 1:
        return 1
    else:
        return 2 * f(H // 2) + 1   

H = int(input())

min = f(H)

print(min)

Fixed submission:
def f(x):
    if x == 1:
        return 1
    else:
        return 2 * f(x // 2) + 1   

H = int(input())

min = f(H)

print(min)

Buggy python submission (verdict: Runtime Error):
def f(x):
    if x == 1:
        return 1
    else:
        return 2 * f(H // 2) + 1   

H = int(input())

min = f(H)

print(min)

Fixed submission:
def f(x):
    if x == 1:
        return 1
    else:
        return 2 * f(x // 2) + 1   

H = int(input())

min = f(H)

print(min)

Buggy python submission (verdict: Runtime Error):
from collections import deque

def f(x):
    if x == 1:
        return 1
    else:
        return 2 * f(H // 2) + 1   

H = int(input())

    min = f(H)

print(min)

Fixed submission:
def f(x):
    if x == 1:
        return 1
    else:
        return 2 * f(x // 2) + 1   

H = int(input())

min = f(H)

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

la = ''
lb = ''

for i in range(b):
    la += a
    lb += b

if a <= b:
    print(la)
else:
    print(lb)



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

la = ''
lb = ''

for i in range(b):
    la += str(a)

for i in range(a):
    lb += str(b)

if a <= b:
    print(la)
else:
    print(lb)
Buggy python submission (verdict: Time Limit Exceeded):
from numpy import *

N = int(input())

A = zeros(N, dtype=int)
B = zeros(N, dtype=int)

al = []
bl = []

count = 0
for i in range(N):
    A[i] = i + 1
    al.append( str(A[i]) )

    a_s = (al[i])[0]
    a_e = (al[i])[len(al[i]) - 1]

    for j in range(N):
        B[j] = j + 1
        bl.append( str(B[j]) )

        b_s = (bl[j])[0]
        b_e = (bl[j])[len(bl[j]) - 1]

        if a_e == b_s and a_s == b_e:
            count += 1

print(count)

Fixed submission:
from numpy import *

N = int(input())

l = zeros((10, 10), dtype=int)

for i in range(N):
    a = int( str(i + 1)[0] )
    b = int( str(i + 1)[-1] )
    l[a][b] += 1

count = 0
for i in range(1, 10):
    for j in range(1, 10):
        count += l[i][j] * l[j][i]


print(count)
Buggy python submission (verdict: Runtime Error):
from collections import deque

inf = float('inf')
di = [1, 0, -1, 0]
dj = [0, 1, 0, -1]

h, w = map(int, input().split())
s = [list(input()) for _ in range(h)]

# bfs
for si in range(h):
    for sj in range(w):
        if s[si][sj] == '#':
            continue
        dist = [[inf for j in range(w)] for i in range(h)]
        q = deque()
        
        def update(i, j, x):
            if dist[i][j] != inf:
                return
            dist[i][j] = x
            q.append([i, j])
        
        update(si, sj, 0)
        
        while len(q):
            i = q[0]
            j = q[1]
            q.popleft()
            for dir in range(4):
                ni = i + di[dir]
                nj = j + dj[dir]
                if ni < 0 or ni >= h or nj < 0 or nj >= w:
                    continue
                if s[ni][nj] == '#':
                    continue
                update(ni, nj, dist[i][j] + 1)
        
for i in range(h):
    for j in range(w):
        if dist[i][j] == inf:
            continue
        ans = max(ans, dist[i][j])

print(ans)

Fixed submission:
from collections import deque

inf = float('inf')
di = [-1, 0, 1, 0]
dj = [0, -1, 0, 1]

h, w = map(int, input().split())
s = [list(input()) for _ in range(h)]

ans = 0

# bfs
for si in range(h):
    for sj in range(w):
        if s[si][sj] == '#':
            continue
        dist = [[-inf for j in range(w)] for i in range(h)]
        q = deque()
        
        def update(i, j, x):
            if dist[i][j] != -inf:
                return
            dist[i][j] = x
            q.append([i, j])
        
        update(si, sj, 0)
        
        while len(q):
            i = q[0][0]
            j = q[0][1]
            q.popleft()
            for dir in range(4):
                ni = i + di[dir]
                nj = j + dj[dir]
                if ni < 0 or ni >= h or nj < 0 or nj >= w:
                    continue
                if s[ni][nj] == '#':
                    continue
                update(ni, nj, dist[i][j] + 1)

        # 2次元配列のmax
        dist_max = max(list(map(lambda x: max(x), dist)))
        ans = max(ans, dist_max)

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
A, B, K = map(int, input().split())

for i in range(K):
    if A >= 1:
        A -= 1
    elif B >= 1:
        B -= 1
    else:
        continue

print('{} {}' .format(A, B))

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

if A >= K:
    A -= K
elif A + B >= K:
    B -= K - A
    A = 0
else:
    A = 0
    B = 0

print('{} {}' .format(A, B))

Buggy python submission (verdict: Time Limit Exceeded):
A, B, K = map(int, input().split())

for i in range(K):
    if A >= 1:
        A -= 1
    elif B >= 1:
        B -= 1
    elif A == 0 and B == 0:
        continue

print('{} {}' .format(A, B))

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

if A >= K:
    A -= K
elif A + B >= K:
    B -= K - A
    A = 0
else:
    A = 0
    B = 0

print('{} {}' .format(A, B))
Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())

if A == 1 and B == 2:
    ans = 3
elif A == 2 and B == 3:
    ans = 1
elif A == 3 and B == 1:
    ans = 2

print(ans)

Fixed submission:
A = int(input())
B = int(input())

if A == 1:
    if B == 2:
        ans = 3
    if B == 3:
        ans = 2
elif A == 2:
    if B == 1:
        ans = 3
    if B == 3:
        ans = 1
elif A == 3:
    if B == 1:
        ans = 2
    if B == 2:
        ans = 1

print(ans)
Buggy python submission (verdict: Runtime Error):
from numpy import *

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

count = 0

for i in range(N):
    if count + 1 == a[i]:
        count += 1

ans = N - count

if count == 0:
    ans = -1

print(ans)


Fixed submission:
from numpy import *

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

count = 0

for i in range(N):
    if count + 1 == a[i]:
        count += 1

ans = N - count

if count == 0:
    ans = -1

print(ans)

Buggy python submission (verdict: Runtime Error):
from numpy import *

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

count = 0

for i in range(N):
    if count + 1 == a[i]:
        count += 1

ans = N - count

if count == 0:
    ans = -1

print(ans)

Fixed submission:
from numpy import *

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

count = 0

for i in range(N):
    if count + 1 == a[i]:
        count += 1

ans = N - count

if count == 0:
    ans = -1

print(ans)
Buggy python submission (verdict: Runtime Error):
def func(n):
    if n < 2:
        return 1
    else:
        return n * func(n - 2)

N = int(input())

count5 = 0
count2 = 0
A = func(N)
B = func(N)
while True:
    if A % 5 == 0:
        A = int(A / 5)
        count5 += 1
    else:
        break

while True:
    if B % 2 == 0:
        B = int(B / 2)
        if count2 >= count5:
            break
        count2 += 1
    else:
        break

if count5 <= count2:
    ans = count5
else:
    ans = count2

print(ans)

Fixed submission:
n = int(input())

def g1(n, p):
    if n == 0:
        return 0
    else:
        return n // p + g1(n // p, p)

def g2(n, p):
    res = 0
    if n % 2 == 1:
        return g1(n, p) - g2(n - 1, p)
    else:
        res = g1(n // 2, p)
        if p == 2:
            res += n // 2
        return res


ans = min(g2(n, 2), g2(n, 5))
print(ans)

Buggy python submission (verdict: Runtime Error):
def func(n):
    if n < 2:
        return 1
    else:
        return n * func(n - 2)

N = int(input())

count5 = 0
count2 = 0
A = func(N)
B = func(N)
while True:
    if A % 5 == 0:
        A = int(A / 5)
        count5 += 1
    else:
        break

while True:
    if B % 2 == 0:
        B = int(B / 2)
        if count2 >= count5:
            break
        count2 += 1
    else:
        break

if count5 <= count2:
    ans = count5
else:
    ans = count2

print(ans)

Fixed submission:
n = int(input())

def g1(n, p):
    if n == 0:
        return 0
    else:
        return n // p + g1(n // p, p)

def g2(n, p):
    res = 0
    if n % 2 == 1:
        return g1(n, p) - g2(n - 1, p)
    else:
        res = g1(n // 2, p)
        if p == 2:
            res += n // 2
        return res


ans = min(g2(n, 2), g2(n, 5))
print(ans)
Buggy python submission (verdict: Runtime Error):
S = str(input())

if S == "SUN":
    cmd = 0
elif S == "MON":
    cmd = 1
elif S == "TUE":
    cmd = 2
elif S == "WED":
    cmd = 3
elif S == "THU":
    cmd = 4
elif S == "FRY":
    cmd = 5
elif S == "SAT":
    cmd = 6

print(7-cmd)

Fixed submission:
S = str(input())

if S == "SUN":
    cmd = 0
elif S == "MON":
    cmd = 1
elif S == "TUE":
    cmd = 2
elif S == "WED":
    cmd = 3
elif S == "THU":
    cmd = 4
elif S == "FRI":
    cmd = 5
elif S == "SAT":
    cmd = 6

print(7-cmd)

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

if S == "SUN":
    cmd = 0
elif S == "MON":
    cmd = 1
elif S == "TUE":
    cmd = 2
elif S == "WED":
    cmd = 3
elif S == "THU":
    cmd = 4
elif S == "FRY":
    cmd = 5
elif S == "SAT":
    cmd = 6

if cmd == 0:
    print(7)
else:
    print(7-cmd)

Fixed submission:
S = str(input())

if S == "SUN":
    cmd = 0
elif S == "MON":
    cmd = 1
elif S == "TUE":
    cmd = 2
elif S == "WED":
    cmd = 3
elif S == "THU":
    cmd = 4
elif S == "FRI":
    cmd = 5
elif S == "SAT":
    cmd = 6

print(7-cmd)

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

if S == "SUN":
    cmd = 0
elif S == "MON":
    cmd = 1
elif S == "TUE":
    cmd = 2
elif S == "WED":
    cmd = 3
elif S == "THU":
    cmd = 4
elif S == "FRY":
    cmd = 5
elif S == "SAT":
    cmd = 6

if cmd == 0:
    print(7)
else:
    print(cmd)

Fixed submission:
S = str(input())

if S == "SUN":
    cmd = 0
elif S == "MON":
    cmd = 1
elif S == "TUE":
    cmd = 2
elif S == "WED":
    cmd = 3
elif S == "THU":
    cmd = 4
elif S == "FRI":
    cmd = 5
elif S == "SAT":
    cmd = 6

print(7-cmd)

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

if S == "SUN":
    cmd = 0
elif S == "MON":
    cmd = 1
elif S == "TUE":
    cmd = 2
elif S == "WED":
    cmd = 3
elif S == "THU":
    cmd = 4
elif S == "FRY":
    cmd = 5
elif S == "SAT":
    cmd = 6

if cmd == 0:
    print(7)
else:
    print(cmd)

Fixed submission:
S = str(input())

if S == "SUN":
    cmd = 0
elif S == "MON":
    cmd = 1
elif S == "TUE":
    cmd = 2
elif S == "WED":
    cmd = 3
elif S == "THU":
    cmd = 4
elif S == "FRI":
    cmd = 5
elif S == "SAT":
    cmd = 6

print(7-cmd)

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

if S == "SUN":
    cmd = 0
elif S == "MON":
    cmd = 1
elif S == "TUE":
    cmd = 2
elif S == "WED":
    cmd = 3
elif S == "THU":
    cmd = 4
elif S == "FRY":
    cmd = 5
elif S == "SAT":
    cmd = 6

if cmd == 0:
    print(7)
else:
    print(cmd)

Fixed submission:
S = str(input())

if S == "SUN":
    cmd = 0
elif S == "MON":
    cmd = 1
elif S == "TUE":
    cmd = 2
elif S == "WED":
    cmd = 3
elif S == "THU":
    cmd = 4
elif S == "FRI":
    cmd = 5
elif S == "SAT":
    cmd = 6

print(7-cmd)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))

X = 1
for i in range(0,N):
    X = X * A[i]

if X <= 10**18:
    print(X)
else:
    print("-1")

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
A.sort()

X = 1
c = 0
for i in range(0,N):
    X = X * A[i]
    if X <= 10**18:
        c = c + 1
    else:
        break

if c == N:
    print(X)
else:
    print("-1")

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))

X = 1
for i in range(0,N):
    X = X * A[i]

if X <= 10**18:
    print(X)
else:
    print("-1")

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
A.sort()

X = 1
c = 0
for i in range(0,N):
    X = X * A[i]
    if X <= 10**18:
        c = c + 1
    else:
        break

if c == N:
    print(X)
else:
    print("-1")
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
nums = [int(e) for e in input().split()]
nums.sort()

for i in range (1,N+1):
    c = 0
    a = c
    for j in range(a,len(nums)):
        if nums[j] == i:
            c = c + 1
    print(c)

Fixed submission:
import collections as col

n = int(input())
List = list(map(int, input().split()))

List = col.Counter(List)
Count_List = [0]*n
for i in List:
    Count_List[i-1] = List[i]

for i in range(0,len(Count_List)):
    print(Count_List[i])

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
nums = [int(e) for e in input().split()]
nums.sort()

for i in range (1,N+1):
    c = 0
    for j in range(0,len(nums)):
        if nums[j] == i:
            c = c + 1
    print(c)
    del nums[:int(c)]

Fixed submission:
import collections as col

n = int(input())
List = list(map(int, input().split()))

List = col.Counter(List)
Count_List = [0]*n
for i in List:
    Count_List[i-1] = List[i]

for i in range(0,len(Count_List)):
    print(Count_List[i])

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
nums = [int(e) for e in input().split()]
nums.sort()

for i in range (1,N+1):
    c = nums.count(i)
    print(c)
    del nums[:int(c)]

Fixed submission:
import collections as col

n = int(input())
List = list(map(int, input().split()))

List = col.Counter(List)
Count_List = [0]*n
for i in List:
    Count_List[i-1] = List[i]

for i in range(0,len(Count_List)):
    print(Count_List[i])

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
nums = [int(e) for e in input().split()]
nums.sort()

for i in range (1,N+1):
    j = 0
    c = 0
    while j < len(nums) and nums[j] == i:
        c = c + 1
    del nums[:c]
    print(c)

Fixed submission:
import collections as col

n = int(input())
List = list(map(int, input().split()))

List = col.Counter(List)
Count_List = [0]*n
for i in List:
    Count_List[i-1] = List[i]

for i in range(0,len(Count_List)):
    print(Count_List[i])

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
nums = [int(e) for e in input().split()]

for i in range (1,N+1):
    c = 0
    for j in range(0,N-1):
        if nums[j] == i:
            c = c + 1
    print(c)

Fixed submission:
import collections as col

n = int(input())
List = list(map(int, input().split()))

List = col.Counter(List)
Count_List = [0]*n
for i in List:
    Count_List[i-1] = List[i]

for i in range(0,len(Count_List)):
    print(Count_List[i])

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
nums = [int(e) for e in input().split()]

for i in range (1,N+1):
    print(nums.count(i))

Fixed submission:
import collections as col

n = int(input())
List = list(map(int, input().split()))

List = col.Counter(List)
Count_List = [0]*n
for i in List:
    Count_List[i-1] = List[i]

for i in range(0,len(Count_List)):
    print(Count_List[i])
Buggy python submission (verdict: Time Limit Exceeded):
List = list(map(int, input().split()))
x = List[0]
y = abs(x-List[1])

while x >= y:
    z = abs(x-List[1])
    x = y
    y = z

print(x)

Fixed submission:
List = list(map(int, input().split()))

if List[0]%List[1] >= abs(List[0]%List[1] - List[1]):
    print(abs(List[0]%List[1] - List[1]))
else:
    print(abs(List[0]%List[1]))
Buggy python submission (verdict: Runtime Error):
ball_name1,ball_name2 = input().split(" ")
ball1,ball2 = input().split(" ")
ball1 = int(ball1)
ball2 = int(ball2)
ball_chosen = input()


if (ball_chosen in ball_name1) :
    print(f'{ball1-1} {ball2}')
else:
    print(f'{ball1} {ball2-1}')

Fixed submission:
ball_name1,ball_name2 = input().split(" ")
ball1,ball2 = input().split(" ")
ball1 = int(ball1)
ball2 = int(ball2)
ball_chosen = input()


if (ball_chosen in ball_name1) :
    ball1-=1
    print(str(ball1)+" "+str(ball2))
else:
    ball2-=1
    print(str(ball1)+" "+str(ball2))
Buggy python submission (verdict: Runtime Error):
length = int(input())
string = input()
count=0

if(length>=3):
    for i in range(0,length):
        if ("A" == string[i]) and ("B" == string[i+1]) and ("C" == string[i+2]):
            count+=1
            i+=3
            if i>length-3:
                break

print(count)

Fixed submission:
length = int(input())
string = input()
print(string.count("ABC"))

Buggy python submission (verdict: Runtime Error):
length = int(input())
string = input()
count=0
for i in range(0,length):
    if ("A" == string[i]) and ("B" == string[i+1]) and ("C" == string[i+2]):
        count+=1
        i+=3
        if i>length-3:
            break
print(count)

Fixed submission:
length = int(input())
string = input()
print(string.count("ABC"))

Buggy python submission (verdict: Runtime Error):
length = int(input())
string = input()
count=0

for i in range(0,length):
    if ("A" == string[i]) and ("B" == string[i+1]) and ("C" == string[i+2]) and i>length-2:
        count+=1
        i+=3

print(count)

Fixed submission:
length = int(input())
string = input()
print(string.count("ABC"))

Buggy python submission (verdict: Runtime Error):
length = int(input())
string = input()
count=0

for i in range(0,length):
    if ("A" == string[i]) and ("B" == string[i+1]) and ("C" == string[i+2]):
        count+=1
        i+=3

print(count)



Fixed submission:
length = int(input())
string = input()
print(string.count("ABC"))
Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
print(min(b//a,c))


Fixed submission:
a,b,c=map(int,input().split())
print(min(b//a,c))

Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
print(min(b/a,c))

Fixed submission:
a,b,c=map(int,input().split())
print(min(b//a,c))
Buggy python submission (verdict: Runtime Error):
#coding:UTF-8
As=input()
Bs=input()
Cs=input()
a=int(As)
b=int(Bs)
print(a*b/2)

Fixed submission:
a,b,c=map(int,input().split())
print(a*b//2)

Buggy python submission (verdict: Runtime Error):
#coding UTF-8
As=input()
Bs=input()
Cs=input()
a=int(As)
b=int(Bs)
print(a*b/2)

Fixed submission:
a,b,c=map(int,input().split())
print(a*b//2)

Buggy python submission (verdict: Runtime Error):
As=input()
Bs=input()
Cs=input()
a=int(As)
b=int(Bs)
print(a*b/2)

Fixed submission:
a,b,c=map(int,input().split())
print(a*b//2)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [int(i) for i in input().split()]
ans = 1
for i in a:
  ans = ans * i
  if ans >= 1000000000000000000:
  	break:

if ans >= 1000000000000000000:
    print('-1')
else:
  print(ans)

Fixed submission:
n = int(input())
a = [int(i) for i in input().split()]
ans = 1
if 0 in a:
  print(0)
else:
  for i in a:
    ans = ans * i
    if ans > 1000000000000000000:
  	  break
  if ans > 1000000000000000000:
    print('-1')
  else:
    print(ans)
Buggy python submission (verdict: Runtime Error):
import math

r = int(input())
print(round(2*r*math.pi, 3)

Fixed submission:
import math


r = int(input())
print(2*r*math.pi)