qyliang/CodeNanoFix huggingface dataset:
Buggy code:
N,M=map(int,input().split())
print((N*(N-1)/2)+(M*(M-1)/2))

Fixed code:
N, M = map(int, input().split())
print((N*(N-1)+M*(M-1))//2)
Buggy code:
N,M = map(int,input().split())

print(N*(N-1)/2+M*(M-1)/2)

Fixed code:
N, M = map (int, input().split())

c=(N*(N-1)+M*(M-1))//2

print(c)
Buggy code:
N,M = map(int,input().split())

print(N*(N-1)/2)

Fixed code:
N,M=map(int,input().split())
print(int((N*(N-1)/2)+(M*(M-1)/2)))
Buggy code:
n, m = map(int, input().split())
if n == 1 and m == 1:
    ans = 0
elif n >= 2 and m == 0:
    ans = 1/2 * n * (n-1)

elif n == 0 and m >= 2:
    ans = 1/2 * n * (n-1)

else:
    ans =1/2*(n*(n-1)+m*(m-1))

print(int(ans))

Fixed code:
n, m = map(int, input().split())
if n == 1 and m == 1:
    ans = 0
elif n >= 2 and m == 0:
    ans = 1/2 * n * (n-1)

elif n == 0 and m >= 2:
    ans = 1/2 * m * (m-1)

else:
    ans =1/2*(n*(n-1)+m*(m-1))

print(int(ans))
Buggy code:
N, M = map(int, input().split())

ans = N * (N-1) / 2 + M * (M-1) / 2
print(ans)

Fixed code:
N, M = map(int, input().split())

ans = int(N * (N-1) / 2 + M * (M-1) / 2)
print(ans)
Buggy code:
a = list(map(int,input().split()))
b = a[0]+a[1]

c = ((a[0]*(a[0]-1))+(a[1]*(a[1]-1)))/2
print(c)

Fixed code:
a = list(map(int,input().split()))
b = a[0]+a[1]

c = ((a[0]*(a[0]-1))+(a[1]*(a[1]-1)))/2
print(int(c))
Buggy code:
N, M = map(int, input().split())

print(N*(N-1)//2)

Fixed code:
N,M=map(int,input().split())

print(int(N*(N-1)/2)+int(M*(M-1)/2) )
Buggy code:
a,b=input().split()
a=int(a)
b=int(b)
print(a*(a-1)/2+(b*(b-1)/2))

Fixed code:
a,b=input().split()
a=int(a)
b=int(b)
print(int(a*(a-1)/2+(b*(b-1)/2)))
Buggy code:
N,M=map(int,input().split())
print(N*(N-1)/2+M*(M-1)/2)

Fixed code:
N, M = map(int, input().split())
print(N * (N - 1) // 2 + M * (M - 1)// 2)
Buggy code:
N,M=map(int,input().split())

c = (N+M)*(N+M-1)/2 - N*M

print(c)

Fixed code:
N,M=map(int,input().split())

c = (N+M)*(N+M-1)/2 - N*M

print(int(c))
Buggy code:
N,M = map(int,input().split()) 
ans = (N-1)*N/2
ans =ans + (M-1)*M/2
print(ans)

Fixed code:
N,M = map(int,input().split()) 
ans = (N-1)*N//2
ans =ans + (M-1)*M//2
print(ans)
Buggy code:
N,M = map(int,input().split())
print(int(N*(N+1)/2+M*(M+1)/2))

Fixed code:
N,M=map(int,input().split())
print( int((N*(N-1)+M*(M-1))/2) )
Buggy code:
N,M=map(int,input().split())

s=N*M
m=N+M

d=(m*(m-1))/2

print(d-s)

Fixed code:
N,M=map(int,input().split())

s=N*M
m=N+M

d=(m*(m-1))/2

print(int(d-s))
Buggy code:
N, M = map(int, input().split())

ans = N*(N-1)/2 + M(M-1)/2

print(ans)

Fixed code:
N, M = map(int, input().split())

ans = N*(N-1)/2 + M*(M-1)/2

print(int(ans))
Buggy code:
N, M = map(int,input().split())

print(1/2 * N * (N - 1) + 1/2 * M * (M - 1)) 

Fixed code:
N, M = map(int, input().split())

ans = int(N*(N-1)/2 + M*(M-1)/2)
print(ans)
Buggy code:
n,m = (map(int,input().split()))
print(n*(n-1)/2 + m*(m-1)/2)

Fixed code:
n,m=map(int,input().split())
print(n*(n-1)//2 + m*(m-1)//2)
Buggy code:
m,n = map(int,input().split())
out = m * (m-1) /2 + n * (n - 1) / 2
print(out)

Fixed code:
n,m=map(int,input().split())
print((n*(n-1)+m*(m-1))//2)
Buggy code:
a,b=map(int,input().split())
print(a*(a-1)/2+b*(b-1)/2)

Fixed code:
a,b=map(int,input().split())
print(int(a*(a-1)/2+b*(b-1)//2))
Buggy code:
def main():
    N, M = map(int, input().split())

    e = N*(N-1)/2
    o = M*(M-1)/2

    ans = int(e + o)
    print(e, o, ans)


if __name__ == '__main__':
    main()

Fixed code:
def main():
    N, M = map(int, input().split())

    e = N*(N-1)/2
    o = M*(M-1)/2

    ans = int(e + o)
    print(ans)


if __name__ == '__main__':
    main()
Buggy code:
N, M = map(int, input().split())
print((N*(N-1) + M*(M-1))/2)

Fixed code:
N, M = map(int, input().split())
print((N*(N-1))//2+(M*(M-1))//2)
Buggy code:
m, n = list(map(int, input().split()))
print(m * (m - 1) / 2 + n * (n - 1) / 2)

Fixed code:
n, m = map(int, input().split())
print((n * (n - 1)) // 2 + (m * (m - 1)) // 2)
Buggy code:
A = list(map(int, input().strip().split(' ')))
ans = A[0] * (A[0] - 1) + A[1] * (A[1] - 1)
print(ans)

Fixed code:
A = list(map(int, input().strip().split(' ')))
ans = (A[0] * (A[0] - 1)) // 2 + ((A[1] * (A[1] - 1)) // 2)
print(ans)
Buggy code:
n, m = map(int, input().split())
all_pattern = (n+m) / (n+m-1) / 2
print(all_pattern - n*m)

Fixed code:
m,n = map(int,input().split())
print (m*(m-1)//2 + n*(n-1)//2)
Buggy code:
N,M = map(int,input().split())
print((N*(N-1)+M*(M-1))/2)

Fixed code:
N,M = map(int,input().split())
print(((N-1)*N+(M-1)*M)//2)
Buggy code:
n,m=list(map(int,input().split()))
x=0

x==m*(m-1)/2+n*(n-1)/2
print(x)

Fixed code:
n, m = list(map(int, input().split()))
print(m * (m - 1) // 2 + n * (n - 1) // 2)
Buggy code:
n, m = map(int, input().split())
print(n(n-1)//2 + m(m-1)//2)

Fixed code:
n,m = map(int,input().split())

print((n * (n-1) + m * (m-1) )//2 )
Buggy code:
n, m = map(int, input().split())
if n*m == 1:
  print(0)
else:
  print(n*(n-1)/2+m*(m-1)/2)

Fixed code:
n, m = map(int, input().split())
if n*m == 1:
  print(0)
else:
  print(int(n*(n-1)/2+m*(m-1)/2))
Buggy code:
a = list(map(int, input().split()))
if a[0]==1:
  n=0
else:
  n=a[0]*(a[0]-1)/2

if a[1]==1:
  m=0
else:
  m=a[1]*(a[1]-1)/2
 
print(n+m)

Fixed code:
a = list(map(int, input().split()))
if a[0]==1:
  n=0
else:
  n=a[0]*(a[0]-1)/2

if a[1]==1:
  m=0
else:
  m=a[1]*(a[1]-1)/2
 
print(int(n+m))
Buggy code:
N, M = map(int, input().split())

ans = N*(N-1) /2+ M*(M-1)/2

print(ans)

Fixed code:
N, M = map(int, input().split())
print (N*(N-1)//2+M*(M-1)//2)
Buggy code:
N, M = map(int, input().split())

a = N * (N-1) / 2
b = M * (M-1) / 2

print(a+b)

Fixed code:
N, M = map(int, input().split())

a = N * (N-1) / 2
b = M * (M-1) / 2

print(int(a+b))
Buggy code:
n, m = input().split()
n = int(n)
m = int(m)
print((n * (n - 1) / 2) + (m * (m - 1) / 2))

Fixed code:
n, m = map(int, input().split())

print((n * (n-1) + m * (m-1)) // 2)
Buggy code:
n, m = [int(i) for i in input().split()]
print((n*(n-1)+m*(m-1))/2)

Fixed code:
n, m = [int(i) for i in input().split()]
print(int((n*(n-1)+m*(m-1))/2))
Buggy code:
n, m = map(int, input().split())
ans = (n+m)*(n+m-1) / 2
print(ans-(n*m))

Fixed code:
n, m = map(int, input().split())
print(int( n*(n-1)/2 + m*(m-1)/2 ))
Buggy code:
a,b=list(map(int,input().split()))
x=a/2*(a-1)+b/2*(b-1)
print(x)

Fixed code:
a,b=list(map(int,input().split()))
x=int(a/2*(a-1)+b/2*(b-1))
print(x)
Buggy code:
a = list(map(int, input().split()))

b = a[0] * a[0]-1 / 2 + a[1] * a[1] -1 / 2

print(b)

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

b = a[0] * (a[0] - 1) // 2 + a[1] * (a[1] - 1) // 2

print(b)
Buggy code:
N,M = map(int,input().split())
print(N*(N-1)/2+M*(M-1)/2)


Fixed code:
N,M = map(int,input().split())
print(N*(N-1)//2+M*(M-1)//2)
Buggy code:
n, m = map(int, input().split())

even = n * (n-1)/2
odd = m * (m-1)/2

print(even + odd)


Fixed code:
n, m = map(int, input().split())
 
even = n * (n-1)/2
odd = m * (m-1)/2
 
print(int(even + odd))
Buggy code:
N, M = map(int, input().split())

a = N * (N - 1)/2
b = M * (M - 1)/2

print(a + b)

Fixed code:
N,M = map(int,input().split())

a = (N*(N-1))/2
b = (M*(M-1))/2
# print(a)
# print(b)
print(int(a+b))
Buggy code:
N, M = map(int,input().split())
answer = 0
answer += (N ** 2 - N) / 2
answer += (M ** 2 - M) / 2
print(answer)

Fixed code:
N, M = map(int,input().split())
answer = 0
answer += (N ** 2 - N) / 2
answer += (M ** 2 - M) / 2
print(int(answer))
Buggy code:
N,M=map(int,input().split())
s=N*(N-1)/2+M*(M-1)/2
print(s)

Fixed code:
N,M=map(int,input().split())
s=N*(N-1)//2+M*(M-1)//2
print(s)
Buggy code:
N,M=input().split()
N=int(N)
M=int(M)
print((N*(N-1)/2)+(M*(M-1)/2))

Fixed code:
N,M=input().split()
N=int(N)
M=int(M)
print((N*(N-1)//2)+(M*(M-1)//2))
Buggy code:
n, m = [int(c) for c in input().split()]
print(n*(n-1)/2 + m*(m-1)/2)

Fixed code:
n, m = [int(c) for c in input().split()]
print(int(n*(n-1)/2 + m*(m-1)/2))
Buggy code:
N, M = map(int, input().split())
ans = N * (N- 1) / 2 + M * (M - 1) / 2
print(ans)

Fixed code:

N,M = map(int,input().split())

print (M*(M-1)//2 + N*(N-1)//2)
Buggy code:
n, m = map(int, input().split())
a = n * (n - 1) // 2
b = m*(m-1)//2
print(a*b)

Fixed code:
n, m = map(int, input().split())
a = n * (n - 1) // 2
b = m*(m-1)// 2
print(a + b)
Buggy code:
N,M = map(int, input().split())
print((N*(N-1)/2)+(M*(M-1)/2))

Fixed code:

N,M = map(int,input().split())

ans = N*(N-1)//2 + M*(M-1)//2
print(ans)
Buggy code:
n,m=map(int,input().split())
a=0

a+=(n*(n-1))/2+(m*(m-1))/2

print(a)

Fixed code:
n,m = map(int, input().split())
a=n*(n-1)//2+m*(m-1)//2
print(a)
Buggy code:
S = input().split()
N = int(S[0])
M = int(S[1])

print(N * (N-1)/2 + M * (M-1)/2)

Fixed code:
S = input().split()
N = int(S[0])
M = int(S[1])

print(int(N * (N-1)/2 + M * (M-1)/2))
Buggy code:
def main():
 n,m = map(int,input().split())
 print(n + (n - 1) / 2 + m * (m - 1) / 2)
main()

Fixed code:
def main():
 n,m = map(int,input().split())
 print(n * (n - 1) // 2 + m * (m - 1) // 2)
main()
Buggy code:
S = input().split()
M = int(S[0])
N = int(S[1])
a = (M*(M-1)/2) + (N*(N-1)/2)
print(a)

Fixed code:
S = input().split()
M = int(S[0])
N = int(S[1])
a = int((M*(M-1)/2) + (N*(N-1)/2))
print(a)
Buggy code:
n,m = map(int, input().split())
print((n*(n-1)+m*(m-1))/2)

Fixed code:
n,m=map(int,input().split())
ans = n*(n-1)//2
ans += m*(m-1)//2
print(ans)
Buggy code:
a = list(map(int, input().split()))


def a1():
    if a[0] == 1 or a[0] == 0:
        a[0] = 1
        return a[0]
    else:
        return a[0] * (a[0] - 1) / 2


def b1():
    if a[1] == 1 or a[1] == 0:
        a[1] = 1
        return a[1]
    else:
        return a[1] * (a[1] - 1) / 2


print(a() * b())


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


def a1():
    if a[0] == 1 or a[0] == 0:
        a[0] = 0
        return a[0]
    else:
        return a[0] * (a[0] - 1) / 2


def b1():
    if a[1] == 1 or a[1] == 0:
        a[1] = 0
        return a[1]
    else:
        return a[1] * (a[1] - 1) / 2


print(int(a1() + b1()))
Buggy code:
k = list(map(int, input().split()))

l = k[0] * (k[0] -1) / 2
m = k[1] * (k[1] -1) / 2

print(l + m)

Fixed code:
k = list(map(int, input().split()))
l = k[0] * (k[0] -1) / 2
m = k[1] * (k[1] -1) / 2
print(int(l + m))
Buggy code:
N,M=map(int, input().split())
print((N+M)*(N+M-1)/2-N*M)

Fixed code:
N, M = map(int, input().split(' '))
print(int((N * (N - 1)) / 2) + int((M * (M - 1)) / 2))
Buggy code:
N,M = map(int,input().split())
Q = N*(N-1)*0.5
P = M*(M-1)*0.5
print(P+Q)


Fixed code:
N,M = map(int,input().split())
Q = N*(N-1)*0.5
P = M*(M-1)*0.5
print(int(P+Q))
Buggy code:
m,n=map(int,input().split())
print(m*(m-1)/2+n*(n-1)/2)

Fixed code:
n, m = map(int, input().split())
num = n * (n-1) // 2 + m * (m-1) // 2 
print(num)
Buggy code:
n, m = map(int, input().split())
ans = n * (n - 1) / 2 + m * (m - 1) / 2
print(ans)

Fixed code:
n,m = map(int, input().split( ))
print(n*(n-1)//2+m*(m-1)//2)
Buggy code:
N, M = map(int, input().split())

e_e = N * (N - 1) / 2
o_o = M * (M - 1) / 2

print(e_e + o_o)

Fixed code:
N, M = map(int, input().split())

e_e = N * (N - 1) / 2
o_o = M * (M - 1) / 2

print(int(e_e + o_o))
Buggy code:
N, M = map(int, (input().split()))
ans = N * (N - 1) / 2 + M * (M - 1) / 2
print(ans)

Fixed code:
N,M = map(int,input().split())
print(N*(N-1)//2 + M*(M-1)//2)
Buggy code:
N, M = map(int, input().split())

if N != 0 and M != 0:
  answer = N(N-1)/2 + M(M-1)/2
  print(answer)
elif N == 0:
  answer = M(M-1)/2
  print(answer)
else:
  answer = N(N-1)/2
  print(answer)

Fixed code:
N, M = map(int, input().split())

if N != 0 and M != 0:
  answer = N*(N-1)/2 + M*(M-1)/2
  print(int(answer))
elif N == 0:
  answer = M*(M-1)/2
  print(int(answer))
else:
  answer = N*(N-1)/2
  print(int(answer))
Buggy code:

N,M = map(int, input().split())

print(N*(N-1)+M*(M-1)//2)

Fixed code:
N, M = map(int, input().split())
print(round((N*(N-1)+M*(M-1))/2))
Buggy code:
a,b=list(map(int, input().split()))
ct=(a*(a-1))//2
ct+=b
print(ct)

Fixed code:
a,b=list(map(int, input().split()))
ct=(a*(a-1))//2
ct+=(b*(b-1))//2
print(ct)
Buggy code:
n,m = map(int,input().split())
if n == 0:
  print(m*(m-1)/2)
elif n == 1:
  if m == 1:
    print('0')
  else:
    print(m*(m-1)/2)
elif m == 0:
  print(n*(n-1)/2)
elif m == 1 and n>=2:
  print(n*(n-1)/2)
else:
  print(m*(m-1)/2 + n*(n-1)/2)

Fixed code:
n,m = map(int,input().split())
if n == 0:
  print(int(m*(m-1)/2))
elif n == 1:
  if m == 1:
    print('0')
  else:
    print(int(m*(m-1)/2))
elif m == 0:
  print(int(n*(n-1)/2))
elif m == 1 and n>=2:
  print(int(n*(n-1)/2))
else:
  print(int(m*(m-1)/2 + n*(n-1)/2))
Buggy code:
a,b = map(int,input().split())
print((a * (a + 1) / 2) + (b * (b + 1) / 2))

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

print(a*(a-1)//2 + b*(b-1)//2)
Buggy code:
n, m = map(int, input().split())
print((n + 1) * (m // 2 + 1))

Fixed code:
n, m = map(int, input().split())

print((n*(n-1)+m*(m-1))//2)
Buggy code:
N, M = map(int, input().split())
nC2 = N * (N - 1) / 2
mC2 = M * (M - 1) / 2
print(nC2+mC2)

Fixed code:
N, M = map(int, input().split())
nC2 = N * (N - 1) / 2
mC2 = M * (M - 1) / 2
print(int(nC2+mC2))
Buggy code:
o, e = input().split()
o = int(o);
e = int(e);

num1 = o * (o-1) / 2;
num2 = e * (e-1) / 2;

print(num1+num2)

Fixed code:
o, e = input().split()
o = int(o);
e = int(e);

num1 = o * (o-1) / 2;
num2 = e * (e-1) / 2;

print(int(num1+num2))
Buggy code:
n, m = map(int, input().split())
print((n*(n-1) + m*(m-1))/2)


Fixed code:
n, m = map(int, input().split())
print(int((n+m)*(n+m-1)/2-n*m))
Buggy code:
def solve():
    a, b = list(map(int, input().split()))
    
    if a == 0 and b == 0:
        print(0)
        return
    
    if a == 0:
        ans = b * (b - 1) // 2
        print(ans)

    if b == 0:
        ans = a * (a - 1) // 2
        print(ans)
    
    ans = a * (a - 1) // 2
    ans += b * (b - 1) // 2
    print(ans)
    return

if __name__ == "__main__":
    solve()


Fixed code:
def solve():
    a, b = list(map(int, input().split()))
    
    if a == 0 and b == 0:
        print(0)
        return
    
    if a == 0:
        ans = b * (b - 1) // 2
        print(ans)
        return

    if b == 0:
        ans = a * (a - 1) // 2
        print(ans)
        return
    
    ans = a * (a - 1) // 2
    ans += b * (b - 1) // 2
    print(ans)
    return

if __name__ == "__main__":
    solve()
Buggy code:
N, M = map(int, input().split())

print((N * (N - 1) / 2) + (M * (M - 1) / 2))

Fixed code:
N, M = map(int,input().split())

ans = (((N-1)*N)/2)+(((M-1)*M)/2)

print(int(ans))
Buggy code:
N,M = [int(i) for i in input().split()]

print((N * (N-1)/2) + (M *(M-1)/2))

Fixed code:
N, M = [int(i) for i in input().split()]

print(int((N*(N-1) + M*(M-1))/2))
Buggy code:
N, M = map(int, input().split())

count = N * (N - 1) / 2 + M * (M - 1) / 2
print(count)

Fixed code:
N, M = map(int, input().split())
print(int(N * (N-1) / 2 + M * (M-1) / 2))
Buggy code:
n, m = map(int, input().split())

ans = n * (n-1) / 2 + m * (m-1) /2

print(ans)

Fixed code:
m, n = map(int, input().split())
print(n *  (n - 1) // 2 + m * (m - 1) // 2)
Buggy code:
N, M = map(int, input().split())
print(N * (N-1) / 2 + M * (M-1) / 2)

Fixed code:
N,M=map(int,input().split())
a=N*(N-1)/2+M*(M-1)/2
print(int(a))
Buggy code:
n,m = map(int,input().split())
print((n**2 - n + m**2 - m)/2)

Fixed code:
n,m = map(int,input().split())
print((n**2 - n + m**2 - m)//2)
Buggy code:
n,m=map(int,input().split())
print(n(n-1)//2 + m(m-1)//2)


Fixed code:
n,m = map(int, input().split())
print(int(n*(n-1)/2 + m*(m-1)/2))
Buggy code:
n, m = map(int,input().split())
if n==0:
  c=m*(m-1)
elif m==0:
  c=n*(n-1)
else:
  c=n*(n-1)+m*(m-1)

print(c)


Fixed code:
n, m = map(int,input().split())
if n==0:
  c=m*(m-1)/2
elif m==0:
  c=n*(n-1)/2
else:
  c=n*(n-1)/2+m*(m-1)/2

print(int(c))
Buggy code:
x,y=map(int,input().split())
print((x*(x-1)//2+(y*(y-1)//2)

Fixed code:
x,y=map(int,input().split())
print((x*(x-1)//2)+(y*(y-1)//2))
Buggy code:
from math import *


N,M = list(map(int,input().split(" ")))
A = (N*(N-1))/2+(M*(M-1))/2
print (A)

Fixed code:
from math import *


N,M = list(map(int,input().split(" ")))
A = (N*(N-1))/2+(M*(M-1))/2
print (int(A))
Buggy code:
N,M = list(map(int,input().split()))
ans = N*(N-1)/2 + M*(M-1)/2
print(ans)

Fixed code:
N, M = list(map(int, input().split()))
print(int((N * (N - 1) / 2) + (M * (M - 1) / 2)))
Buggy code:
import sys
input = sys.stdin.readline

N, M = map(int, input().split())

print(N*(N-1) + M*(M-1))

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

N, M = map(int, input().split())
print(N*(N-1)//2 + M*(M-1)//2)
Buggy code:
n,m=map(int,input().split()) 
print((n*(n-1)/2)+(m*(m-1)/2))

Fixed code:
n, m = map(int, input().split())
ans = n*(n-1)//2 + m*(m-1)//2 
print(ans)
Buggy code:
n, m = map(int, input().split())
print(n*(n-1)//2 + m*(m-1)//2a)

Fixed code:
n,m = map(int,input().split())
print(n*(n-1)//2+m*(m-1)//2)
Buggy code:
n,m = map(int,input().split())

print((n+m)*(n+m-1)/2-n*m)

Fixed code:
n,m = map(int,input().split())

print(round((n+m)*(n+m-1)/2-n*m))
Buggy code:
def partpall(s,n):
	if s!=s[::-1]:
		return False
	else:
		return True

def pall(s,n):
	if s!=s[::-1]:
		return False
	return partpall(s[n//2 +1 :],n) and partpall(s[:n//2 ],n)


# s=input("enter:")
s="akakaka"
# print("sucess",s,s[::-1])
# revStr=s[::-1]
n=len(s)
print(n)
if pall(s,n):
	print("True")
else:
	print("False")

Fixed code:
def partpall(s,n):
	if s!=s[::-1]:
		return False
	else:
		return True

def pall(s,n):
	if s!=s[::-1]:
		return False
	return partpall(s[n//2 +1 :],n) and partpall(s[:n//2 ],n)


# s=input("enter:")
s=input()
# print("sucess",s,s[::-1])
# revStr=s[::-1]
n=len(s)
# print(n)
if pall(s,n):
	print("Yes")
else:
	print("No")
Buggy code:
def kaibun(s):
  l=len(s)
  if(l%2==0):
    for i in range(l//2):
      if(s[i]!=s[l-1-i]):
        return 0
    return 1
  else:
    for i in range((l-1)//2):
      if(s[i]!=s[l-1-i]):
        return 0
    return 1

s=input()
l=len(s)
if(l%2==0):
  print("No")
else:
  if(kaibun(s[:((l-1)//2)])*kaibun(s[((l+1)//2):])):
    print("Yes")

Fixed code:
def kaibun(s):
  l=len(s)
  if(l%2==0):
    for i in range(l//2):
      if(s[i]!=s[l-1-i]):
        return 0
    return 1
  else:
    for i in range((l-1)//2):
      if(s[i]!=s[l-1-i]):
        return 0
    return 1

s=input()
l=len(s)
if(l%2==0):
  print("No")
else:
  if(kaibun(s[:((l-1)//2)])*kaibun(s)):
    print("Yes")
  else:
    print("No")
Buggy code:
def isKaibun(s):
    flag = True
    n = 0
    if len(s) > 2:
        if len(s)%2 == 0:
            n = len(s)//2
        else:
            n = (len(s)-1)//2
        for i in range(n):
            if s[i:i+1] != s[len(s)-(i+1):len(s)-i]:
                flag = False
                break
    else:
        flag = False
    return flag
        
s = input()
f = s[:(len(s)-1)//2]
b = s[(len(s)-1)//2+1:]
print(f, b)

if isKaibun(f) and isKaibun(b) and isKaibun(s):
    print('Yes')
else:
    print('No')

Fixed code:
def isKaibun(s):
    flag = True
    n = 0
    if len(s)%2 == 0:
        n = len(s)//2
    else:
        n = (len(s)-1)//2
    for i in range(n):
        if s[i:i+1] != s[len(s)-(i+1):len(s)-i]:
            flag = False
            break
    return flag
        
s = input()
f = s[:(len(s)-1)//2]
b = s[(len(s)-1)//2+1:]

if isKaibun(f) and isKaibun(b) and isKaibun(s):
    print('Yes')
else:
    print('No')
Buggy code:
s = input()

n = len(s)

s_l = s[0:int((n-1)/2)]
s_r = ''.join(reversed(s[int((n-1)/2)+1:]))

if s_l == s_r :
    print('Yes')

else:
    print('No')



Fixed code:
s = input()

n = len(s)

s_l = s[:int((n-1)/2)]
s_r = s[int((n-1)/2)+1:]

c = 0

if ''.join(reversed(s_l)) == s_l:
    c += 1
if ''.join(reversed(s_r)) == s_r:
    c += 1
if s_l == ''.join(reversed(s_r)):
    c += 1

if c== 3:
    print('Yes')

else:
    print('No')
Buggy code:
S = input()

N = len(S)
S_list = [i for i in S]
S_1 = S_list[:(N-1)//2]
check = 0
for i in range(len(S_1)//2+1):
    print(S_1[i], S_1[-(i+1)])
    if S_1[i] != S_1[-(i+1)]:
        check = 1

S_2 = S_list[(N+3)//2-1:]
for i in range(len(S_2)//2+1):
    print(S_2[i], S_2[-(i+1)])
    if S_2[i] != S_2[-(i+1)]:
        check = 1

print(S_1, S_2)
if check == 0:
    print('Yes')
else:
    print('No')


Fixed code:
S = input()

N = len(S)
S_list = [i for i in S]
check = 0

S_0 = S_list
for i in range(len(S_0)//2):
    if S_0[i] != S_0[-(i+1)]:
        check = 1

S_1 = S_list[:(N-1)//2]
for i in range(len(S_1)//2+1):
    if S_1[i] != S_1[-(i+1)]:
        check = 1

S_2 = S_list[(N+3)//2-1:]
for i in range(len(S_2)//2+1):
    if S_2[i] != S_2[-(i+1)]:
        check = 1

if check == 0:
    print('Yes')
else:
    print('No')
Buggy code:
s = input()
def is_palindrome(s):
    return s == s[::-1]

s_len = len(s)
if is_palindrome(s):
    if is_palindrome(s[:(s_len-1)//2]):    
        if is_palindrome(s[(s_len+3)//2-1:]):
            print("Yes")
else:
    print("No")


Fixed code:
s = input()
def is_palindrome(s):
    return s == s[::-1]

s_len = len(s)
if is_palindrome(s) and is_palindrome(s[:(s_len-1)//2]) and is_palindrome(s[(s_len+3)//2-1:]):
    print("Yes")
else:
    print("No")
Buggy code:
s=input()
a=s[:(len(s)−1)//2]
b=s[(len(s)+3)//2-1:]
if s==s[::-1] and a==a[::-1] and b==b[::-1]:
  print("Yes")
else:
  print("No")

Fixed code:
s=input()
a=s[:(len(s)-1)//2]
b=s[((len(s)+3)//2-1):]
if s==s[::-1] and a==a[::-1] and b==b[::-1]:
  print("Yes")
else:
  print("No")
Buggy code:
s = input()

if s[:(n-1)/2] == s[(n+3)/2:] and s[:(n-1)/2] == s[(n+3)/2:]:
  print('Yes')
else:
  print('No')

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

if s[:int((n-1)/2)] == s[int((n+3)/2)-1:] and s[:int((n-1)/2)] == (s[int((n+3)/2)-1:])[::-1]:
  print('Yes')
else:
  print('No')
Buggy code:
S=input()
N=len(S)
S1=S[:(N-1)//2]
S2=S[(N+1)//2:]
print(S1,S2)
if S1==S2 and S1==S1[::-1]:
    print("Yes")
else:
    print("No")

Fixed code:
S=input()
N=len(S)
S1=S[:(N-1)//2]
S2=S[(N+1)//2:]
if S1==S2 and S1==S1[::-1]:
    print("Yes")
else:
    print("No")
Buggy code:
def c1(S):
    N=len(S)
    if S[:N//2] == S[N:N//2:-1]:
        return True
    else:
        return False
S=input()
N=len(S)
SS=S[:(N-1)//2]
SSS=S[(N+3)//2-1:]
print(SS,SSS[::-1])
if SS==SSS[::-1] and c1(SS):
    print("Yes")
else:
    print("No")

Fixed code:
def c1(S):
    N=len(S)
    if S == S[::-1]:
        return True
    else:
        return False

S=input()
N=len(S)
SS=S[:(N-1)//2]
SSS=S[(N+3)//2-1:]
if SS==SSS and c1(SS):
    print("Yes")
else:
    print("No")
Buggy code:
s = list(input())
n = len(s)
s1 = s[0:(n-1)//2]
s2 = s[(n+3)//2-1:n]
print(s,s1,s2)
S = []
S1 = []
S2 = []
i = -1
j = -1
k = -1
while i >= n * -1:
    S.append(s[i])

    i -= 1
while j >= len(s1) * -1:
    S1.append(s1[j])
    j -= 1
while k >= len(s2) * -1:
    S2.append(s2[k])
    k -= 1
if s == S and s1 == S1 and s2 == S2:
    print("Yes")
else:
    print("No")

Fixed code:
s = list(input())
n = len(s)
s1 = s[0:(n-1)//2]
s2 = s[(n+3)//2-1:n]
S = []
S1 = []
S2 = []
i = -1
j = -1
k = -1
while i >= n * -1:
    S.append(s[i])
 
    i -= 1
while j >= len(s1) * -1:
    S1.append(s1[j])
    j -= 1
while k >= len(s2) * -1:
    S2.append(s2[k])
    k -= 1
if s == S and s1 == S1 and s2 == S2:
    print("Yes")
else:
    print("No")
Buggy code:
s = input()
s_len = len(s)

def judge(start=0, end=s_len)
  for i in range(start, end):
    if s[start+i] == s[end-1-i]:
      continue
    else:
      return 1
  return 0

if not judge() and not judge(end=(s_len-1)//2) and not judge(start=(s_len+3)//2-1):
  print("Yes")
else:
  print("No")

Fixed code:
s = input()
s_len = len(s)
 
def judge(start=0, end=s_len):
  for i in range(start, end):
    if s[i] == s[end-1-i]:
      continue
    else:
      return 0
  return 1
 
if judge() and judge(end=(s_len-1)//2) and judge(start=(s_len+3)//2-1):
  print("Yes")
else:
  print("No")