criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include<iostream>
using namespace std;
int main(){
   long int n,p;
   cin>>n>>p;
   int a=2;
   long int ar[p]={};
   while(p>=a*a){
      if(p%a==0){
         ar[a]++;
         p/=a;
      }
      else{
         a++;
      }
   }
   int ans=1;
   for(int i=1;i<=a;j++){
      if(ar[i]>=n)ans=ans*i;
   }
   cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:21: error: 'j' was not declared in this scope
   18 |    for(int i=1;i<=a;j++){
      |                     ^
Language: C++

#include <bits/stdc++.h>
#include <cmath>
#include <limits>
using namespace std;

int main()
{
    int n;
    int p;

    cin >> n >> p;

    if (n == 1)
    {
        cout << p << endl;
        exit();
    };

    int ans;
    ans = 1;
    float power;

    for (int i = 2; i <= p; i++)
    {
        power = pow(p, i);
        if (p % power == 0)
        {
            ans = i;
        };
        if (power >= p)
        {
            break;
        };
    };

    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: too few arguments to function 'void exit(int)'
   16 |         exit();
      |         ~~~~^~
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 from a.cc:1:
/usr/include/stdlib.h:756:13: note: declared here
  756 | extern void exit (int __status) __THROW __attribute__ ((__noreturn__));
      |             ^~~~
a.cc:26:15: error: invalid operands of types 'int' and 'float' to binary 'operator%'
   26 |         if (p % power == 0)
      |             ~ ^ ~~~~~
      |             |   |
      |             int float
Language: C++

#include <map>
#include <algorithm>
#include <cassert>
#include <climits>
#include <complex>
#include <cstdio>
#include <string>
#include <iostream>
#include <queue>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
using ll = long long;
using ld = long double;

template<class T> bool chmin(T &a, T b) { return a>b?(a=b,true):false; }
template<class T> bool chmax(T &a, T b) { return a<b?(a=b,true):false; }
#define forn(i,x,y) for(int i=(x);i<(int)(y);i++)
#define rep(i,y) for(int i=0;i<(int)(y);i++)
#define repb(i,n) for(int i=(int)(n)-1;i>=0;i--)
#define all(a) (a).begin(), (a).end()
#define uni(a) (a).erase(unique(all(a)), (a).end())
#define bit(n, i) (((n) >> (i)) & 1)
#define bitcount(n) __builtin_popcountll(n)
#define debug(X) cerr<<" "<<#X<<" = "<<X<<endl;

template<class T> ostream &operator<<(ostream &os, vector<T> &v) {
  for (auto it = v.begin(); it != v.end(); ++it) {
    if (it != v.begin()) os << " ";
    os << *it;
  }
  return os;
}
# define int ll
ll N,P;
signed main() {
  cin>>N>>P;
  if (N==1) {
    cout << P << endl;
    return 0;
  }
  repb(i, (int)pow(P, 1./N)+10) {
    int j = 1;
    rep(_,N) {
      j*=i;
    }
    if (bf&&P%j==0) {
      cout << i << endl;
      return 0;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:48:9: error: 'bf' was not declared in this scope
   48 |     if (bf&&P%j==0) {
      |         ^~
Language: C++

#include<stdio.h>
#include<math.h>
#define g 1000000000000;

int man(int x,int y);
int main(void)
{
   int n, i, x=1, p, z;
   int a[10000];

   scanf("%d %d",&n,&p);

   for(i=0;i<=n;i++)
   {
       x*=a[i];
       if(p==x)
       {
            z=man(a[i],a[i-1]);
       }
   }
   
   printf("%d\n",z);

   return 0;
}
 
int man(x,y)
{
    int r;

    while(r=x%y,r!=0)
    {
        x=y;
        y=r;
    }
     
     return y;
}

        

Compiler output:
a.cc:27:9: error: 'int man' redeclared as different kind of entity
   27 | int man(x,y)
      |         ^
a.cc:5:5: note: previous declaration 'int man(int, int)'
    5 | int man(int x,int y);
      |     ^~~
a.cc:27:9: error: 'x' was not declared in this scope
   27 | int man(x,y)
      |         ^
a.cc:27:11: error: 'y' was not declared in this scope; did you mean 'yn'?
   27 | int man(x,y)
      |           ^
      |           yn
Language: C++

#include <iostream>
#include <cmath>
#include <vector>

using namespace std;

int main()
{
	long long n, p, tmp;
	cin >> n >> p;
	tmp = p;
	vector<int> v;
	vector<int> c;

	if (n == 1)
		cout << p << endl;
	else {

		//素因数分解?
		while (tmp != 1) {
			for (long long j = 2; j < p ; j++) {
				if (tmp % j == 0) {
					v.push_back(j);
					tmp /= j;
					break;
				}
			}
		}

		for (int i = 0; i < v.size(); i++) {
			if (count(v.begin(), v.end(), v[i]) == n)
				c.push_back(v[i]);
		}

		sort(c.begin(), c.end());
		c.erase(unique(c.begin(), c.end()), c.end());

		long long result = 1;
		for (int i = 0; i < c.size(); i++)
			result *= c[i];

		if (c.size() == 0)
			cout << "1" << endl;	
		else
			cout << result << endl;
	}

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:29: error: 'count' was not declared in this scope
   31 |                         if (count(v.begin(), v.end(), v[i]) == n)
      |                             ^~~~~
a.cc:35:17: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   35 |                 sort(c.begin(), c.end());
      |                 ^~~~
      |                 sqrt
a.cc:36:25: error: 'unique' was not declared in this scope
   36 |                 c.erase(unique(c.begin(), c.end()), c.end());
      |                         ^~~~~~
Language: C++

// #include <bits/stdc++.h>
#include <map>
#include <set>
#include <ctime>
#include <cstring>
#include <queue>
#include <iostream>
#include <algorithm>
// #include "misc/print.cpp"
// #include "misc/perft.cc"
using namespace std;

#define INF 1000000000
#define ll long long
#define dbl double
#define ull unsigned ll
#define vi vector<int>
#define vll vector<ll>
#define vvi vector<vi>
#define vvvll vector<vector<vector<ll>>>
#define REP(i, n) for (int i = 0; i < (int)n; ++i)
#define all(x) begin(x), end(x)
#define contains(a, x) (a.find(x) != end(a))
#define REP(i, n) for (int i = 0; i < (int)n; ++i)
#define F(i,a,b) for(int i = (int)(a); i < (int)(b); ++i)
#define RF(i,a,b)for(int i = (int)(a); i >= (int)(b); --i)
#define mod 1000000009

void fast() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
}

// vll randv(int n) {
// 	vll a = {};
// 	while (n--) a.push_back(rand()%50);
// 	return a;
// }



int gcd(int a, int b) {
	return (b == 0) ? a : gcd(b, a % b);
}


vi solve(ll p, int n)
{
	if (p==1)
		return {1};

	vi f;
	while (p%2 == 0) {
		f.push_back(2), p/=2;
	}
	for (int i = 3; i <= sqrt(p); i = i+2) { 
		while (p%i == 0) {
			f.push_back(i), p = p/i;
		}
	}
	if (p > 2) f.push_back(p);

	while ((int)f.size() > n) {
		REP (i, f.size()>>1) {
			f[i] *= f[f.size()-1];
			f.erase(begin(f)+(f.size()-1));
		}
	}
	while ((int)f.size() < n) f.push_back(1);
	return f;
}


int main() {
	fast();

	ll n,p;
	cin>>n>>p;
	// n = 5, p = 13246;

	vi a = solve(p, 2);
	int ans = a[0];

	REP(i,a.size()) cout << a[i] << " ";
	cout<<"\n";

	REP (i, a.size())
		ans = gcd(ans, a[i]);

	cout << ans << endl;

	return 0;
}


Compiler output:
a.cc: In function 'std::vector<int> solve(long long int, int)':
a.cc:57:30: error: 'sqrt' was not declared in this scope
   57 |         for (int i = 3; i <= sqrt(p); i = i+2) {
      |                              ^~~~
Language: C++

import sys

N,P=[int(i) for i in input().split()]
i=2
ans = 1
c=0
if N == 1:
  print(P)
  sys.exit()
while P>i*i:
  if P%i==0:
    P//=i
    c+=1
    if c==N:
      ans*=i
      c=0
  else:
    c=0
    i+=1
if P==i and c+1 ==N:
  ans*=i
print(ans)


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

//20181208
#include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>
#include <functional>
using namespace std;


unsigned long long nums[100000000000];
unsigned long long numi = 0;
unsigned long long maxd = 0;

void Factorization (unsigned long long value, unsigned long long div)
{
    if (value==0 || value==1) {
        nums[numi]=value ;
        numi++;
        if(div > maxd) maxd = div;
    }
    else if (value % div ==0) {
        nums[numi]=div ;
        numi++;
        if(div > maxd) maxd = div;
        Factorization (value/div, div);
    }
    else{
        Factorization (value, div+1);
    }
}


int main() {


    unsigned long long n,p;

    cin >> n >> p;

    if(n == 1) {cout << p << endl;}
    else if(p==1)cout<< 1;
    else{
        Factorization(p,2);

        unsigned long long count[maxd+1];
        unsigned long long ansv[maxd+1];
        for(unsigned long long j =0; j<maxd+1; j++){ count[j]=0; ansv[j]=0;}

        for(unsigned long long i=0; i<100;i++){
            for(unsigned long long j=0;j<maxd+1;j++){
                if(nums[i]==j) count[j]++;
            }
        }

        for(unsigned long long j = maxd+1; j>0;j--){
            if(count[j]>=n){
                ansv[j] = 1;
            }
        }

        unsigned long long ans = 1;
        for(unsigned long long j = 0; j<maxd+1 ;j++){
            if(ansv[j]==1) ans *= j;
        }

        cout << ans << endl;
    }

    return 0;
}

Compiler output:
/tmp/ccM0WfCC.o: in function `Factorization(unsigned long long, unsigned long long)':
a.cc:(.text+0x21): relocation truncated to fit: R_X86_64_PC32 against symbol `numi' defined in .bss section in /tmp/ccM0WfCC.o
a.cc:(.text+0x3f): relocation truncated to fit: R_X86_64_PC32 against symbol `numi' defined in .bss section in /tmp/ccM0WfCC.o
a.cc:(.text+0x4a): relocation truncated to fit: R_X86_64_PC32 against symbol `numi' defined in .bss section in /tmp/ccM0WfCC.o
a.cc:(.text+0x51): relocation truncated to fit: R_X86_64_PC32 against symbol `maxd' defined in .bss section in /tmp/ccM0WfCC.o
a.cc:(.text+0x66): relocation truncated to fit: R_X86_64_PC32 against symbol `maxd' defined in .bss section in /tmp/ccM0WfCC.o
a.cc:(.text+0x87): relocation truncated to fit: R_X86_64_PC32 against symbol `numi' defined in .bss section in /tmp/ccM0WfCC.o
a.cc:(.text+0xa5): relocation truncated to fit: R_X86_64_PC32 against symbol `numi' defined in .bss section in /tmp/ccM0WfCC.o
a.cc:(.text+0xb0): relocation truncated to fit: R_X86_64_PC32 against symbol `numi' defined in .bss section in /tmp/ccM0WfCC.o
a.cc:(.text+0xb7): relocation truncated to fit: R_X86_64_PC32 against symbol `maxd' defined in .bss section in /tmp/ccM0WfCC.o
a.cc:(.text+0xc8): relocation truncated to fit: R_X86_64_PC32 against symbol `maxd' defined in .bss section in /tmp/ccM0WfCC.o
/tmp/ccM0WfCC.o: in function `main':
a.cc:(.text+0x1ae): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
long long n,p,ans=1,tot;
long long poww(long long a,long long b)
{
	sum=1;
	long long summm;
	while (b)
	{
		if (b%2)
		{
			summm=sum*a;
			if (summm/a==sum&&summm<=p) sum=summm;
			else return -1;
		}
		b>>=1;
		summm=a*a;
		if (b==0||summm/a==a&&a<=p) a=summm;
		else return -1;
	}
	return sum;
}
int main()
{
	cin>>n>>p;
	if (n==1) 
	{
		printf("%lld",p);
		return 0;
	}
	for (long long i=2;i<=p&&p>=n&&poww(i,n)>0;++i,tot=0)
	{
		while (p%i==0) p/=i,tot++;
		for (;tot>n;tot-=n) ans*=i;
	}
	printf("%lld",ans);
}


Compiler output:
a.cc: In function 'long long int poww(long long int, long long int)':
a.cc:8:9: error: 'sum' was not declared in this scope
    8 |         sum=1;
      |         ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(void){
  long n,p,pp;
  int count = 0;
  cin >> n >> p;
  if(n==1||p==1){
    cout << p;
    return;
  }
  pp = p/n;
  vector<long> prime;
  int flag;
  for(int i=2;i<=10000;i++){
    flag = 0;
    for(int j=2;j<i;j++){
      if(i%j==0){
        flag = 1;
        break;
      }
    }
    if(!flag) prime.push_back(i);
  }
  int size = prime.size();
  vector<int> ans;
  long power=1;
  for(int k = 0; k < size; k++){
    power=powl(prime[k],n);
    if(power>pp) continue;
    if(pp%power==0) ans.push_back(prime[k]);
  }
  int result=1;
  for(int x=0;x<ans.size();x++){
    result*=ans[x];
  }
  cout << result;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: return-statement with no value, in function returning 'int' [-fpermissive]
   10 |     return;
      |     ^~~~~~
Language: C++

#include<iostream>
#include<vector>
#include<stdlib.h>
#include<time.h>
#include<math.h>
#include<string.h>
#include<algorithm>
#include<queue>
#include<map>
#include<iomanip>

using namespace std;
#define WHITE 0
#define GRAY 1
#define BLACK 2
#define RED 3
vector<long long int> A(1000050,0);
long long int N,P;
long long int ans=1;
long long int cnt=0;

int main(void){
 long long int i=2;
 int check=1;
 cin>>N>>P;

 if(N==1){
  cout<<P<<endl;
  return 0;
 }

 while(P>1){
  if(P%i==0){
   cnt++;
   P/=i;
   if(cnt>=N){
    if(cnt>0 && cnt%N==0){
     ans*=i;
    }
   }
  }
  else{
   i++;
   cnt=0;
   check=1;
 }
 cout<<ans<<endl; 
 return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:49:2: error: expected '}' at end of input
   49 | }
      |  ^
a.cc:22:15: note: to match this '{'
   22 | int main(void){
      |               ^
Language: C++

#include<iostream>
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<cstring>
#include<cstdlib>
#define int long long
using namespace std;

inline int read()
{
	int x=0,w=1;char f=getchar();
	while((f<'0' || f>'9') && f!='-')f=getchar();
	if(f=='-'){w=-1;f=getchar();}
	while(f>='0' && f<='9') {x=x*10+f-'0';f=getchar();}
	return x*w;
}

int n,p;
int a[100200001],cnt,ans=1,bt[100200001];
int v[100200001],pm[100200001],vis[100200001],m,q;

int power(int a,int b)
{
	int s=1;
	for(;b;b>>=1)
	{
		if(b&1) s*=a;
		a*=a;
	}
	return s;
}

void work(int x)
{
	int m=0;
	for(int i=2;i<=x;i++)
	{
		if(v[i]==0)
		{
			v[i]=i;
			pm[++m]=i;
		}
		for(int j=1;j<=m;j++)
		{
			if(pm[j]>v[i] || pm[j]>x/i) break;
			v[i*pm[j]]=pm[j];
		}
	}
	for(int i=1;i<=m;i++) vis[pm[i]]=1;;
}

signed main()
{
	n=read();
	p=read();
	int k=sqrt(p);
	int t=p;
	work(k);
	for(int i=2;i<=k;i++)
	{
		if(vis[i])
		{
			while(t%i==0)
			{
				cnt++;
				bt[i]++;
				a[cnt]=i;
				t/=i;
			}
		}
	}
	if(n==1)
	{
		ans=p;
		printf("%lld\n",ans);
		return 0;
	}
	else if(t!=1) a[++cnt]=t,bt[t]++;
	for(int i=2;i<=k;i++)
	{
		int f=bt[i]/n;
		if(f>=1) ans*=power(i,f);
	}
	printf("%lld\n",ans);
	return 0;
}

Compiler output:
/tmp/ccrtJNx1.o: in function `work(long long)':
a.cc:(.text+0xb8): relocation truncated to fit: R_X86_64_PC32 against symbol `pm' defined in .bss section in /tmp/ccrtJNx1.o
a.cc:(.text+0xdc): relocation truncated to fit: R_X86_64_PC32 against symbol `pm' defined in .bss section in /tmp/ccrtJNx1.o
a.cc:(.text+0x113): relocation truncated to fit: R_X86_64_PC32 against symbol `pm' defined in .bss section in /tmp/ccrtJNx1.o
a.cc:(.text+0x139): relocation truncated to fit: R_X86_64_PC32 against symbol `pm' defined in .bss section in /tmp/ccrtJNx1.o
a.cc:(.text+0x158): relocation truncated to fit: R_X86_64_PC32 against symbol `pm' defined in .bss section in /tmp/ccrtJNx1.o
a.cc:(.text+0x1b2): relocation truncated to fit: R_X86_64_PC32 against symbol `pm' defined in .bss section in /tmp/ccrtJNx1.o
a.cc:(.text+0x1c5): relocation truncated to fit: R_X86_64_PC32 against symbol `vis' defined in .bss section in /tmp/ccrtJNx1.o
/tmp/ccrtJNx1.o: in function `main':
a.cc:(.text+0x24f): relocation truncated to fit: R_X86_64_PC32 against symbol `vis' defined in .bss section in /tmp/ccrtJNx1.o
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
int main(){
	long long a,b;
	cin>>a>>b;
	long long tmp=pow(b,1.0/a);
	for(long long i=tmp;i>=1;i--){
		long long c=b;
		bool yn=true;
		int tmp2=pow(i,a);
		if(c%tmp2==0){
			cout<<i;
			return 0;
		}
/*		for(int j=0;j<a;j++){
			if(c%i==0){
				c/=i;
			}else{
				yn=false;
				break;
			}
		}
		if(yn==true){
			cout<<i;
			return 0;
*/		}
	}
	cout<<1;
	return 0;
}     

Compiler output:
a.cc:30:9: error: 'cout' does not name a type
   30 |         cout<<1;
      |         ^~~~
a.cc:31:9: error: expected unqualified-id before 'return'
   31 |         return 0;
      |         ^~~~~~
a.cc:32:1: error: expected declaration before '}' token
   32 | }
      | ^
Language: C++

#include <stdio.h>
#include <iostream>
#include <vector>
#include <cassert>
#include <algorithm>
#include <cstdlib>
#include <string>
#include <math.h>
using namespace std;
//整形Shift + alt + f　2回
//int x[101],y[101],h[101];
//int koya[100001][];
/*
//ユークリッドの互除法
unsigned gcd(unsigned a, unsigned b) {
  if(a < b) gcd(b, a);
  unsigned r;
  while ((r=a%b)) {
    a = b;
    b = r;
  }
  return b;
}
*/

/*
//桁数取得
unsigned GetDigit(unsigned num)
{
    unsigned digit = 0;
    while (num != 0)
    {
        num /= 10;
        digit++;
    }
    return digit;
}
*/

long long int n;
long long int p;

// index が条件を満たすかどうか
bool isOK(int index)
{
    long double tmp = pow((double)index, n);
    //i^n が pを超えるか
    if (p < tmp)
        return true;
    else
        return false;
}

// 汎用的な二分探索のテンプレ
long long int binary_search()
{
    long long int left = 1;
    long long int right = p;

    while (right - left > 1)
    {
        long long int mid = left + (right - left) / 2;
        if (isOK(mid))
            right = mid;
        else
            left = mid;
    }

    /* left は条件を満たさない最大の値、right は条件を満たす最小の値になっている */
    return right - 1;
}

int main()
{
    cin >> n >> p;

    long long int res = 1;

    long long int b = binary_search();

    if (n == 1)
    {
        cout << p;
        return 0;
    }

    if (p == 1)
    {
        cout << 1;
        return 0;
    }

    while (b > 0)
    {
        long double tmp = pow((double)i, n);
        if (p % (long long int)tmp == 0)
        {
            res = i;
            break;
        }
        b--;
    }

    cout << res;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:95:39: error: 'i' was not declared in this scope
   95 |         long double tmp = pow((double)i, n);
      |                                       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main() {
  ll N, P;
  cin >> N >> P;
  ll i=2, l=1;
  
  while (P != 1) {
    if (P % i == 0) {
      ll ni = 0;
      while (P%i == 0) {
        ni++;
        P /= i;
      }
      l *= pow(i, ni / N);
    } else if (i*i > P) {
      if (N == 1) l *= N;
      break
    } else {
      i++;
    }
  }
  cout << l << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:12: error: expected ';' before '}' token
   20 |       break
      |            ^
      |            ;
   21 |     } else {
      |     ~
Language: C++

import math
def make_prime_list(num):
    if num < 2:
        return []
    prime_list = [i for i in range(num + 1)]
    prime_list[1] = 0
    num_sqrt = math.sqrt(num)

    for prime in prime_list:
        if prime == 0:
            continue
        if prime > num_sqrt:
            break
        
        for non_prime in range(2 * prime, num, prime):
            prime_list[non_prime] = 0
    return [prime for prime in prime_list if prime != 0]

def prime_factorization(num):
    if num <= 1:
        return {1 : 1}
    else:
        num_sqrt = math.floor(math.sqrt(num))
        prime_list = make_prime_list(num_sqrt)

        dict_counter = {}
        for prime in prime_list:
            while num % prime == 0:
                if prime in dict_counter:
                    dict_counter[prime] += 1
                else:
                    dict_counter[prime] = 1
                num //= prime
        if num != 1:
            if num in dict_counter:
                dict_counter[num] += 1
            else:
                dict_counter[num] = 1
        return dict_counter




if __name__ == '__main__':
    N, P = map(int, input().split())

    d = prime_factorization(P)

    cnt = 1

    for key, value in d.items():
        while value >= N :
            cnt *= key
            value -= N
    if N == 1:
        print(P)
    else:
        print(cnt)


Compiler output:
a.cc:44:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   44 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import math
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:22:5: error: expected unqualified-id before 'else'
   22 |     else:
      |     ^~~~
a.cc:27:9: error: expected unqualified-id before 'for'
   27 |         for prime in prime_list:
      |         ^~~
Language: C++

#include<iostream>
#include<string>
#include<sstream>
#include<vector>
#include<algorithm>


using namespace std;

int main(){

	/*Q1*/
/*	int ret = 0;
	int in = 0;

	cin >> in;

	for (int i = 0; i < 4; ++i){
		if (in % 10 == 2){
			ret++;
		}
		in /= 10;
	}

	cout << ret;
	*/
	/*Q2*/
/*
long h = 0;
	long w = 0;
	long n = 0;
	int ret = 0;

	long h_in = 0;
	long w_in = 0;

	string str, tmp;
	cin >> n >> h >> w;


	for (int i = 0; i < n; ++i){
		cin >> h_in >> w_in;
		if (h <= h_in  && w <= w_in){
			ret++;
		}

	}
	 
	cout << ret;
*/

	/*Q3*/
	long n = 0;
	long long p = 0;

	cin >> n >> p;
	long ret = sqrt(p);
	long n_ori = n;
	long long p_ori = p;
	bool ok = false;


	for (; 0 < ret; --ret){
		ok = true;
		p = p_ori;
		for (int i = 0; i < n; ++i){
			if (p % ret != 0){
				ok = false;
				break;
			}
			p /= ret;

		}

		if (ok || ret == 1){
			break;
		}

	}

	cout << ret;

	/*Q4*/


	return 0;
	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:57:20: error: 'sqrt' was not declared in this scope
   57 |         long ret = sqrt(p);
      |                    ^~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<map>
typedef long long lint;
using namespace std;

int main()
{
	lint N,P;
	map<lint,lint> m;
	lint ans=1;
	lint num=0;
	
	cin >> N >> P;
	
	if(P==1)
	{
		cout << 1 << endl;
		return 0;
	}
	if(N==1)
	{
		cout << P << endl;
		return 0;
	}

	lint x=P;
	for(lint i=2;i*i<=P;i++)
	{
		//cout << i << endl;
		while(x%i==0)
		{
			m[i]++;
			x/=i;
		}
	}
	
	for(auto it=m.rbegin()();it!=m.rend();++it)
	{
		if(it->second>=N)
		{
			ans*=it->first;
			num++;
		}
		if(num==N)break;
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:31: error: no match for call to '(std::map<long long int, long long int>::reverse_iterator {aka std::reverse_iterator<std::_Rb_tree_iterator<std::pair<const long long int, long long int> > >}) ()'
   38 |         for(auto it=m.rbegin()();it!=m.rend();++it)
      |                     ~~~~~~~~~~^~
Language: C++

#include <stdio.h>
#include <iostream>
#include <vector>
#include <cassert>
#include <algorithm>
#include <cstdlib>
#include <string>
#include <math.h>
using namespace std;
//整形Shift + alt + f　2回
//int x[101],y[101],h[101];
//int koya[100001][];
/*
//ユークリッドの互除法
unsigned gcd(unsigned a, unsigned b) {
  if(a < b) gcd(b, a);
  unsigned r;
  while ((r=a%b)) {
    a = b;
    b = r;
  }
  return b;
}
*/

/*
//桁数取得
unsigned GetDigit(unsigned num)
{
    unsigned digit = 0;
    while (num != 0)
    {
        num /= 10;
        digit++;
    }
    return digit;
}
*/

long long int n;
long long int p;

// index が条件を満たすかどうか
bool isOK(int index)
{
    long double tmp = pow((double)index, n);
    //i^n が pを超えるか
    if (p < tmp)
        return true;
    else
        return false;
}

// 汎用的な二分探索のテンプレ
long long int binary_search()
{
    long long int left = 1;
    long long int right = p;

    while (right - left > 1)
    {
        long long int mid = left + (right - left) / 2;
        if (isOK(mid))
            right = mid;
        else
            left = mid;
    }

    /* left は条件を満たさない最大の値、right は条件を満たす最小の値になっている */
    return;
}

int main()
{
    cin >> n >> p;

    long long int res = -1;

    long long int b = binary_search();

    if (n == 1)
    {
        cout << p;
        return 0;
    }

    if (p == 1)
    {
        cout << 1;
        return 0;
    }

    for (int i = b; i > 0; i--)
    {
        long double tmp = pow((double)i, n);
        if (p % (long long int)tmp == 0)
        {
            res = i;
            break;
        }
    }

    cout << res;

    return 0;
}


Compiler output:
a.cc: In function 'long long int binary_search()':
a.cc:70:5: error: return-statement with no value, in function returning 'long long int' [-fpermissive]
   70 |     return;
      |     ^~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

bool canDev(long long int p, const long long int i, long long int n)
{
    while (n > 0)
    {
        if (p % i != 0)
            return false;
        else
            p /= i;
        n--;
    }
    return true;
}

int main()
{
    long long int n, p;
    scanf("%lld %lld", &n, &p);
    if (n == 1)
        printf("%lld\n", p);
    else
#include <bits/stdc++.h>

        using namespace std;

    bool canDev(long long int p, const int i, int n)
    {
        while (n > 0)
        {
            if (p % i != 0)
                return false;
            else
                p /= i;
            n--;
        }
        return true;
    }

    int main()
    {
        long long int n, p;
        scanf("%lld %lld", &n, &p);
        if (n == 1)
            printf("%lld\n", p);
        else
        {
            long long int ans = 1;
            for (long long int i = pow(p, 1.0 / n); i > 1; i--)
            {
                if (p % i == 0 && canDev(p, i, n))
                {
                    ans = i;
                    break;
                }
            }

            printf("%lld\n", ans);
        }

        return 0;
    }
    {
        long long int ans = 1;
        for (long long int i = pow(p, 1.0 / n); i > 1; i--)
        {
            if (p % i == 0 && canDev(p, i, n))
            {
                ans = i;
                break;
            }
        }

        printf("%lld\n", ans);
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:5: error: a function-definition is not allowed here before '{' token
   30 |     {
      |     ^
a.cc:42:13: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   42 |     int main()
      |             ^~
a.cc:42:13: note: remove parentheses to default-initialize a variable
   42 |     int main()
      |             ^~
      |             --
a.cc:42:13: note: or replace parentheses with braces to value-initialize a variable
a.cc:43:5: error: a function-definition is not allowed here before '{' token
   43 |     {
      |     ^
Language: C++

#include <iostream>
#include <cstdlib>
#include <string>
#include <vector>
#include <queue>
#include <set>
#include <algorithm>

using namespace std;

int main()
{
    long long n, p, p_tmp;
    cin >> n >> p;
    p_tmp = p;
    long long ans = 1;
    vector<long long> v(1000001, 0);
    if(n == 1){
        cout << p << endl;
        return 0;
    }
    for (long long i = 2; i <= 1000000; ++i){
        while(p % i == 0){
            v[i]++;
            p = p / i;
            //cout << i << " ";
        }
    }
    //cout << endl;
    for (long long i = 2; i <= 1000000; ++i){
        if(v[i] >= 1){
            isPrime = false;
        }
        if(v[i] >= n){
            ans *= i * (v[i] / n);
        }
    }
    cout << ans << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:13: error: 'isPrime' was not declared in this scope
   32 |             isPrime = false;
      |             ^~~~~~~
Language: C++

#include<iostream>
#include <string>
#include<algorithm>
#include <set>
#include <cmath>
#include<math.h>
using namespace std;

int main(void){
	ios::sync_with_stdio(false);
	long N, P, i, k, j, a,s;
	cin >> N >> P;
	s = (int)pow((double)(P), 1.0 / (double)(N));
	for (i = 1; i <= s; i++) {
		j = (int)pow((doubl)(i), (double)(N));
		if (P % j == 0) a = i;
	}

	cout << a;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:31: error: 'doubl' was not declared in this scope; did you mean 'dsubl'?
   15 |                 j = (int)pow((doubl)(i), (double)(N));
      |                               ^~~~~
      |                               dsubl
Language: C++

#include <bits/stdc++.h> 
using namespace std;
typedef long long ll;
typedef pair<int,int> p;
const int inf=(1<<30);
#define rep(i,a,n)	for(int i=a;i<n;i++)
#define rrep(i,a,n) for(int i=(a-1);i>=n;i--)

int main(){
	ll n,p;
	cin>>n>>p;
	if(n==1){
		cout<<p<<endl;
		return 0;
	}
	vector<ll> v;
	for(ll i=2;i*i<=p;i++){
		bool sosuu=true;
		for(ll j=2;j*j<=i;j++){
			if(i%j==0){
				sosuu=false;
				break;
			}
		}
		if(sosuu==false)continue;
		else{
			ll cnt=0;
		while(p%i==0){
				p/=i;
				cnt++;
			}
			if(cnt>=n){
				ll x=cnt/n;
				ll s=1;
				rep(i,0,x)s*=i
				v.push_back(s);
			}
		}
	}
	ll ans=1;
	rep(i,0,v.size()){
		ans*=v[i];
	}
	cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:47: error: expected ';' before 'v'
   35 |                                 rep(i,0,x)s*=i
      |                                               ^
      |                                               ;
   36 |                                 v.push_back(s);
      |                                 ~
Language: C++


#include<iostream>
#include<string>
#include<vector>
#include<unordered_map>
using namespace std;

bool isPrime(long long n)
{
	if (n = 2)
	{
		return true;
	}

	for (int i = 2; i < ceil(sqrt(n)); i++)
	{
		if (n%i == 0) {
			return false;
		}
	}
	return true;
}

unordered_map<long long, long long> factorization(long long n)
{
	unordered_map<long long, long long> ret;
	for (long long i = 2; i*i  <= n; i++)
	{
		while (n % i == 0)
		{
			n = n / i;
			ret[i] += 1;
		}
	}

	ret[n] += 1;

	return ret;
}

int main(void)
{
	long long N, P;
	cin >> N >> P;

	auto mp= factorization(P);

	long long gcd = 1;

	for (auto itr = mp.begin(); itr != mp.end(); ++itr) {
			
		if (itr->second >= N) {
			gcd *= itr->first;
		}
	}
	cout << gcd;

	return 0;
}


Compiler output:
a.cc: In function 'bool isPrime(long long int)':
a.cc:15:34: error: 'sqrt' was not declared in this scope
   15 |         for (int i = 2; i < ceil(sqrt(n)); i++)
      |                                  ^~~~
a.cc:15:29: error: 'ceil' was not declared in this scope
   15 |         for (int i = 2; i < ceil(sqrt(n)); i++)
      |                             ^~~~
Language: C++

#include <bits/stdc++.h>

#define int long long 
#define MOD 1000000007



using namespace std;


signed main(){

	int N,P;
	cin>> N>>P;
	
	unordered_map<int,int> sosu;

	int P = p;
	int q = (int)sqrt(P)+1;
	
	if(N==1){
		cout << P <<endl;
		return 0;
	}
	int ans = 1;

	for(int i=2;i<=q;i++){
		int k=0;		
		while(1){
			if(P%i==0){
				P=P/i;
				k++;	
			}
			else{
				break;
			}	
			
			if(k>=N){
				int y = (int)k/N;
				for(int j=0;j<y;j++){
					ans = ans*i;
				}
			}
		}
		
	
	}
	
	
	cout << ans << endl;
 	
 	return 0;
	

}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:13: error: redeclaration of 'long long int P'
   18 |         int P = p;
      |             ^
a.cc:13:15: note: 'long long int P' previously declared here
   13 |         int N,P;
      |               ^
a.cc:18:17: error: 'p' was not declared in this scope
   18 |         int P = p;
      |                 ^
Language: C++

#include<iostream>
#include <string>
#include<algorithm>
#include <set>
#include <cmath>
#include<math.h>
using namespace std;

int main(void){
	ios::sync_with_stdio(false);
	long N, P, i, k, j, a,s;
	cin >> N >> P;
	s=(int)pow((double)(P),1.0/(double)(N))
	for (i = 1; i <=s; i++) {
		j = 1;
		for (k = 0; k < N; k++) j *= i;
		if (P % j == 0) a = i;
	}

	cout << a;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:48: error: expected ';' before 'for'
   13 |         s=(int)pow((double)(P),1.0/(double)(N))
      |                                                ^
      |                                                ;
   14 |         for (i = 1; i <=s; i++) {
      |         ~~~                                     
a.cc:14:31: error: expected ';' before ')' token
   14 |         for (i = 1; i <=s; i++) {
      |                               ^
      |                               ;
Language: Java

import java.util.*;

public class example {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		long P = sc.nextLong();
		if(N == 1) {
			System.out.println(P);
		}else {
			long m = 12/N + 1;
			int n = 1;
			int mlcm = 1;
			for(int i = 0; i < m;i++)n *= 10;
			for(int i = 1;i < n + 1;i++) {
				if(P % (Math.pow(i, N)) == 0) {
					mlcm = i;
				}
			}
			System.out.println(mlcm);
		}
	}
}


Compiler output:
Main.java:3: error: class example is public, should be declared in a file named example.java
public class example {
       ^
1 error
Language: Java

package contest;
import java.util.*;

public class example {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		long P = sc.nextLong();
		if(N == 1) {
			System.out.println(P);
		}else {
			long m = 12/N + 1;
			int n = 1;
			int mlcm = 1;
			for(int i = 0; i < m;i++)n *= 10;
			for(int i = 1;i < n + 1;i++) {
				if(P % (Math.pow(i, N)) == 0) {
					mlcm = i;
				}
			}
			System.out.println(mlcm);
		}
	}
}

Compiler output:
Main.java:4: error: class example is public, should be declared in a file named example.java
public class example {
       ^
1 error
Language: Java

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class ProductAndGCD {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long k = sc.nextLong();
		long num = sc.nextLong();
		List<Integer> primes = primeFactor(num);
		List<Integer> oks = new ArrayList<Integer>();
//		System.out.println(Arrays.toString(primes.toArray()));
		for(int i=0;i<primes.size();i++) {
			if(primes.lastIndexOf( primes.get(i) ) - i +1 >= k) {
				oks.add(primes.get(i));
//				System.out.println("get:"+primes.get(i));
			}
			i = primes.lastIndexOf( primes.get(i) );
		}
		long ans=1;
		for(long pr:oks) {
			ans*=pr;
		}
		System.out.println(ans);
	}
	static long gcd(long m, long n) {
		if(m < n) return gcd(n, m);
		if(n == 0) return m;
		return gcd(n, m % n);
	}

	static long lcm(long m, long n) {
		return m * n / gcd(m, n);
	}
	/**<h1>素因数分解のリストを作る</h1>
	 * @param num ： 素因数分解する値 (>=0)
	 * @return<b>List<Integer></b> ： 素因数分解のリスト
	 */
	public static final List<Integer> primeFactor(long num) {
		final List<Integer> list = new ArrayList<Integer>();
		if (num < 2) {    //n が2以上とわかっていれば、ここは不要
			return list;
		}

		while (num != 1 && num % 2 == 0) {    //2で割り切れるだけ割る
			list.add(2);
			num >>>= 1;        //÷2 の代わり
		}

		for (int i = 3; i * i <= num; i += 2) {    //奇数のみ [O(√n[/2])で可]
			while (num % i == 0) {
				list.add(i);
				num /= i;
			}
		}

		if (num != 1) {
			list.add((int) num);
		}
		return list;
	}


}


Compiler output:
Main.java:6: error: class ProductAndGCD is public, should be declared in a file named ProductAndGCD.java
public class ProductAndGCD {
       ^
1 error
Language: C++

#include <iostream>
#include <iomanip>
#include <algorithm>

using namespace std;
#define N 1000000

int* Eratosthenes(){
    int* arr = new int[N];

    for(int i = 0; i < N; i++){
        arr[i] = 1;
    }
    for(int i = 2; i < sqrt(N); i++){
        if(arr[i]){
            for(int j = 0; i * (j + 2) < N; j++){
                arr[i *(j + 2)] = 0;
            }
        }
    }

    for(int i = 2; i < N; i++){
        if(arr[i]){
        }
    }

    return arr;
}


int main(){

    long n, p;
    cin >> n >> p;
    int* arr;

    int ans = 1;

    if (n == 1) {
        cout << p << endl;
        return 0;
    } else {
        arr = Eratosthenes();
        for (int i=2; i<=N; i++) {
            if (arr[i]) {
                int count = 0;
                while (p%i == 0) {
                    count++;
                    p /= i;
                }
                if (count/n) {
                    ans *= pow(i, count/n);
                }
            }
            if (p == 1) {
                break;
            }
        }
        cout << ans << endl;

        return 0;
    }
}


Compiler output:
a.cc: In function 'int* Eratosthenes()':
a.cc:14:24: error: 'sqrt' was not declared in this scope
   14 |     for(int i = 2; i < sqrt(N); i++){
      |                        ^~~~
a.cc: In function 'int main()':
a.cc:52:28: error: 'pow' was not declared in this scope
   52 |                     ans *= pow(i, count/n);
      |                            ^~~
Language: C++

#include <stdio.h>
#include <vector>
#include <utility>
#include <algorithm>
#include <set>
#include <iostream>
using namespace std;
#define Vi vector<int>
#define ll long long
#define Sort(a) sort(a.begin(),a.end())
#define rep(i,n) for(ll i=0;i<n;++i)
int main()
{	
  ll a,b;
  cin>>a>>b;
  
if(a==1){cout<<b<<endl;return 0;}
  ll Max=-1;
  for(ll i=2;;i++){
  ll o=1;for(int j=0;j<a;j++){o*=i;}
    if(b%o==0){Max=i;}
  if(b<o){break;}
  }
  
  cout<<max(1,Max)<<endl;
  return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:12: error: no matching function for call to 'max(int, long long int&)'
   25 |   cout<<max(1,Max)<<endl;
      |         ~~~^~~~~~~
In file included from /usr/include/c++/14/vector:62,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:25:12: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   25 |   cout<<max(1,Max)<<endl;
      |         ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:4:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:25:12: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   25 |   cout<<max(1,Max)<<endl;
      |         ~~~^~~~~~~
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>

int sisu(int a, int b){
    int t=1;
    while(b>0){
        t *= a;
        b -= 1;
    }
    return t;
}

int gcd(int a, int b){
    int c;
    if (a < b) {
        a+=b; b=a-b; a-=b;
    }
    while (b != 0) {
        c = a % b;
        a = b;
        b = c;
    }
    return a;
}

int main(){
    int N, P, tmp, ans=1;
    if(scanf("%d %d",&N,&P) < 2) N=N;
    if(N==1){
        printf("%d",P)
    }else{
        int tmp,i=2;
        while(sisu(i,N)<=P){
            if(P%sisu(i,N)==0){
                if( gcd( i, ans) != 1){
                    ans *= gcd( i, ans);
                }else{
                    ans *= i;
            }
            i++;
        }
        printf("%d",ans);
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:31:23: error: expected ';' before '}' token
   31 |         printf("%d",P)
      |                       ^
      |                       ;
   32 |     }else{
      |     ~                  
main.c:46:1: error: expected declaration or statement at end of input
   46 | }
      | ^
Language: C

#include<stdio.h>
#include<math.h>
int main(){
  int N,P,max=1;
  scanf("%d %d",&N,&P);
  int t=2;
  while(pow(t,N)<=P){
    if(P%(pow(t,N))==0)max==t;
    t++;
  }
  printf("%d",max);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:9: error: invalid operands to binary % (have 'int' and 'double')
    8 |     if(P%(pow(t,N))==0)max==t;
      |         ^~~~~~~~~~~
      |           |
      |           double
Language: C++

#include <iostream>
#include <algorithm>
#include <map>
using namespace std;

typedef long long ll;
map<ll,ll> res;

void factor(ll n) {
	for (ll i = 2; i * i <= n; i++) {
		while (n % i == 0) {
			res[i]++;
			n /= i;
		}
	}
	if (n != 1) res[n]++;
}

int main() {
	ll n, p;
	cin >> n >> p;
	factor(p);
	ll ans = 1;
	for (auto pr : res) {
		if (pr.second >= n) {
			ans *= pow(pr.first, pr.second / n);
		}
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:32: error: 'pow' was not declared in this scope
   26 |                         ans *= pow(pr.first, pr.second / n);
      |                                ^~~
Language: C++

#include <bits/stdc++.h> 
using namespace std;
typedef long long ll;
typedef pair<int,int> p;
const int inf=(1<<30);
#define rep(i,a,n)	for(int i=a;i<n;i++)
#define rrep(i,a,n) for(int i=(a-1);i>=n;i--)

int main(){
	ll n,p;
	cin>>n>>p;
	if(n==1){
		cout<<p<<endl;
		return;
	}
	vector<ll> v;
	for(ll i=2;i*i<=p;i++){
		bool sosuu=true;
		for(ll j=2;j*j<=i;j++){
			if(i%j==0){
				sosuu=false;
				break;
			}
		}
		if(sosuu==false)continue;
		else{
			ll cnt=0;
		while(p%i==0){
				p/=i;
				cnt++;
			}
			if(cnt>=n)v.push_back(i);
		}
	}
	ll ans=1;
	rep(i,0,v.size()){
		ans*=v[i];
	}
	cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
   14 |                 return;
      |                 ^~~~~~
Language: C++

#include <iostream>
#include <cmath>

int main() {
	long long n;
	long long p;
	long long answer = 1;
	static bool a[1000000];

	for (int i = 0; i < 1000000; i++) {
		a[i] = 1;
	}

	for (int i = 2; i < 1000000; i++) {
		if (a[i] == 1) {
			for (int j = 2 * i; j < 1000000; j += i) {
				a[j] = 0;
			}
		}
	}

	std::cin >> n >> p;
	long long i = 2;

	if (n == 1) {
		answer = p;
	}
	else {
		while (1) {
			if (i >= 10000000) { break; }
			if (a[i] == 1) {
				if (long long(pow(i, n)) > p) {
					break;
				}
				else if (p % long long(pow(i, n)) == 0) {
					answer *= i;
					p /= long long(pow(i, n));

				}
				else {
					i++;
				}
			}
			else {
				i++;
			}
		}
	}
	

	std::cout << answer << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:37: error: expected primary-expression before 'long'
   32 |                                 if (long long(pow(i, n)) > p) {
      |                                     ^~~~
a.cc:32:37: error: expected ')' before 'long'
   32 |                                 if (long long(pow(i, n)) > p) {
      |                                    ~^~~~
      |                                     )
a.cc:35:46: error: expected primary-expression before 'long'
   35 |                                 else if (p % long long(pow(i, n)) == 0) {
      |                                              ^~~~
a.cc:35:45: error: expected ')' before 'long'
   35 |                                 else if (p % long long(pow(i, n)) == 0) {
      |                                         ~   ^~~~~
      |                                             )
a.cc:37:46: error: expected primary-expression before 'long'
   37 |                                         p /= long long(pow(i, n));
      |                                              ^~~~
Language: C++

#include <iostream>
#include <cmath>
using namespace std;

int main() {
	long long n;
	long long p;
	long long answer = 1;
	static bool a[1000000];

	for (int i = 0; i < 1000000; i++) {
		a[i] = 1;
	}

	for (int i = 2; i < 1000000; i++) {
		if (a[i] == 1) {
			for (int j = 2 * i; j < 1000000; j += i) {
				a[j] = 0;
			}
		}
	}

	cin >> n >> p;
	long long i = 2;

	if (n == 1) {
		answer = p;
	}
	else {
		while (1) {
			if (i >= 10000000) { break; }
			if (a[i] == 1) {
				if (pow(i, n) > p) {
					break;
				}
				else if (p % long long(pow(i, n)) == 0) {
					answer *= i;
					p /= pow(i, n);

				}
				else {
					i++;
				}
			}
			else {
				i++;
			}
		}
	}
	

	cout << answer << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:46: error: expected primary-expression before 'long'
   36 |                                 else if (p % long long(pow(i, n)) == 0) {
      |                                              ^~~~
a.cc:36:45: error: expected ')' before 'long'
   36 |                                 else if (p % long long(pow(i, n)) == 0) {
      |                                         ~   ^~~~~
      |                                             )
Language: C++

#pragma warning(disable:4996)
#include <bits/stdc++.h>

using namespace std;

#define REP(i,n) for (int i = 0; i<n; i++)
#define ALL(a) begin(a), end(a)
#define TPL template
#define TNM typename

using ll = long long;
using ull = unsigned long long;
TPL<TNM T> using vec = vector<T>;
TPL<TNM T> using vec2 = vec<vec<T>>;
TPL<TNM T> using vec3 = vec<vec2<T>>;
TPL<TNM T> using vec4 = vec<vec3<T>>;
TPL<TNM T> using vec5 = vec<vec4<T>>;

TPL<TNM V, TNM H> void resize(vector<V>& v, const H h) { v.resize(h); }
TPL<TNM V, TNM H, TNM ... T> inline void resize(vector<V>& v, const H& h, const T ... t) { v.resize(h); for (auto& _v : v) resize(_v, t ...); }
TPL<TNM V, TNM T> void fill(V& x, const T& val) { x = val; }
TPL<TNM V, TNM T> inline void fill(vector<V>& vec, const T& val) { for (auto& v : vec) fill(v, val); }
TPL<TNM T> inline void UNIQUE(vector<T>& vec) { sort(ALL(vec)); vec.erase(unique(ALL(vec)), vec.end()); }

map< int64_t, int > prime_factor(int64_t n) {
	map< int64_t, int > ret;
	for (int64_t i = 2; i * i <= n; i++) {
		while (n % i == 0) {
			ret[i]++;
			n /= i;
		}
	}
	if (n != 1) ret[n] = 1;
	return ret;
}

using Int = ll;
Int gcd(Int a, Int b) {
	return b != 0 ? gcd(b, a % b) : a;
}

int main(void) {
	ll N, P;
	cin >> N >> P;
	map<ll, int> pf = prime_factor(P);
	
	ll ans = 1;
	for (auto &p : pf) {
		if (p.second >= N) {
			ans *= p.first;
		}
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:45:39: error: conversion from 'map<long int,[...]>' to non-scalar type 'map<long long int,[...]>' requested
   45 |         map<ll, int> pf = prime_factor(P);
      |                           ~~~~~~~~~~~~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<int,int> p_int;
typedef pair<ll,ll> p_ll;
typedef tuple<ll,ll,ll> t3_ll;
int dx[] = {-1,0,1,0},dy[] = {0,1,0,-1};
int prime[] = {2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97};
const ll inf = 1e9+7;

int main() {
	ll n,p;
	cin >> n >> p;
	ll waru = 2;
	ll x = p;
	unorderd_map<ll,ll> insu;

	while(x!=1) {
		if (x % waru == 0) {
			x/=waru;
			insu[waru]++;
		} else {
			waru++;
		}
	}
	
	ll ans = 1;
	for (auto itr = insu.begin();itr != insu.end();itr++) {
		ans *= pow(itr->first,itr->second/n);
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: 'unorderd_map' was not declared in this scope
   17 |         unorderd_map<ll,ll> insu;
      |         ^~~~~~~~~~~~
a.cc:17:24: error: expected primary-expression before ',' token
   17 |         unorderd_map<ll,ll> insu;
      |                        ^
a.cc:17:27: error: expected primary-expression before '>' token
   17 |         unorderd_map<ll,ll> insu;
      |                           ^
a.cc:17:29: error: 'insu' was not declared in this scope
   17 |         unorderd_map<ll,ll> insu;
      |                             ^~~~