Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = [int(i) for i in input().split()]
gcd_left = [0] * N
gcd_right = [0] * N
chk = 1
for i in range(N):
	if i == 0:
		chk = A[0]
	else:
		chk = fractions.gcd(chk,A[i])
	gcd_left[i] = chk
temp = 0
for i in range(N):
	num = N-1-i
	if i == 0 :
		temp = A[num]
	else:
		temp = fractions.gcd(temp,A[num])
	gcd_right[num] = temp
ans = 0
for i in range(N):
	if i == 0:
		ans = max(ans,gcd_right[1])
	elif i == N-1:
		ans = max(ans,gcd_left[N-2])
	else:
		ans = max(ans,fractions.gcd(gcd_left[i-1],gcd_right[i+1]))
print(ans)

Fixed submission:
import fractions
N = int(input())
A = [int(i) for i in input().split()]
gcd_left = [0] * N
gcd_right = [0] * N
chk = 1
for i in range(N):
	if i == 0:
		chk = A[0]
	else:
		chk = fractions.gcd(chk,A[i])
	gcd_left[i] = chk
temp = 0
for i in range(N):
	num = N-1-i
	if i == 0 :
		temp = A[num]
	else:
		temp = fractions.gcd(temp,A[num])
	gcd_right[num] = temp
ans = 0
for i in range(N):
	if i == 0:
		ans = max(ans,gcd_right[1])
	elif i == N-1:
		ans = max(ans,gcd_left[N-2])
	else:
		ans = max(ans,fractions.gcd(gcd_left[i-1],gcd_right[i+1]))
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = input()
K = int(input())
M = str()
for i in range(N):
    if S[i] != S[K]:
        M= M +"*"
    else:
        M= M +S[i]
print(M)

Fixed submission:
N = int(input())
S = input()
K = int(input())
M = str()
for i in range(N):
    if S[i] != S[K-1]:
        M= M +"*"
    else:
        M= M +S[i]
print(M)
Buggy python submission (verdict: Runtime Error):
N,K=input().split()
N = int(N)
K = int(K)
S = input()
ini = 0
i = 0
while S[i] == "0":
    ini = ini+1
    i += 1
S = int(S)
len_list=[]
one_count = 0
zero_count = 0
def ten_am(a):
    global zero_count
    global one_count
    x = a//10
    y = a%10
    if y == 0:
        zero_count +=1
        if one_count != 0:
            len_list.append(one_count)
        one_count=0
    else:
        one_count +=1
        if zero_count != 0:
            len_list.append(zero_count)
        zero_count =0
    if x != 0:
        ten_am(x)
    else:
        len_list.append(max([one_count,zero_count]))
    return len_list
len_list = ten_am(S)
if ini !=0:
    len_list.append(ini)
si = len(len_list)
ans = sum(len_list[0:2*K])
if K+1 > si :
    print (sum(len_list))
else:
    for i in range(si-2*K):
        s = sum(len_list[i+1:i+2*K+2])
        if s > ans:
            ans = s
    print(ans)

Fixed submission:
import math
N,K = map(int,input().split())
S = input()
seq = 1
v_seq = 1
down_list = []
count = 0
down_num = 0
ans = 0
chk = 0
for i in range(N-1):
    if S[i] == S[i+1]:
        seq += 1
        v_seq += 1
    elif S[i] == "0":
        down_list.append(seq)
        seq = 1
        v_seq += 1
        count += 1
        if count == K:
            chk = 1
    else:
        if chk == 2:
            v_ans = v_ans + v_seq-down_list[v_count]
            v_count += 1
            ans = max(ans,v_ans)
        v_seq = 1
        seq += 1
        if chk == 1:
            ans = i+1
            v_ans = i+1
            v_count = 0
            chk = 2
if ans == 0:
    print(N)
else:
    v_ans = v_ans + v_seq-down_list[v_count]
    print(max(ans,v_ans))
Buggy python submission (verdict: Runtime Error):
s = input()
p = s.replace('A','B')
q = p.replace('T','A')
r = q.replace('B','T')
w = r.replace('G','W')
x = w.replace('C','G')
y = x.replace('W','C')
print(y)
~


