qyliang/CodeNanoFix huggingface dataset:
Buggy code:
A, B, C = map(int, input().split())
cnt = B

if C <= A + B:
  cnt += C
else:
  cnt += A+B

print(cnt)

Fixed code:
A, B, C = map(int, input().split())
cnt = B
 
if C <= A + B:
  cnt += C
else:
  cnt += A+B+1
  
print(cnt)
Buggy code:
a,b,c = map(int,input().split())
if c < a + b + 1: 
    print(b + c)
else:
    print(a + 2 * b -1)

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

print(b + c if c <= a + b else a + 2*b + 1)
Buggy code:
A, B, C = map(int, input().split())
if A + B <=  C - 1:
    print(B + C)
else:
    print(A + 2 * B + 1)

Fixed code:
A, B, C = map(int, input().split())
if C - B - A <= 0:
    print(C + B)
elif C - B == A:
    print(2 * B + A)
else:
    print(2 * B + A + 1)
Buggy code:
a,b,c = tuple([int(i) for i in input().split()])

if c > a+b+1:
  c = a+b-1
  
print(b+c)

Fixed code:
a,b,c = tuple([int(i) for i in input().split()])

if c > a+b+1:
  c = a+b+1
  
print(b+c)
Buggy code:
a,b,c = map(int,input().split())
if a+b <c:
    C = a+b-c+1
    print(C+b)
if a+b >=c:
    print(b+c)

Fixed code:
a,b,c = map(int,input().split())
if a+b <c:
    C = a+b+1+b
    print(C)
if a+b >=c:
    print(b+c)
Buggy code:
a, b, c = map(int,input().split())
r = 0
if c <= a + b + 1:
  r = b + c
else:
  r = a + b + 1
print(r)

Fixed code:
a, b, c = map(int,input().split())
r = 0
if c <= a + b + 1:
  r = b + c
else:
  r = a + 2 * b + 1
print(r)
Buggy code:
A, B, C = [int(x) for x in input().split()]
print(B+max(A+B+1, C))


Fixed code:
A,B,C = [int(x) for x in input().split()]
print(min(A+B+1,C)+B)
Buggy code:
a,b,c=(int(i) for i in input().split())
if b<c:
  print(2*b)
else:
  if a>c:
    print(b+c)
  else:
    print(2*b+a+1)

Fixed code:
a, b, c = (int(i) for i in input().split())
if a + b + 1 > c:
    print(b + c)

else:
    print(2 * b + a + 1)
Buggy code:
l = list(map(int,input().split()))
if l[0]+l[1] > l[2]:
  print(l[1]+l[2])
else:
  print(l[0]+2*l[1])

Fixed code:
l = list(map(int,input().split()))
if l[0]+l[1] >= l[2]:
  print(l[1]+l[2])
else:
  print(l[0]+2*l[1]+1)
Buggy code:
inputint = list(map(int,input().split()))

a = inputint[0] + inputint[1]
b = inputint[2]
result = 0
if a >= b:
    result = inputint[1] + b
elif a < b:
    result = inputint[1]*2

print(result)

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

a = inputint[0] + inputint[1] + 1
b = inputint[2]
result = 0
if a >= b:
    result = inputint[1] + b
elif a < b:
    result = inputint[1]*2 + inputint[0] + 1

print(result)
Buggy code:
l = list(map(int, input().split()))
A = l[0]
B = l[1]
C = l[2]

if C - B - A >= 0:
    print(A + 2*B + 1)
else:
    print(B + C)

Fixed code:
l = list(map(int, input().split()))
A = l[0]
B = l[1]
C = l[2]

if C - B - A > 0:
    print(A + 2*B + 1)
elif C == B + A:
    print(A + 2*B)
else:
    print(B + C)
Buggy code:
a=[int(x) for x in input().split()]
if(a[0]+a[1]>a[2]):
  print(a[1]+a[2])
else:
  print(2*a[1]+a[0])

Fixed code:
a=[int(x) for x in input().split()]
if(a[0]+a[1]>=a[2]):
  print(a[1]+a[2])
else:
  print(2*a[1]+a[0]+1)
Buggy code:
n = [int(x) for x in input().split()]
A = n[0]
B = n[1]
C = n[2]

