Buggy python submission (verdict: Runtime Error):
n,p=map(int,input().split())

def yakusuSub(p,d,arr):
    if p==1:return arr
    if p/d==int(p/d):
        arr.append(d)
        return yakusuSub(p/d,d,arr)
    else:
        return yakusuSub(p,d+1,arr)
 
def yakusu(p):
    return yakusuSub(p,2,[])
 
if n==1:
    print(p)
    exit()
 
y=yakusu(p)
if not y:
    print(1)
    exit()
ans=1
cnt=1
before=0
f=False
for i in y:
    if i==before:
        cnt+=1
    else:
        cnt=1
    if cnt>=n:
        ans*=i
        cnt=1
        f=True
    before=i
if f:
    print(ans)
else:
    print(p)

Fixed submission:
n, p = map(int, input().split())
if n == 1:
    print(p)
else:
    for i in range(1, round(p**(1/n))+1):
        if p % i**n ==0:
            res = i
    print(res)

Buggy python submission (verdict: Runtime Error):
n,p=map(int,input().split())



def yakusuSub(p,d,arr):
    if p==1:return arr
    if p/d==int(p/d):
        arr.append(d)
        return yakusuSub(p/d,d,arr)
    else:
        return yakusuSub(p,d+1,arr)

def yakusu(p):
    return yakusuSub(p,2,[])

if n==1:
    print(p)
    exit()

y=yakusu(p)
if not y:
    print(1)
    exit()
ans=1
cnt=1
before=0
f=False
for i in y:
    if i==before:
        cnt+=1
    else:
        cnt=1
    if cnt>=n:
        ans*=i
        cnt=1
        f=True
    before=i
if f:
    print(ans)
else:
    print(p)

Fixed submission:
n, p = map(int, input().split())
if n == 1:
    print(p)
else:
    for i in range(1, round(p**(1/n))+1):
        if p % i**n ==0:
            res = i
    print(res)

Buggy python submission (verdict: Runtime Error):
n,p=map(int,input().split())



def yakusuSub(p,d,arr):
    if p==1:return arr
    if p/d==int(p/d):
        arr.append(d)
        return yakusuSub(p/d,d,arr)
    else:
        return yakusuSub(p,d+1,arr)

def yakusu(p):
    return yakusuSub(p,2,[])

if n==1:
    print(p)
    exit()

y=yakusu(p)
ans=1
cnt=1
before=0
f=False
for i in y:
    if i==before:
        cnt+=1
    else:
        cnt=1
    if cnt>=n:
        ans*=i
        cnt=1
        f=True
    before=i
if f:
    print(ans)
else:
    print(p)

Fixed submission:
n, p = map(int, input().split())
if n == 1:
    print(p)
else:
    for i in range(1, round(p**(1/n))+1):
        if p % i**n ==0:
            res = i
    print(res)

Buggy python submission (verdict: Runtime Error):
n,p=map(int,input().split())

def yakusuSub(p,d,arr):
    if p==1:return arr
    if p/d==int(p/d):
        arr.append(d)
        return yakusuSub(p/d,d,arr)
    else:
        return yakusuSub(p,d+1,arr)

def yakusu(p):
    return yakusuSub(p,2,[])

if n==1:
    print(p)
    exit()

y=yakusu(p)
ans=1
cnt=1
before=0
for i in y:
    if i==before:
        cnt+=1
    else:
        cnt=1       
    if cnt>=n:
        ans*=i
        cnt=1
    before=i
print(ans)

Fixed submission:
n, p = map(int, input().split())
if n == 1:
    print(p)
else:
    for i in range(1, round(p**(1/n))+1):
        if p % i**n ==0:
            res = i
    print(res)

Buggy python submission (verdict: Runtime Error):
n,p=map(int,input().split())



def yakusuSub(p,d,arr):
    if p==1:return arr
    if p/d==int(p/d):
        arr.append(d)
        return yakusuSub(p/d,d,arr)
    else:
        return yakusuSub(p,d+1,arr)

def yakusu(p):
    return yakusuSub(p,2,[])

if n==1:
    print(p)
    exit()

y=yakusu(p)
ans=1
ys=set(y)
for i in ys:
    if y.count(i)>=n:
        ans*=i
print(ans)

Fixed submission:
n, p = map(int, input().split())
if n == 1:
    print(p)
else:
    for i in range(1, round(p**(1/n))+1):
        if p % i**n ==0:
            res = i
    print(res)