Fixed submission:
s = input()
p = s.replace('A','B')
q = p.replace('T','A')
r = q.replace('B','T')
w = r.replace('G','W')
x = w.replace('C','G')
y = x.replace('W','C')
print(y)

Buggy python submission (verdict: Runtime Error):
n,q = map(int,input().split())
s = input()
m = [list(map(int,input().split())) for i in range(q)]
count = [0]*(N+1)
 
for i in range(n):
    if S[i:i+2] == 'AC':
        comu[i+1] = comu[i] + 1
    else:
        comu[i+1] = comu[i]
 
for l,r in list:
    print(count[r-1]-count[l-1])

Fixed submission:
s = input()
p = s.replace('A','B')
q = p.replace('T','A')
r = q.replace('B','T')
w = r.replace('G','W')
x = w.replace('C','G')
y = x.replace('W','C')
print(y)

Buggy python submission (verdict: Runtime Error):
n,q = map(int(input().split()))
s = input()
m = list(map(int,input().split for i in range(q)))
count = [0]*(N+1)

for i in range(n):
    if S[i:i+2] == 'AC':
        comu[i+1] = comu[i] + 1
    else:
        comu[i+1] = comu[i]

for l,r in list:
    print(count[r-1]-count[l-1])
~


Fixed submission:
s = input()
p = s.replace('A','B')
q = p.replace('T','A')
r = q.replace('B','T')
w = r.replace('G','W')
x = w.replace('C','G')
y = x.replace('W','C')
print(y)

Buggy python submission (verdict: Runtime Error):
n,q = map(int(input().split()))
s = input()
m = list(map(int,input().split for i in range(q)))
count = [0]*(N+1)

for i in range(N):
    if S[i:i+2] == 'AC':
        comu[i+1] = comu[i] + 1
    else:
        comu[i+1] = comu[i]

for l,r in list:
    print(count[r-1]-count[l-1])


Fixed submission:
s = input()
p = s.replace('A','B')
q = p.replace('T','A')
r = q.replace('B','T')
w = r.replace('G','W')
x = w.replace('C','G')
y = x.replace('W','C')
print(y)
Buggy python submission (verdict: Runtime Error):
import functools
import math
N = input()
values = [int(i) for i in input().split()] 
gcd = functools.reduce(math.gcd, values)
print(gcd)

Fixed submission:
import math
N = int(input())
values = [int(i) for i in input().split()]
def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
c = values[0]
for i in range(N):
    c = gcd(c,values[i])
print(c)
Buggy python submission (verdict: Time Limit Exceeded):
N,M=input().split()
N =int(N)
M =int(M)
a= []
a= list(int(_) for _ in input().split())
dict={}
ans = 0
for i in range(N+1):
    p = sum(a[:i])%M
    if p not in dict:
        dict[p] = 1
    else:
        ans +=dict[p]
        dict[p] += 1
print(ans)

Fixed submission:
N,M=input().split()
N =int(N)
M =int(M)
a= list(map(int,input().split()))
dict={}
ans = 0
p = 0
dict[0] = 1
for i in range(N):
    p = (p+a[i])%M
    if p not in dict:
        dict[p] = 1
    else:
        ans +=dict[p]
        dict[p] += 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N,M=input().split()
N =int(N)
M =int(M)
a= []
a= list(int(_) for _ in input().split())
dict={}
for i in range(N+1):
    p = sum(a[:i])%M
    if p not in dict:
        dict[p] = 1
    else:
        dict[p] += 1
ans_list =list(dict.values())
ans=0
for i in range(len(ans_list)):
    ans = ans + ans_list[i]*(ans_list[i]-1)/2
print(int(ans))

Fixed submission:
N,M=input().split()
N =int(N)
M =int(M)
a= list(map(int,input().split()))
dict={}
ans = 0
p = 0
dict[0] = 1
for i in range(N):
    p = (p+a[i])%M
    if p not in dict:
        dict[p] = 1
    else:
        ans +=dict[p]
        dict[p] += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
import math
from operator import itemgetter
import re
import sys
from itertools import accumulate
from collections import defaultdict
from collections import deque
from bisect import bisect_left,bisect
from heapq import heappop,heappush
from fractions import gcd
from copy import deepcopy
input = sys.stdin.readline
N,M = map(int,input().split())
if N > 1 and M > 1:
    print((N-2)*(M-2))