score = 0
if A + B >= C:
    print(B + C)
elif A + B < C:
    poison = C - B - A
    print(B + C - poison)

Fixed code:
n = [int(x) for x in input().split()]
A = n[0]
B = n[1]
C = n[2]

score = 0
if A + B >= C:
    print(B + C)
elif C > A + B:
    poison = C - B - A
    print(B + C - poison + 1)
Buggy code:
ipt = input().split()

a = ipt[0]
b = ipt[1]
c = ipt[2]

if c <= a + b + 1:
  print(c + b)
else:
  print(a + b + 1 + b)

Fixed code:
ipt = input().split()

a = int(ipt[0])
b = int(ipt[1])
c = int(ipt[2])

if c <= a + b + 1:
  print(c + b)
else:
  print(a + b + 1 + b)
Buggy code:
a, b, c = map(int, input().split())

if a + b == 0:
    print(1)
if c - 1 > a + b:
    print(a + b + 2)
else:
    print(b + c)

Fixed code:
a, b, c = map(int, input().split())
ans = 0
if a + b >= c - 1:
    ans = b + c
else:
    ans = a + b + b + 1
print(ans)
Buggy code:
a,b,c = list(map(int,input().split()))
if (a+b)<c:
    print(a+b)
else:
    print(b+c)

Fixed code:
a,b,c = list(map(int,input().split()))
if a+b<c:
    poison = a+b+1
else:
    poison = c
print(b+poison)
Buggy code:
import numpy as np
a,b,c=list(map(int, input().split()))
#print(a,b,c)
min(c,a+b+1)+b

Fixed code:
import numpy as np
a,b,c=list(map(int, input().split()))
#print(a,b,c)
print(min(c,a+b+1)+b)
Buggy code:
A, B, C = [int(elem) for elem in input().split()]


if A + B >= C:
    print(B + C)
else:
    print(B + (A + B))


Fixed code:
A, B, C = [int(elem) for elem in input().split()]


if A + B >= C:
    print(B + C)
else:
    print(B + (A + B) + 1)
Buggy code:
a,b,c=map(int,input().split())
if a+b+1<c:
    print(b+a+b+1)
elif a+b+1==c:
    print(b+c)
else a+b>c:
    if b+1>=c:
        print(c+1+c)
    elif b+1<c:
        print(b+c+1)

Fixed code:
a,b,c=map(int,input().split())
if a+b+1<c:
    print(b+a+b+1)
elif a+b+1==c:
    print(b+c)
elif a+b+1>c:
    if b+1>=c:
        print(b+c)
    elif b+1<c:
        print(b+c)
Buggy code:
x,y,z = map(int, input().split())

def caneat(a,b,c):
    if a+b >= c+1:
        return b + c
    else:
        return b + (a + b + 1)

print(caneat(x,y,z))

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

def caneat(a,b,c):
    if a+b >= c-1:
        return b + c
    else:
        return b + (a + b + 1)

print(caneat(x,y,z))
Buggy code:
a,b,c = map(int,input().strip().split(" "))
if c<=2*(a+b)+1:
    ans = b+c
else:
    ans = 2*(a+b)+1+b
print(ans)


Fixed code:
a,b,c = map(int,input().strip().split(" "))
if c<=(a+b)+1:
    ans = b+c
else:
    ans = (a+b)+1+b
print(ans)
Buggy code:
nums = input().split(' ')

BadCookie = int(nums[0])
GoodCookie = int(nums[1])
GoodPoson = int(nums[2])
if GoodCookie + BadCookie > GoodPoson:
    print(GoodCookie+GoodPoson)
else:
    print(GoodCookie+BadCookie+2)



Fixed code:
nums = input().split(' ')

BadCookie = int(nums[0])
GoodCookie = int(nums[1])
GoodPoson = int(nums[2])
if GoodCookie + BadCookie > GoodPoson:
    print(GoodCookie+GoodPoson)
elif GoodCookie + BadCookie < GoodPoson:
    print(GoodCookie+BadCookie+GoodCookie+1)
else:
    print(GoodCookie+GoodPoson)
Buggy code:
A,B,C = map(int,input().split())
ans = 0
if B >= C:
    ans = B + C
    print(ans)