elif N==1 and M == 1:
    print(1)
else:
    print(N+M-3))


Fixed submission:
import math
from operator import itemgetter
import re
import sys
from itertools import accumulate
from collections import defaultdict
from collections import deque
from bisect import bisect_left,bisect
from heapq import heappop,heappush
from fractions import gcd
from copy import deepcopy
input = sys.stdin.readline
N,M = map(int,input().split())
if N > 1 and M > 1:
    print((N-2)*(M-2))
elif N==1 and M == 1:
    print(1)
else:
    print(N+M-3)
Buggy python submission (verdict: Runtime Error):
print(48-input())

Fixed submission:
k = list(map(int,input().split()))
print(48-k[0])
Buggy python submission (verdict: Runtime Error):
k = list(map(int,input().split()))
print(-(-(k[0]+k[1])//2)

Fixed submission:
k = list(map(int,input().split()))
print(-(-(k[0]+k[1])//2))

Buggy python submission (verdict: Runtime Error):
k = list(map(int,input().splitlines()))

print(-(-(k[0]+k[1])//2)

Fixed submission:
k = list(map(int,input().split()))
print(-(-(k[0]+k[1])//2))
Buggy python submission (verdict: Runtime Error):
import sys
import os
f = open("C:/Users/user/Documents/python/ant/import.txt","r")
sys.stdin = f

# -*- coding: utf-8 -*-

n = int(input())
if n%3 == 0:
    if n == 111:
        print 3
    else
        print 0
elif n%3 ==1:
    print 1
else
    print 2

Fixed submission:
n = int(input())
if n%3 == 0:
    if n == 111:
        print(3)
    else:
        print (0)
elif n%3 ==1:
    print(1)
else:
    print(2)

Buggy python submission (verdict: Runtime Error):
n = int(input())
if n%3 == 0:
    if n == 111:
        print 3
    else
        print 0
elif n%3 ==1:
    print 1
else
    print 2

Fixed submission:
n = int(input())
if n%3 == 0:
    if n == 111:
        print(3)
    else:
        print (0)
elif n%3 ==1:
    print(1)
else:
    print(2)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = [int(i) for i in input().split()]
M = int(input())
b = [int(i) for i in input().split()]
a.sort()
b.sort()
p=0
for i in range (len(b)):
    for j in range(len(a)):
        if b[i] == a[j]:
            a = a[j+1:N]
            break
        else:
            if j ==len(a)-1:
                print("NO")
                p =1
                break
    if p ==1:
        break    
    if i == len(b)-1:
        print("YES")

Fixed submission:
N = int(input())
D = list(map(int, input().split()))
M = int(input())
T = list(map(int, input().split()))
d_dict = {}
for d in D:
    if d not in d_dict:
        d_dict[d] = 0
    d_dict[d] += 1
 
count = 0
for t in T:
    if t in d_dict and d_dict[t] > 0:
        d_dict[t] -= 1
        count += 1
if count == M:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = input()
onlyb = 0
onlyw = 0
twotn = 0
flag = 0
ch =0
for i in range(N):
    if S[i] == ".":
        onlyb += 1
        ch = 0
        if flag != 0:
            twotn +=1
    else:
        onlyw += 1
        ch +=1
        flag = 1

print(min(onlyb,onlyw-ch,twotn))

Fixed submission:
N=int(input())
for i in range(1,3501):
  for j in range(i,3501):
    if (4*i*j-N*(i+j))>0 and N*i*j%(4*i*j-N*(i+j))==0:
      k=N*i*j//(4*i*j-N*(i+j))
      print(i,j,k)
      break
  else:
    continue
  break

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
p = max(N//4,1)
s=1
r=1
t=1
for i in range(2*p,3500):
    for j in range(2*p,3500):
        for l in range(p,3500):
            if (i*j + j*l + l*i)*N//(i*j*l) == 4 and (i*j + j*l + l*i)*N%(i*j*l) == 0:
                i =str(i)
                j=str(j)
                l=str(l)
                print(i+" "+j+" "+l)
                s=int(l)
                r=int(j)
                t =int(i)
                break
        if (t*r + r*s + s*t)*N//(t*r*s) == 4:
            break
    if (t*r + r*s + s*t)*N//(t*r*s) == 4:
        break


Fixed submission:
N=int(input())
for i in range(1,3501):
  for j in range(i,3501):
    if (4*i*j-N*(i+j))>0 and N*i*j%(4*i*j-N*(i+j))==0:
      k=N*i*j//(4*i*j-N*(i+j))
      print(i,j,k)
      break
  else:
    continue
  break
Buggy python submission (verdict: Runtime Error):
N = int(input())
e = [[int(i) for i in input().split()] for i in range(N)]
mar=e[0][0]
mir=e[0][0]
mav=0
miv=0
mv=0
mmv=e[i][1]
for i in range(N):
    if e[i][0] > mar:
        mar =e[i][0]
        mmv=e[i][1]
print(mar+mmv)

Fixed submission:
N = int(input())
e = [[int(i) for i in input().split()] for i in range(N)]
mar=e[0][0]
mmv=e[0][1]
for i in range(N):
    if e[i][0] > mar:
        mar =e[i][0]
        mmv=e[i][1]
print(mar+mmv)
Buggy python submission (verdict: Runtime Error):
N=int(input())
p = list(int(i) for i in input().split())
count = 0
for i in range(N):
    if p[i] == i+1:
        a = p[i]
        p[i] = p[i+1]
        p[i+1] = a
        count += 1
print(count)

Fixed submission:
N=int(input())
p = list(int(i) for i in input().split())
count = 0
for i in range(N):
    if p[i] == i+1:
        if i != N-1:
            a = p[i]
            p[i] = p[i+1]
            p[i+1] = a
            count += 1
        else:
            count += 1
print(count)
Buggy python submission (verdict: Runtime Error):
N = map(int,input())
M = int(N**0.5//1)
S = list()
for i in range(M+1):
    if i > 0 :
       if N%i == 0:
           S.append(i)
a =  S[-1]
b = N//a
print(len(str(a))+len(str(b)))

Fixed submission:
import math

N = int(input())
M = int(N**0.5//1)
S = list()
for i in range(M+1):
    if i > 0 :
       if N%i == 0:
           S.append(i)
a =  S[-1]
b = N//a
print(max(len(str(a)),len(str(b))))

Buggy python submission (verdict: Runtime Error):
N = input()
M = int(N**0.5//1)
S = list()
for i in range(M+1):
    if i > 0 :
       if N%i == 0:
           S.append(i)
a =  S[-1]
b = N//a
print(len(str(a))+len(str(b)))

Fixed submission:
import math

N = int(input())
M = int(N**0.5//1)
S = list()
for i in range(M+1):
    if i > 0 :
       if N%i == 0:
           S.append(i)
a =  S[-1]
b = N//a
print(max(len(str(a)),len(str(b))))
Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
edge_list = [list() for i in range(N)]
for i in range(M):
        a,b = map(int,input().split())
        edge_list[a-1].append(b-1)
        edge_list[b-1].append(a-1)
done = [0] * n
chk = 0
def dfs(s,done):
    done = done[:]
    global chk
    done[s] = True 
    if all(done):
        chk += 1
    for i in edges[u]:
        if not done[i]:
            dfs(i.done)
    return 0
dfs(0,done)
print(chk)

Fixed submission:
N,M = map(int,input().split())
edge_list = [list() for i in range(N)]
for i in range(M):
        a,b = map(int,input().split())
        edge_list[a-1].append(b-1)
        edge_list[b-1].append(a-1)
done = [0] * N
chk = 0
def dfs(s,done):
    done = done[:]
    global chk
    done[s] = True
    if all(done):
        chk += 1
    for i in edge_list[s]:
        if not done[i]:
            dfs(i,done)
    return 0
dfs(0,done)
print(chk)
Buggy python submission (verdict: Runtime Error):
N,x = map(int,input().split())
a = [int(i) for i in input.split()]
ans = 0
if a[0] > x:
  ans += (a[0]-x)
  a[0] = x
for i in range(N-1):
  if a[i] + a[i+1] > x:
    ans += (a[i]+a[i+1]-x)
    a[i+1] -= (a[i]+a[i+1]-x)
print(ans)

Fixed submission:
N,x = map(int,input().split())
a = [int(i) for i in input().split()]
ans = 0
if a[0] > x:
  ans += (a[0]-x)
  a[0] = x
for i in range(N-1):
  if a[i] + a[i+1] > x:
    ans += (a[i]+a[i+1]-x)
    a[i+1] -= (a[i]+a[i+1]-x)
print(ans)
Buggy python submission (verdict: Runtime Error):
N = input()
N =int(N)
s = input()
t = input()

for i in range(N):
    q = s[-(i+1):]
    r = t[:i+1]
    if q == r :
        x = q
        y =i+1
print(N*2-y)

Fixed submission:
N = input()
N =int(N)
s = input()
t = input()
y = 0
for i in range(N):
    q = s[-(i+1):]
    r = t[:i+1]
    if q == r :
        x = q
        y =i+1
print(N*2-y)

Buggy python submission (verdict: Runtime Error):
N = input()
N =int(N)
s = input()
t = input()

for i in range(N):
    q = s[-(i+1):]
    r = t[:i+1]
    if q == r :
        x = q
        y =i+1
print(s[:N-y]+t)

Fixed submission:
N = input()
N =int(N)
s = input()
t = input()
y = 0
for i in range(N):
    q = s[-(i+1):]
    r = t[:i+1]
    if q == r :
        x = q
        y =i+1
print(N*2-y)
Buggy python submission (verdict: Runtime Error):
A,B,C = map(int,input().split())
ans =1
if A != B:
  ans += 1
if A != C and B != C:
  ans += 1
print(ANS)

Fixed submission:
A,B,C = map(int,input().split())
ans =1
if A != B:
  ans += 1
if A != C and B != C:
  ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
a = input()
b = input()
c = input()
def turn(x ,a_hand ,b_hand ,c_hand):
    if not a_hand and x == "a"
        print("A")
        return
    if not b_hand and x =="b":
        print("B")
        return
    if not c_hand and x =="c":
        print("C")
        return
    if x == "a":
        x = a_hand[0]
        a_hand = a_hand[1:]
        turn(x , a_hand , b_hand , c_hand)
    elif x == "b":
        x = b_hand[0]
        b_hand = b_hand[1:]
        turn(x , a_hand , b_hand , c_hand)
    else:
        x = c_hand[0]
        c_hand = c_hand[1:]
        turn(x , a_hand , b_hand , c_hand)

Fixed submission:
a = input()
b = input()
c = input()
def turn(x ,a_hand ,b_hand ,c_hand):
    if not a_hand and x == "a":
        print("A")
        return
    if not b_hand and x =="b":
        print("B")
        return
    if not c_hand and x =="c":
        print("C")
        return
    if x == "a":
        x = a_hand[0]
        a_hand = a_hand[1:]
        turn(x , a_hand , b_hand , c_hand)
    elif x == "b":
        x = b_hand[0]
        b_hand = b_hand[1:]
        turn(x , a_hand , b_hand , c_hand)
    else:
        x = c_hand[0]
        c_hand = c_hand[1:]
        turn(x , a_hand , b_hand , c_hand)
turn("a",a,b,c)
Buggy python submission (verdict: Runtime Error):
A,B,C = int(input())
if A*B*C == 175:
  print("YES")
else:
  print("NO")

Fixed submission:
A,B,C = map(int,input().split())
if A*B*C == 175:
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
import sys
n = int(input())
A = list(map(int, input().split()))

ans = 1
if 0 in A:
  print(0)
  sys.quit()
  
for i in range(n):
  ans *= A[i]
  if ans > 1e18:
    ans = -1
    break

print(ans)

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

ans = 1
if 0 in a:
  print(0)
  quit()
  
for i in range(n):
  ans *= a[i]
  if ans > 1e18:
    ans = -1
    break

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

a = int(a)
b = map(int, b.split("."))

c = a*b // 100

print(c)

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

a = int(a)
b = int(b*1000)

c = a*b // 1000

print(c)

Buggy python submission (verdict: Runtime Error):
a,b = map(float, input().split())
 
c = a * (b*10**4)
c = c // 1e4
print(int(c)

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

a = int(a)
b = int(b*1000)

c = a*b // 1000

print(c)
Buggy python submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(10**7)
a,b,n = map(int, input().split())

def num(x):
    return (a*x)//b - a*(x//b)

ma = num(1)

for i in range(2, n+1):
    if num(i) > ma:
        ma = num(i)
    else:
        if num(i) >= num(i-1):
        print(ma)
        exit()
print(ma)

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

x =  min(b-1, n)
print(int(a*x/b) - a*int(x/b))

Buggy python submission (verdict: Time Limit Exceeded):
import sys
sys.setrecursionlimit(10**7)
a,b,n = map(int, input().split())

def num(x):
    return (a*x)//b - a*(x//b)

ma = num(1)

for i in range(2, n+1):
    if num(i) > ma:
        ma = num(i)
print(ma)

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

x =  min(b-1, n)
print(int(a*x/b) - a*int(x/b))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))

for i in range(1,n+1):
    print(a.count(i))

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

b = [0]*n

for i in a:
    b[i-1] += 1

for i in b:
    print(i)
Buggy python submission (verdict: Runtime Error):
k = int(input())
 
def gcd2(a,b):
    return gcd2(b,a%b)

def gcd3(a,b,c):
    return gcd2(gcd2(a,b), c)

ans = 0
for i in range(1,k+1):
    for j in range(i,k+1):
        for m in range(j, k+1):
            if i == j == m:
                ans += gcd3(i,j,m)
            elif i == j or j == m:
                ans += gcd3(i,j,m)*3
            else:
                ans += gcd3(i,j,m)*6

print(ans)

Fixed submission:
k = int(input())
 
def gcd2(a,b):
    if b == 0:
        return a
    return gcd2(b,a%b)

def gcd3(a,b,c):
    return gcd2(gcd2(a,b), c)

ans = 0
for i in range(1,k+1):
    for j in range(i,k+1):
        for m in range(j, k+1):
            if i == j == m:
                ans += gcd3(i,j,m)
            elif i == j or j == m:
                ans += gcd3(i,j,m)*3
            else:
                ans += gcd3(i,j,m)*6

print(ans)
Buggy python submission (verdict: Runtime Error):
k,m = map(int, input().split())
a = list(map(int, input().split()))

# リストaの総投票数をsに格納する
s = sum(a)

# リストaを降順にソートする
a.sort(reverse=True)

if a[m] >= s*(1/4/m):
    print('Yes')
else:
    print('No')

Fixed submission:
n,m = map(int, input().split())
a = list(map(int, input().split()))

s = sum(a)
a.sort()

if all(a[-i-1] >= s/4/m for i in range(m)):
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

count = 0

for k in range(2, n+1):
    if n % k == 0:
        n_new = n // k
        while n_new % k == 0:
            n_new = n_new // k
        if n_new % k == 1:
            count += 1
    else:
        if n % k == 1:
            count += 1

print(count)  


Fixed submission:
n = int(input())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors

a = make_divisors(n-1)
b = make_divisors(n)

a.remove(1)
b.remove(1)

count = len(a)

for i in b:
    n_new = n // i
    while n_new % i == 0:
        n_new = n_new // i
    if n_new % i == 1:
        count += 1

print(count)
Buggy python submission (verdict: Time Limit Exceeded):
n,x,y = map(int, input().split())

dis = []

for i in range(n):
    for j in range(i+1, n):
        kyori = min(j-i, abs(x - (i+1)) + 1 + abs(y - (j+1)))
        dis.append(kyori)

for k in range(1, n):
    print(dis.count(k))



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

dis = [0]*n

for i in range(n):
    for j in range(i+1, n):
        kyori = min(j-i, abs(x - (i+1)) + 1 + abs(y - (j+1)))
        dis[kyori] += 1

for k in range(1, n):
    print(dis[k])
Buggy python submission (verdict: Runtime Error):
s = input()

if s ='AAA' or s = 'BBB':
    print('No')
else:
    print('Yes')

Fixed submission:
s = input()

if s == 'AAA' or s == 'BBB':
    print('No')
else:
    print('Yes')