else:
    ans = B * 2
    if A >= C - B:
        ans += C
    else:
        ans += A + 1

    print(ans)

Fixed code:
A,B,C=map(int,input().split())
ans=0
if A+B>=C-1:
  print(B+C)
else:
  print(A+2*B+1)
Buggy code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
 
input = sys.stdin.readline
a, b, c = map(int, input().split())
if (a + b) > c:
    print(b + c)
    exit(0)
else:
    print(b + c + 1)
    exit(0)


Fixed code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
 
input = sys.stdin.readline
a, b, c = map(int, input().split())
if (a + b) >= c:
    print(b + c)
    exit(0)
else:
    print(a + 2 * b + 1)
    exit(0)
Buggy code:
a,b,c=int(input().split())
print(b+min(a+b+1,c))

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

ans=b
ans+=min(c,a+b+1)

print(ans)
Buggy code:
A, B, C = map(int, input().split())

if C > A + B:
    print(B + A + B)
elif C <= A + B:
    print(B + C)

Fixed code:
A, B, C = map(int, input().split())

if C > A + B:
    print(B + A + B + 1)
elif C <= A + B:
    print(B + C)
Buggy code:
A,B,C = map(int,input().split())

gedoku = A+B

if gedoku>C:
    print(B+C)
else:
    print(gedoku+1+B)


Fixed code:
A,B,C=map(int,input().split())
score=0
gedoku=A+B

if(C>(gedoku+1)):
    score=B+gedoku+1
else:
    score=B+C
print(score)
Buggy code:
A,B,C = map(int,input().split())

if A+B>=C:
    print(B+C)
print(A+2*B+1)

Fixed code:
A, B, C = map(int, input().split())

if C == A + B:
    print(B + C)
elif C > A + B:
    print(A + 2 * B + 1)
elif C < A + B:
    print(B + C)
Buggy code:
a,b,c = map(int,input().split())
if a+b < c:
    print(a+b+b)
else:
    print(b+c)


Fixed code:
a,b,c = map(int,input().split())
if a+b < c:
    print(a+b+b+1)
else:
    print(b+c)
Buggy code:
A, B, C = map(int, input().split())
if C <= B:
    print(B+C)
else:
    print((min(A+B, C)+1) + B)

Fixed code:
A, B, C = list(map(int, input().split()))

if C<=A+B+1:
    print(B+C)
else:
    print(A+B+1+B)
Buggy code:
a, b, c = list(map(int, input().split()))
if a + b >= c - 1:
    print(b+c)
else:
    print(a+2b+1)

Fixed code:
a,b,c = list(map(int, input().split()))
if a+b>=c:
    print(c+b)
else:
    print(a+b+b+1)
Buggy code:
#coding: utf-8
A, B, C = map(int, input().split())
if B >= C:
    print(A + C)
else:
    print(A + B + 1)

Fixed code:
# -*- coding: utf-8 -*-
A, B, C = map(int, input().split())

if A + B + 1 >= C:
    print(B+C)
else:
    print(A+B+1+B)
Buggy code:
A,B,C =[int(i)for i in input().split()]
if C+1 <= A+B:
    print(B+C)
else:
    print(A+2*B+1)

Fixed code:
A, B, C = (int(i) for i in input().split())

if C <= A + B + 1:
    print(B + C)
else:
    print(2 * B + A + 1)
Buggy code:
a,b,c = map(int,input().split())
ans = 0
if b > c:
  print(b+c)
elif a+b > c:
  print(b+c)
else:
  print(a+b+1)

Fixed code:
a,b,c = map(int,input().split())
ans = 0
if a+b == c:
    ans += c
elif a+b > c:
    ans += c
else:
    ans += a+b+1
ans += b
print(ans)
Buggy code:
A, B, C = map(int, input().split())
if C <= B:
    print(B+C)
else:
    print(min(A+B, C) + B)

Fixed code:
A,B,C = map(int,input().split())

if A+B < C:
    print(min(A+B,C)+B+1)
else:
    print(B+C)
Buggy code:

A,B,C = map(int,input().split())

if C + 1 <= A + B:
    print (B+C)

else:
    print (B + (A+B+1))


Fixed code:
A,B,C=list(map(int,input().split()))

if C<=A+B+1:
    res=B+C
else:
    res=A+B+1+B
    
print(res)
Buggy code:
A,B,C = map(int,input().split())
if A+B>C:
    print(B+C)
else:
    print(A+B+B+1)

Fixed code:
A,B,C=list(map(int,input().split()))

if A+B+1>=C:
	print(B+C)
else:
	print(A+B+1+B)
Buggy code:
A,B,C = map(int,input().split())

if B >= C:
    print(B+C)
else:
    if A >= (C-B)-1:
        print(B+C)
    else:
        print(B+A+1)

Fixed code:
A, B, C = list(map(int, input().split()))

if A+B>=C-1:
    ans = B+C
else:
    ans = A+B+1+B
print(ans)
Buggy code:
a, b, c = list(map(int, input().split()))
if a + b >= c:
  print(b + c)
else:
  print(a + b + b)
  
  
    



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

if(a+b+1 >= c): print(b+c)
else: print(a+b+b+1)
Buggy code:
A, B, C = map(int, input().split())

if C < A+B:
  print(C+B)
else:
  print(A+2*B+1)

Fixed code:
A, B, C = list(map(int, input().split()))
if C <= A + B + 1:
    print(B + C)
else:
    print(2 * B + A + 1)
Buggy code:
a,b,c = (int(i) for i in input().split())  
if a + b >= c:
  print(b + c)
else:
  print(a + b + b)

Fixed code:
a,b,c = (int(i) for i in input().split())
sum = b
if c >= a+b+1:
    sum += a+b+1
else:
    sum += c

print(sum)
Buggy code:
a, b, c = map(int, input().split())

if a+b<=c:
    print(a+b+1)
else:
    print(b+c)

Fixed code:
a, b, c = map(int, input().split())
count = 0
if a + b < c:
    print(a + b + 1 + b)
else:
    print(c + b)
Buggy code:
a, b, c = map(int, input().split())
if c >= a + b +1:
  print(a + 2*b + 1)
else:
  print(a + c )


Fixed code:
#AGC030
a,b,c=map(int,input().split())
if a+b>=c:
    print(b+c)
else:
    print(a+2*b+1)
Buggy code:
a,b,c=map(int,input().split())
anti=a+b
if c> anti-1:
    print(a+b)
else :
    print(anti*+1+a)

Fixed code:
a, b, c = map(int, input().split())
if a + b >= c - 1:
  print(b+c)
else:
  print(a + 2 * b + 1)
Buggy code:
a,b,c=map(int,input().split())
anti=a+b
if c> anti-1:
    print(b+c)
else :
    print(anti+1+b)

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


if a+b+1 >= c:
    print(b+c)
else:
    print(b+a+b+1)
Buggy code:
a,b,c = map(int, input().split())
if a+b >= c-1:
  print(b+c)
else:
  print(c-a-1)

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

A = a + b

if A >= c:
    print(b + c)
else:
    print(A+b+1)
Buggy code:
a,b,c = map(int,input().split())
print(min(b+c,a+b+1))

Fixed code:
a,b,c=map(int, input().split())
c=min(c,a+b+1)
print(b+c)
Buggy code:
a,b,c=map(int,input().split())
anti=a+b
if c+1< anti:
    print(b+c)
else :
    print(anti+1+b)

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

if (a+b) < c-1:
    print((a+b)+1 + b)
else:
    print(b+c)
Buggy code:
A, B, C = map(int, input().split())

if A + B > C:
    print(B + C)
else:
    print(2 * B + A + 1)

Fixed code:
A, B, C = map(int, input().split())

if C > A + B:
    print(B + B + A + 1)
else:
    print(B + C)
Buggy code:
a,b,c=map(int,input().split())
if a+b>c:print(b+c)
else:print(a+b+b+1)

Fixed code:
a,b,c = map(int,input().split())
if c > a+b+1 :
    c = a+b+1
print(c+b)
Buggy code:
a,b,c=map(int,input().split())
if a+b>=c-1:
    print(b+c)
else:
    print(b*2+1)

Fixed code:
a, b, c = map(int, input().split())
if a + b >= c:
	print(b + c)
else:
	print(a + 2 * b + 1)
Buggy code:
A,B,C=map(int,input().split())
B+=min(A+1,C)
print(B)

Fixed code:
A,B,C=map(int,input().split())

X=min(A+B+1,C)

print(X+B)
Buggy code:
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr
N,K=map(int,input().split())
L=factorization(N)
ans=1
for i in L:
  ans*=L[0]**(L[1]//N)
print(ans)

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

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

ans = 1
for sosuu, cnt in factorization(P):
  ans *= (sosuu ** (cnt//N))
  
print(ans)
Buggy code:
n,p=map(int,input().split())
a=1
for i in range(2,int(p**0.5)+2):
  if p%i==0:
    c=0
    while p%i!=0:
      p//=i
      c+=1
	a*=(c//n)*i
  if p==1:
    break
print(a)

Fixed code:
n,p=map(int,input().split())
if n==1:
    print(p)
    exit()
a=1
for i in range(2,int(p**0.5)+2):
  if p%i==0:
    c=0
    while p%i==0:
      p//=i
      c+=1
    a*=max(i**(c//n),1)
  if p==1:
    break
print(a)
Buggy code:
INFTY = 10**12
Q = [1 for _ in range(INFTY)]
Q[0]=0
Q[1]=0
for i in range(2,int(INFTY**0.5)+1):
    for j in range(i*i,INFTY,i):
        Q[j]=0
A = []
for i in range(INFTY):
    if Q[i]==1:
        A.append(i)
N,P = map(int,input().split())
C = {}
for a in A:
    if P%a==0:
        C[a] = 0
        while P%a==0:
            P = P//a
            C[a] += 1
b = 1
for a in C:
    b *= a**(C[a]//N)
print(b)

Fixed code:
INFTY = 10**6
Q = [1 for _ in range(INFTY)]
Q[0]=0
Q[1]=0
for i in range(2,int(INFTY**0.5)+1):
    for j in range(i*i,INFTY,i):
        Q[j]=0
A = []
for i in range(INFTY):
    if Q[i]==1:
        A.append(i)
N,P = map(int,input().split())
C = {}
for a in A:
    if P%a==0:
        C[a] = 0
        while P%a==0:
            P = P//a
            C[a] += 1
if P>1:
    C[P] = 1
b = 1
for a in C:
    b *= a**(C[a]//N)
print(b)
Buggy code:
def factorize(n):
    fct = []  # prime factor
    b, e = 2, 0  # base, exponent
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct
 
 
 
def main():
    n, p = map(int, input().split())
    l = factorize(p)
    ans = 1
    for ll in l:
        if ll[1] >= n:
            ans *= ll[0]**(ll[1]//2)
    print(ans)
 
 
if __name__ == '__main__':
    main()

Fixed code:
def factorize(n):
    fct = []  # prime factor
    b, e = 2, 0  # base, exponent
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct
 
 
 
def main():
    n, p = map(int, input().split())
    l = factorize(p)
    ans = 1
    for ll in l:
        if ll[1] >= n:
            ans *= ll[0]**(ll[1]//n)
    print(ans)
 
 
if __name__ == '__main__':
    main()
Buggy code:
N, P = map(int, input().split())

import math

MAX = 1000000   # MAX is max number
prime = [True]*(MAX+1)
prime[0] = False
prime[1] = False

R = int(math.sqrt(MAX))

for i in range(2, R+1):
    if prime[i]:
        cnt = 2
        while i * cnt <= MAX:
            prime[i * cnt] = False
            cnt += 1

dp = [0]*(MAX+1)

for i in range(2, MAX+1):
    if prime[i]:
        while P % i == 0:
            dp[i] += 1
            P //= i

ans = 1
for i in range(2, MAX+1):
    if dp[i] >= N:
        ans *= (dp[i] // N) * i

if N == 1:
    print(N)
else:
    print(ans)


Fixed code:
N, P = map(int, input().split())
p = P
import math

MAX = 1000000   # MAX is max number
prime = [True]*(MAX+1)
prime[0] = False
prime[1] = False

R = int(math.sqrt(MAX))

for i in range(2, R+1):
    if prime[i]:
        cnt = 2
        while i * cnt <= MAX:
            prime[i * cnt] = False
            cnt += 1

dp = [0]*(MAX+1)

for i in range(2, MAX+1):
    if prime[i]:
        while P % i == 0:
            dp[i] += 1
            P //= i

ans = 1
for i in range(2, MAX+1):
    if dp[i] >= N:
        ans *= i ** (dp[i] // N)

if N == 1:
    print(p)
else:
    print(ans)
Buggy code:
inpl = lambda: list(map(int,input().split()))
from math import sqrt
class Factorizer():
    def __init__(self):
        self.primes_ceil = 3
        self.primes = [2]

    def find_primes(self, primes_ceil):
        prev_primes_ceil, self.primes_ceil = self.primes_ceil, primes_ceil
        for i in range(prev_primes_ceil, self.primes_ceil):
            sieve = 1
            for p in self.primes:
                if p*p > i:
                    break
                elif i % p == 0:
                    sieve = 0
                    break
            if sieve == 0:
                continue
            else:
                self.primes.append(i)

    def __call__(self, n):
        if (self.primes_ceil-1)**2 < n:
            self.find_primes(int(sqrt(n))+1)
        factors = []
        powers = []
        for p in self.primes:
            if p * p > n:
                break
            elif n % p == 0:
                n //= p
                k = 1
                while n % p == 0:
                    n //= p
                    k += 1
                factors.append(p)
                powers.append(k)
        if n > 1:
            factors.append(n)
            powers.append(1)
        return factors, powers

N, P = inpl()
fct=Factorizer()
f, p = fct(P)
print(f,p)
n = len(f)
ans = 1
for i in range(n):
    ans *= f[i]**(p[i]//N)
print(ans)

Fixed code:
inpl = lambda: list(map(int,input().split()))
from math import sqrt
class Factorizer():
    def __init__(self):
        self.primes_ceil = 3
        self.primes = [2]

    def find_primes(self, primes_ceil):
        prev_primes_ceil, self.primes_ceil = self.primes_ceil, primes_ceil
        for i in range(prev_primes_ceil, self.primes_ceil):
            sieve = 1
            for p in self.primes:
                if p*p > i:
                    break
                elif i % p == 0:
                    sieve = 0
                    break
            if sieve == 0:
                continue
            else:
                self.primes.append(i)

    def __call__(self, n):
        if (self.primes_ceil-1)**2 < n:
            self.find_primes(int(sqrt(n))+1)
        factors = []
        powers = []
        for p in self.primes:
            if p * p > n:
                break
            elif n % p == 0:
                n //= p
                k = 1
                while n % p == 0:
                    n //= p
                    k += 1
                factors.append(p)
                powers.append(k)
        if n > 1:
            factors.append(n)
            powers.append(1)
        return factors, powers

N, P = inpl()
fct=Factorizer()
f, p = fct(P)
n = len(f)
ans = 1
for i in range(n):
    ans *= f[i]**(p[i]//N)
print(ans)
Buggy code:
N, P = map(int, input().split())
if N == 1:
    print(P)
    exit()
if int(P ** (1 / N)) < 2:
    print(1)
print(int(P ** (1 / N)) + 10)
for n in range(int(P ** (1 / N))+1, 0, -1):
    if P % (n ** N) == 0:
        print(n)
        break

Fixed code:
N, P = map(int, input().split())
if N == 1:
    print(P)
    exit()
if int(P ** (1 / N)) < 2:
    print(1)
    exit()
for n in range(int(P ** (1 / N))+1, 0, -1):
    if P % (n ** N) == 0:
        print(n)
        break
Buggy code:
import math,sys

n,p=map(int,sys.stdin.readline().split())
limit = int(p ** (1/n))+1
if limit==1:
    print(1)
elif n==1:
    print(p)
else:
    cnt,ans=0,1

    while p % 2 == 0:
        p /= 2
        cnt += 1
    ans *= 2 ** cnt//n
    
    for div in range(3, limit, 2):
        cnt = 0
        while p % div == 0:
            cnt += 1
            p /= div
        if cnt >= n:
            ans *= div ** cnt // n
    print(ans)

Fixed code:
import math,sys

n,p=map(int,sys.stdin.readline().split())
limit = int(p ** (1/n))+1
if limit==1:
    print(1)
elif n==1:
    print(p)
else:
    cnt,ans=0,1

    while p % 2 == 0:
        p /= 2
        cnt += 1
    ans *= pow(2, cnt//n)
    
    for div in range(3, limit, 2):
        cnt = 0
        while p % div == 0:
            cnt += 1
            p /= div
        if cnt >= n:
            ans *= pow(div, cnt // n)
    print(ans)
Buggy code:
N, P = map(int,input().split())
 
output=1
 
if P==1:
  
else:
  for num in range(2,round(P**(1/N))+1):
    if P%(num**N) == 0:
      output = num
 
print(output)

Fixed code:
N, P = map(int,input().split())
 
output=1
 
if P==1:
  output=1
elif N==1:
  output=P
else:
  for num in range(2,round(P**(1/N))+1):
    if P%(num**N) == 0:
      output = num
 
print(output)
Buggy code:
# -*- coding: utf-8 -*-
"""
Created on Mon Dec 31 14:30:45 2018

@author: Yamazaki Kenichi
"""

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

limit = int(pow(P,1/N)//1+1)

if N == 1:
    ans = P
else:
    ans = 1
    for i in range(1,limit+1):
        if P % pow(i,N) == 0:
            ans = i
            print(ans)
    
print(ans)


Fixed code:
# -*- coding: utf-8 -*-
"""
Created on Mon Dec 31 14:30:45 2018

@author: Yamazaki Kenichi
"""

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

limit = int(pow(P,1/N)//1)

if N == 1:
    ans = P
elif limit == 1:
    ans = 1
else:
    ans = 1
    for i in range(2,limit+2):
        if P % pow(i,N) == 0:
            ans = i
            
print(ans)
Buggy code:
import collections
import math

n, p = [int(i) for i in input().split()]
d = collections.defaultdict(lambda: 0)

def bunkai(q):
	if q == 1:
		return 0
	for i in range(2, math.ceil(math.sqrt(p))):
		if q % i == 0:
			d[i] += 1
			return bunkai(q//i)

if n == 1 or p == 1:
	print(p)
else:
	bunkai(p)
	ans = 1

	for j in d.key
		k = d[j]
		if k // n >= 1:
			ans *= j**(k//n)
	print(ans)


Fixed code:
import collections
import math

n, p = [int(i) for i in input().split()]
d = collections.defaultdict(lambda: 0)

def bunkai(q):
	if q == 1:
		return 0
	for i in range(2, math.ceil(math.sqrt(p))):
		if q % i == 0:
			d[i] += 1
			return bunkai(q//i)

if n == 1 or p == 1:
	print(p)
else:
	bunkai(p)
	ans = 1

	for j in d.keys():
		k = d[j]
		if k // n >= 1:
			ans *= j**(k//n)
	print(ans)
Buggy code:
N,P = map(int,input().split())
ans=1
i=2
if N==1:
  print(P)
  exit()
if N>=40 or P==1:
  print(1)
  exit()
  
while i<=(P**(N/1)):
  while P%(i**N) == 0:
    ans *= i
    P = P//(i**N)
  if i==2:
    i+=1
  else:
    i+=2
print(ans)

Fixed code:
N,P = map(int,input().split())
ans=1
i=2
if N==1:
  print(P)
  exit()
if N>=40 or P==1:
  print(1)
  exit()
  
while i<=(P**(1.05/N)):
  while P%(i**N) == 0:
    ans *= i
    P = P//(i**N)
  if i==2:
    i+=1
  else:
    i+=2
print(ans)
Buggy code:
N,P = map(int,input().split())
ans=1
if N==1:
  print(P)
  exit()
elif P==1 or N>=40:
  print(1)
  exit()
else:
  i=2
  while i<=P**(1/N):
    count = 0
    while P%i==0:
      P/=i
      count+=1
      print(P)
    cn=count//N
    ans*=i**cn
    if i==2:
      i+=1
    else:
      i+=2
print(int(ans))

Fixed code:
N,P = map(int,input().split())
ans=1
i=2
if N==1:
  print(P)
  exit()
if N>=40 or P==1:
  print(1)
  exit()
  
while i**N<=P:
  while P%(i**N) == 0:
    ans *= i
    P = P//(i**N)
  if i==2:
    i+=1
  else:
    i+=2
print(ans)