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

#include<stdio.h>
#include<math.h>

int main(void){
	long N,P,ans=1;
	scanf("%ld %ld",&N,&P);
	
	if(N==1){
		printf("%ld",P);
		return 0;
	}
	
	for(int i=2;P>1&&i<=sqrt(P);i++){
		div=0;
		while(P%i==0){
			P/=i;
			div++;
			if(div>=N) {
				ans*=i;
				div-=N;
			}
		}
		
	}
	
	printf("%ld",ans);
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:17: error: 'div' undeclared (first use in this function)
   14 |                 div=0;
      |                 ^~~
main.c:14:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
#include<map>
#include<vector>
using namespace std;
using ll = long long;
#define MM = 1000000000;
#define mod = MM + 7;
#define INF (ll)1e18
#define pi acos(-1.0)
#define MAX 10000000005
#define NIL -1
int main(){
    ll n, p; cin >> n >> p;
    ll ans = 1;
    if(n == 1){
        cout << p << endl;
        return 0;
    }
    ll a = 1;
    while(pow(a, n) <= p){
        ll i = pow(a, n);
        if(p % i == 0) ans = a;
        a++;
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:11: error: 'pow' was not declared in this scope
   22 |     while(pow(a, n) <= p){
      |           ^~~
Language: C++

#include <iostream>
#include <map>
using namespace std;
typedef long long int ll;

map<ll, ll> M;
ll ans=1,N,P;
void disassemble(ll p)
{
    for(int i=0;i*i<=p;i++)
    while (p % i == 0)
    {
        M[i]++;
        p /= i;
        if(M[i]==N)
          {M[i]=0;ans*=i;}
    }
}

int main()
{
    cin >> N >> P;

    disassemble(P, 0);
  
  
  if(N==1){cout << P << endl;}
  else{
    cout << ans << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:16: error: too many arguments to function 'void disassemble(ll)'
   24 |     disassemble(P, 0);
      |     ~~~~~~~~~~~^~~~~~
a.cc:8:6: note: declared here
    8 | void disassemble(ll p)
      |      ^~~~~~~~~~~
Language: C

#include<stdio.h>
#include<math.h>

int main(void){
	long N,P;
	scanf("%ld %ld",&N,&P);
	if(N==1){
		printf("%ld",P);
		return 0;
	}
	int div,ans=1;
	for(int i=2;i<=sqrt(P);i++){
		div=0;
		while(P%i==0){
			P/=i;
			div++;
		}
		if(div>=N) ans*=i;
		
	printf("%ld",ans);
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:23:1: error: expected declaration or statement at end of input
   23 | }
      | ^
Language: C++

#include <iostream>
#include <map>
using namespace std;
typedef long long int ll;

map<ll, ll> M;
ll sosuu[10000] = {
    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, 101, 103, 107, 109, 113,
    127, 131, 137, 139, 149, 151, 157, 163, 167, 173,
    179, 181, 191, 193, 197, 199, 211, 223, 227, 229,
    233, 239, 241, 251, 257, 263, 269, 271, 277, 281,
    283, 293, 307, 311, 313, 317, 331, 337, 347, 349,
    353, 359, 367, 373, 379, 383, 389, 397, 401, 409,
    419, 421, 431, 433, 439, 443, 449, 457, 461, 463,
    467, 479, 487, 491, 499, 503, 509, 521, 523, 541,
    547, 557, 563, 569, 571, 577, 587, 593, 599, 601,
    607, 613, 617, 619, 631, 641, 643, 647, 653, 659,
    661, 673, 677, 683, 691, 701, 709, 719, 727, 733,
    739, 743, 751, 757, 761, 769, 773, 787, 797, 809,
    811, 821, 823, 827, 829, 839, 853, 857, 859, 863,
    877, 881, 883, 887, 907, 911, 919, 929, 937, 941,
    947, 953, 967, 971, 977, 983, 991, 997};

void disassemble(ll p, ll n)
{
    if (p == 1)
        return;

    while (p % sosuu[n] == 0)
    {
        M[sosuu[n]]++;
        p /= sosuu[n];
    }
    disassemble(p, n + 1);
}

int main()
{
    ll N, P;
    cin >> N >> P;
    ll ans = 1;

    disassemble(P, 0);

    int i = 0;
    while (sosuu[i] != 0)
    {
        if (M[sosuu[i]] >= N)
          for(int i=0;i<(M[sosuu[i]]/N))
            ans *= sosuu[i];
        i++;
    }
  if(N==1){cout << P << endl;}
  else{
    cout << ans << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:51:40: error: expected ';' before ')' token
   51 |           for(int i=0;i<(M[sosuu[i]]/N))
      |                                        ^
      |                                        ;
Language: C++

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

int N, p;

//Ｏ(√n)
//素因数分解
map<int, int> prime_factor(int n) {
  map<int, int> res; // map[i]:=ｎを素因数分解したときiは何乗か。
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      while (n % i == 0) {
        res[i]++;
        n /= i;
      }
    }
  }
  if (n != 1)
    res[n] = 1;
  return res;
}

signed main() {
  cin >> N >> p;
  if (N == 1) {
    cout << p << endl;
    return 0;
  }

  map<int, int> mp = prime_factor(p);

  int ans = 1;
  for (int i = 2; i * i <= p; i++) {
    if (mp[i] / N > 0) ans *= pow(i, mp[i] / N);
  }

  cout << ans << endl;
  retu


Compiler output:
a.cc: In function 'int main()':
a.cc:39:3: error: 'retu' was not declared in this scope
   39 |   retu
      |   ^~~~
a.cc:39:7: error: expected '}' at end of input
   39 |   retu
      |       ^
a.cc:24:15: note: to match this '{'
   24 | signed main() {
      |               ^
Language: C++

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

#define FOR(i, s, e)   for(int i = (s); i < (e); i++)
#define FOR64(i, s, e) for(ll  i = (s); i < (e); i++)
#define ALL(x)         (x).begin(), (x).end()
#define SORT(b, e)     sort((b), (e))
#define REV(b, e)      reverse((b), (e))
#define VSORT(v)       sort((v).begin(), (v).end())
#define VREV(v)        reverse((v).begin(), (v).end())
#define pb(a)          push_back(a)
#define INF            999999999

typedef long long ll;

int main()
{
	ll N, P;
	cin >> N >> P;

	ll res = 1;
	ll e = P;
	for(ll i = 2; i * i <= P; i++){
		int x = 0;
		while(P % i == 0){
			P /= i;
			x++;
		}

		res *= pow(i, x / N);
	}

	if(n >= 2)
		cout << res << endl;
	else
		cout << e << endl;

	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:33:12: error: 'n' was not declared in this scope
   33 |         if(n >= 2)
      |            ^
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;
  }
  ll ans = 1;
  forn(i, 2, 2000000) if (P%i==0) {
    ll a = pow(i, N);
    if (p%a==0) ans=i;
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:46:9: error: 'p' was not declared in this scope
   46 |     if (p%a==0) ans=i;
      |         ^
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;
  }
  ll ans = 1;
  forn(i, 2, 2000000) if (P%i==0) {
    ll a = pow(i, n);
    if (P%a==0) ans=i;
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:45:19: error: 'n' was not declared in this scope
   45 |     ll a = pow(i, n);
      |                   ^
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;
  }
  ll ans = 1;
  repb(i, 2, 2000000) if (P%i==0) {
    ll a = pow(i, n);
    if (P%a==0) ans=i;
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc:44:21: error: macro "repb" passed 3 arguments, but takes just 2
   44 |   repb(i, 2, 2000000) if (P%i==0) {
      |                     ^
a.cc:21:9: note: macro "repb" defined here
   21 | #define repb(i,n) for(int i=(int)(n)-1;i>=0;i--)
      |         ^~~~
a.cc: In function 'int main()':
a.cc:44:3: error: 'repb' was not declared in this scope
   44 |   repb(i, 2, 2000000) if (P%i==0) {
      |   ^~~~
Language: C++

#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main(){
ll N,P,tmp,boset,ans=1;
cin>>N>>P;

for(ll i=2;pow(i,N)<P;i++){
ll tmp=pow(i,n);
if(P%tmp==0)
ans = i;
}
printf("%lld\n",ans);
}


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

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
typedef vector<ll> vll;
typedef pair<ll, ll> pll;
#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin() , v.end()
#define REP(i, x, n) for(ll i = x; i < n; i++)


int main(){
  int n, p; cin >> n >> p;
  for(int a = 2; a * a <= x; a++){
    if(x % a == 0){
      cout << a << endl;
      return 0;
    }
  }
  cout << p << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:27: error: 'x' was not declared in this scope
   14 |   for(int a = 2; a * a <= x; a++){
      |                           ^
Language: C++

#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main(){
ll N,P,tmp,boset,ans=1;
cin>>N>>P;

for(ll i=2;pow(i,n)<P;i++){
ll tmp=pow(i,n);
if(P%tmp==0)
ans = i;
}
printf("%lld\n",ans);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: 'n' was not declared in this scope
    8 | for(ll i=2;pow(i,n)<P;i++){
      |                  ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
typedef vector<ll> vll;
typedef pair<ll, ll> pll;
#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin() , v.end()
#define REP(i, x, n) for(ll i = x; i < n; i++)


int main(){
  int n, p; cin >> n >> p;
  for(int a = 2; a * a <= x; a++){
    if(x % i == 0){
      cout << a << endl;
      return 0;
    }
  }
  cout << p << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:27: error: 'x' was not declared in this scope
   14 |   for(int a = 2; a * a <= x; a++){
      |                           ^
a.cc:15:12: error: 'i' was not declared in this scope
   15 |     if(x % i == 0){
      |            ^
Language: C++

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

int main(void)
{
      int n,p,a,b,c,i = 0,j = 0,ans = 1;
	long long p;
  scanf("%d %d",&n,&p);
      long long q = p;
      int A[p + 1];

      for(i = 0;i < p + 1;i++) A[i] = 0;

      i = 0;
      for(i = 2;i< p + 1;i++) {
            j = 0;

            while(j < 10000) {
                  if(q % i  == 0) {
                        q = q / i;
//                        printf("q %d\n",q);
                        j++;
                  } else {
                        break;
                  }

            }

            A[i] = j;
      }

      i = 0;
      for(i = 0;i<p + 1;i++) {
//          printf("A[%d] %d\n",i,A[i]);

            while(1) {

                  if(A[i] >= n) {
                        ans = ans * i;
                        A[i] = A[i] - n;
                  } else if (A[i] < n) {
                        break;
                  }

           }

      }

      printf("%d\n",ans);

      return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: conflicting declaration 'long long int p'
    7 |         long long p;
      |                   ^
a.cc:6:13: note: previous declaration as 'int p'
    6 |       int n,p,a,b,c,i = 0,j = 0,ans = 1;
      |             ^
Language: C++

#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main(){
ll N,P,tmp,boset,ans=1;
cin>>N>>P;

for(ll i=2;;i++)
ll tmp=1;
for(int j=0;j<N;j++){
  tmp*=i;
}
if(P%tmp==0)
ans = i;

if(tmp>P)
break;

}

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: 'i' was not declared in this scope
   11 |   tmp*=i;
      |        ^
a.cc:14:7: error: 'i' was not declared in this scope
   14 | ans = i;
      |       ^
a.cc:17:1: error: break statement not within loop or switch
   17 | break;
      | ^~~~~
a.cc: At global scope:
a.cc:21:7: error: expected constructor, destructor, or type conversion before '(' token
   21 | printf("%lld\n",ans);
      |       ^
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <set>
#include <algorithm>
#include <array>
#include <complex>
#include <string>
#include <utility>
#include <map>
#include <queue>
#include <list>
#include <functional>
#include <numeric>
#include <stack>
#include <tuple>

using namespace std;
int dx[4] = { -1,0,1,0 };
int dy[4] = { 0,1,0,-1 };
const int INF = 100000000;
const long long LINF = 1000000000000000000;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-6;
using pii = std::pair<int, int>;
using ll=long long;  
using pLL = std::pair<ll, ll>;
ll N,P;

#define SORT(v) std::sort(v.begin(), v.end())
int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    cin >> N >>P;
  
    if(P==1){
        cout << 1 << endl;
        return 0;
    }else if(N==1){
        cout << P <<endl;
        return 0;
    }
    map<int,int> mp;
    int j=2;
    while(P%j==0){
        P/=j;
        mp[2]++;
        
    }
    for(ll j=3;j*j<=P;j+=2){
        while(P%j==0){
            P/=j;
            mp[j]++;
            
        }
    }
    int ans=1;
    for(auto i=mp.begin();i!=mp.end();++i){
        if(i->second>=N){
            for(int j=0;j<i->second/N);j++)
            ans*=i->first;
        }
    }
    cout << ans <<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:62:38: error: expected ';' before ')' token
   62 |             for(int j=0;j<i->second/N);j++)
      |                                      ^
      |                                      ;
a.cc:62:43: error: expected ';' before ')' token
   62 |             for(int j=0;j<i->second/N);j++)
      |                                           ^
      |                                           ;
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <set>
#include <algorithm>
#include <array>
#include <complex>
#include <string>
#include <utility>
#include <map>
#include <queue>
#include <list>
#include <functional>
#include <numeric>
#include <stack>
#include <tuple>

using namespace std;
int dx[4] = { -1,0,1,0 };
int dy[4] = { 0,1,0,-1 };
const int INF = 100000000;
const long long LINF = 1000000000000000000;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-6;
using pii = std::pair<int, int>;
using ll=long long;  
using pLL = std::pair<ll, ll>;
ll N,P;

#define SORT(v) std::sort(v.begin(), v.end())
int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    cin >> N >>P;
  

    map<int,int> mp;
    int j=2;
    while(P%j==0){
        P/=j;
        mp[2]++;
        
    }
    for(ll j=3;j*j<=P;j+=2){
        while(P%j==0){
            P/=j;
            mp[j]++;
            
        }
    }
    int ans=1;
    for(auto i=mp.begin();i!=mp.end();++i){
        if(i->second>=N){
            for(int j=0;j<i->second/N);j++)
            ans*=i->first;
        }
    }
    cout << ans <<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:56:38: error: expected ';' before ')' token
   56 |             for(int j=0;j<i->second/N);j++)
      |                                      ^
      |                                      ;
a.cc:56:43: error: expected ';' before ')' token
   56 |             for(int j=0;j<i->second/N);j++)
      |                                           ^
      |                                           ;
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <set>
#include <algorithm>
#include <array>
#include <complex>
#include <string>
#include <utility>
#include <map>
#include <queue>
#include <list>
#include <functional>
#include <numeric>
#include <stack>
#include <tuple>

using namespace std;
int dx[4] = { -1,0,1,0 };
int dy[4] = { 0,1,0,-1 };
const int INF = 100000000;
const long long LINF = 1000000000000000000;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-6;
using pii = std::pair<int, int>;
using ll=long long;  
using pLL = std::pair<ll, ll>;
ll N,P;

#define SORT(v) std::sort(v.begin(), v.end())
int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    cin >> N >>P;
  

    map<int,int> mp;
    int j=2;
    while(P%j==0){
        P/=j;
        mp[2]++;
        
    }
    for(ll j=3;j*j<=P;j+=2){
        while(P%j==0){
            P/=j;
            mp[j]++;
            
        }
    }
    int ans=1;
    for(auto i=mp.begin();i!=mp.end();++i){
        if(i->second>=N){
            for(int j=0;j<i->second/N);j++;)
            ans*=i->first;
        }
    }
    cout << ans <<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:56:38: error: expected ';' before ')' token
   56 |             for(int j=0;j<i->second/N);j++;)
      |                                      ^
      |                                      ;
a.cc:56:44: error: expected primary-expression before ')' token
   56 |             for(int j=0;j<i->second/N);j++;)
      |                                            ^
Language: C++

#include <bits/stdc++.h>

using namespace std;


//repetition
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define euc_dis(x, y) sqrt(x*x + y*y)

#define MOD 1e9+7
#define sp ' '


using ll = long long;


ll mod(ll a, ll b){return (a%b+b)%b;}
ll gcd(ll a, ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b){return a*b/gcd(a,b);}
void Yes(){cout << "Yes" << endl;}
void No(){cout << "No" << endl;}
void Judge(bool b){b?Yes():No();}
void YES(){cout << "YES" << endl;}
void NO(){cout << "NO" << endl;}
void JUDGE(bool b){b?YES():NO();}
ll powMod(ll b, ll e, ll m){ll r=1;while(e>0){if(e&1)r=(r%m)*(b%m)%m;b=(b%m)*(b%m)%m;e>>=1;}return r;}
double distance(ll x1, ll y1, ll x2, ll y2){return sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2));}

template<typename T>
void ppp(T n){cout << n << endl;}

template<typename T>
map<T, T> factorization(T n){

    map<T, T> factor;
    while (n % 2 == 0){
        ++factor[2];
        n /= 2;
    }

    for (T i = 3; i*i <= n; i += 2){
        while (n%i == 0){
            ++factor[i];
            n /= i;
        }
    }

    if (n > 2)
        ++factor[n];

    return factor;
}

int main(){

    cin.tie(0);
    ios::sync_with_stdio(false);

    ll n, p;
    cin >> n >> p;
    map<ll, ll> mp = PrimeFactors(p);
    if(n >= 40){
        ppp(1);
        return 0;
    }
    if(n == 1){
        ppp(p);
        return 0;
    }
    ll ans = 1LL;
    for(auto m : mp){
        if(m.second >= n)
            ans *= pow(m.first,(m.second/n));
    }
    ppp(ans);
    return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:62:22: error: 'PrimeFactors' was not declared in this scope
   62 |     map<ll, ll> mp = PrimeFactors(p);
      |                      ^~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;


//repetition
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define euc_dis(x, y) sqrt(x*x + y*y)

#define MOD 1e9+7
#define sp ' '


using ll = long long;


ll mod(ll a, ll b){return (a%b+b)%b;}
ll gcd(ll a, ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b){return a*b/gcd(a,b);}
void Yes(){cout << "Yes" << endl;}
void No(){cout << "No" << endl;}
void Judge(bool b){b?Yes():No();}
void YES(){cout << "YES" << endl;}
void NO(){cout << "NO" << endl;}
void JUDGE(bool b){b?YES():NO();}
ll powMod(ll b, ll e, ll m){ll r=1;while(e>0){if(e&1)r=(r%m)*(b%m)%m;b=(b%m)*(b%m)%m;e>>=1;}return r;}
double distance(ll x1, ll y1, ll x2, ll y2){return sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2));}

template<typename T>
void ppp(T n){cout << n << endl;}

template<typename T>
map<T, T> factorization(T n){

    map<T, T> factor;
    while (n % 2 == 0){
        ++factor[2];
        n /= 2;
    }

    for (T i = 3; i*i <= n; i += 2){
        while (n%i == 0){
            ++factor[i];
            n /= i;
        }
    }

    if (n > 2)
        ++factor[n];

    return factor;
}

int main(){

    cin.tie(0);
    ios::sync_with_stdio(false);

    ll n, p;
    cin >> n >> p;
    map<ll, ll> mp;
    PrimeFactors(p, mp);
    if(n >= 40){
        ppp(1);
        return 0;
    }
    if(n == 1){
        ppp(p);
        return 0;
    }
    ll ans = 1LL;
    for(auto m : mp){
        if(m.second >= n)
            ans *= pow(m.first,(m.second/n));
    }
    ppp(ans);
    return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:63:5: error: 'PrimeFactors' was not declared in this scope
   63 |     PrimeFactors(p, mp);
      |     ^~~~~~~~~~~~
Language: C++

function main(input) {
    const args = input.split('\n');
    const Num = args[0].split(' ');

    const N = parseInt(Num[0]);
    const P = parseInt(Num[1]);

    if (N === 1) {
        console.log(N)
        return 0;
    }

    var PrimeFactors = [];

    var prime = 7;
    var step = 4;

    const getPrimeFactors = n => {
        if (n < 2) return [];
        if (n === 2 || n === 3 || n === 5) return [n];
        if (n % 2 === 0) return [2, ...getPrimeFactors(n / 2)];
        if (n % 3 === 0) return [3, ...getPrimeFactors(n / 3)];
        if (n % 5 === 0) return [5, ...getPrimeFactors(n / 5)];
        const limit = Math.sqrt(n);
        while (prime <= limit) {
            if (n % prime === 0) return [prime, ...getPrimeFactors(n / prime)];
            prime += step;
            step = 6 - step;
        }
        return [n];
    };

    PF = getPrimeFactors(P);

    var counts = {};

    for (var i = 0; i < PF.length; i++) {
        var key = PF[i];
        counts[key] = (counts[key]) ? counts[key] + 1 : 1;
    }

    var ans = 1;

    var key = Object.keys(counts);

    for(var i = 0; i < key.length; i++) {
        if(parseInt(counts[key[i]]) >= N) {
            ans = ans * parseInt(key[i]);
        }
    }

    console.log(ans);
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));


Compiler output:
a.cc:55:14: warning: multi-character character constant [-Wmultichar]
   55 | main(require('fs').readFileSync('/dev/stdin', 'utf8'));
      |              ^~~~
a.cc:55:33: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
   55 | main(require('fs').readFileSync('/dev/stdin', 'utf8'));
      |                                 ^~~~~~~~~~~~
a.cc:55:47: warning: multi-character character constant [-Wmultichar]
   55 | main(require('fs').readFileSync('/dev/stdin', 'utf8'));
      |                                               ^~~~~~
a.cc:1:1: error: 'function' does not name a type; did you mean 'union'?
    1 | function main(input) {
      | ^~~~~~~~
      | union
a.cc:55:5: error: expected constructor, destructor, or type conversion before '(' token
   55 | main(require('fs').readFileSync('/dev/stdin', 'utf8'));
      |     ^
Language: C++

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

int main(){
  long long int N,P;

  long long int pans = 0,ans = 0;

  cin >>N>>P;

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

  while(pow(pans,N) <= P ){
    pans++;
    /*cout <<pans<<endl;
    cout <<pow(pans,N)<<' '<<P<<endl;
    cout <<(double)P/pow(pans,N)<<' '<<(long long int)(P/pow(pans,N))<<endl;
    /*if (pans == 210)break;*/
    if(!(P%pow(pans,N)))ans = pans;
  }

  cout <<ans<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:11: error: invalid operands of types 'long long int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   22 |     if(!(P%pow(pans,N)))ans = pans;
      |          ~^~~~~~~~~~~~
      |          |    |
      |          |    __gnu_cxx::__promote<double>::__type {aka double}
      |          long long int
Language: C++

#include<iostream>
using namespace std;

main(){
int N,P;
cin >> N >> P;
int and=0;
for(int ii=2;ii<=P;ii++){
ii--;
int cnt=0;
if(N%ii==0){
N/ii;
cnt++;
}
else{
if(cnt>N)ans=ii;
ii++;
}
cout << ans << endl;
}
}


Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:7:8: error: expected unqualified-id before '=' token
    7 | int and=0;
      |        ^
a.cc:16:10: error: 'ans' was not declared in this scope; did you mean 'abs'?
   16 | if(cnt>N)ans=ii;
      |          ^~~
      |          abs
a.cc:19:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   19 | cout << ans << endl;
      |         ^~~
      |         abs
Language: C

#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <stdio.h>
 
int main()
{   long long p,n,base=1,ans;
    scanf("%lld%lld",&n,&p);
    if(n==1){
        printf("%lld",p);
        return 0;
    }
    while(pow(base,n)<=p){
        if(p%(long long)(pow(base,n))==0){
            ans=base;
        }
        base++;
    }
    
    printf("%d",ans);
 
    return 0;

Compiler output:
main.c: In function 'main':
main.c:22:5: error: expected declaration or statement at end of input
   22 |     return 0;
      |     ^~~~~~
Language: C++

#include <iostream>
#include <cmath>

using namespace std;

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

    uint64_t res=1;
    uint64_t x=2;

    if(n==1){
        res=p;
        goto out:
    }

    while(p!=1 && pow(x, n) <= p){
        bool found=true;
        for(uint64_t i=0; i<n; ++i){
            if(p%x){
                found=false;
                break;
            }
            p/=x;
        }
        if(found){
            res*=x;
            continue;
        }
        ++x;
    }
out:
    cout << res << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'uint64_t' was not declared in this scope
    7 |     uint64_t n, p;
      |     ^~~~~~~~
a.cc:3:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    2 | #include <cmath>
  +++ |+#include <cstdint>
    3 | 
a.cc:8:12: error: 'n' was not declared in this scope; did you mean 'yn'?
    8 |     cin >> n >> p;
      |            ^
      |            yn
a.cc:8:17: error: 'p' was not declared in this scope
    8 |     cin >> n >> p;
      |                 ^
a.cc:10:13: error: expected ';' before 'res'
   10 |     uint64_t res=1;
      |             ^~~~
      |             ;
a.cc:11:13: error: expected ';' before 'x'
   11 |     uint64_t x=2;
      |             ^~
      |             ;
a.cc:14:9: error: 'res' was not declared in this scope
   14 |         res=p;
      |         ^~~
a.cc:15:17: error: expected ';' before ':' token
   15 |         goto out:
      |                 ^
      |                 ;
a.cc:15:17: error: expected primary-expression before ':' token
a.cc:18:23: error: 'x' was not declared in this scope
   18 |     while(p!=1 && pow(x, n) <= p){
      |                       ^
a.cc:20:21: error: expected ';' before 'i'
   20 |         for(uint64_t i=0; i<n; ++i){
      |                     ^~
      |                     ;
a.cc:20:27: error: 'i' was not declared in this scope
   20 |         for(uint64_t i=0; i<n; ++i){
      |                           ^
a.cc:28:13: error: 'res' was not declared in this scope
   28 |             res*=x;
      |             ^~~
a.cc:34:13: error: 'res' was not declared in this scope
   34 |     cout << res << endl;
      |             ^~~
Language: C++

#include<iostream>
using namespace std;

main(){
int N,P;
cin >> N >> P;
int and=0;
for(int ii=2;ii<=P;ii+=0){
int cnt=0;
if(N%ii==0){
N/ii;
cnt++;
}
else{
if(cnt>N)ans=ii;
ii++;
}
cout << ans << endl;
}
}


Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:7:8: error: expected unqualified-id before '=' token
    7 | int and=0;
      |        ^
a.cc:15:10: error: 'ans' was not declared in this scope; did you mean 'abs'?
   15 | if(cnt>N)ans=ii;
      |          ^~~
      |          abs
a.cc:18:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   18 | cout << ans << endl;
      |         ^~~
      |         abs
Language: C++

#include<iostream>
using namespace std;

main(){
int N,P;
cin >> N >> P;
int and=0;
for(int ii=2;ii<P;){
int cnt=0;
if(N%ii==0){
N/ii;
cnt++;
}
else{
if(cnt>N)ans=ii;
ii++;
}
cout << ans << endl;
}
}


Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:7:8: error: expected unqualified-id before '=' token
    7 | int and=0;
      |        ^
a.cc:15:10: error: 'ans' was not declared in this scope; did you mean 'abs'?
   15 | if(cnt>N)ans=ii;
      |          ^~~
      |          abs
a.cc:18:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   18 | cout << ans << endl;
      |         ^~~
      |         abs
Language: C++

#include<iostream>
using namespace std;

main(){
int N,P;
cin >> N >> P;
int and=0;
for(int ii=2;ii<P;){
int cnt=0;
if(N%ii==0){
N/ii;
cnt++;
}
else{
if(cnt>N)ans=ii;
ii++;
}
cout << ans << endl;
}


Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:7:8: error: expected unqualified-id before '=' token
    7 | int and=0;
      |        ^
a.cc:15:10: error: 'ans' was not declared in this scope; did you mean 'abs'?
   15 | if(cnt>N)ans=ii;
      |          ^~~
      |          abs
a.cc:18:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   18 | cout << ans << endl;
      |         ^~~
      |         abs
a.cc:19:2: error: expected '}' at end of input
   19 | }
      |  ^
a.cc:4:7: note: to match this '{'
    4 | main(){
      |       ^
Language: C++

#include<iostream>
#include<string>
#include<sstream>
#include<vector>
#include<algorithm>
#include<math.h>


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 long n = 0;
	long long p = 0;
	long long i = 0;

	cin >> n >> p;

	long long n_ori = n;
	long long p_ori = p;
	bool ok = true;

	long long ret = p;

	while (p +1 < (ret ^ n) && ret != 1){
		ret = sqrt(ret);
	}



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

		}

		if (ok){
			break;
		}
		
	//ユー栗っと互助
/*
long long a = p;
	long long b = ret;
	while (true){
		if (a % b == 0){
			ret = b;
			break;
		}
		a = a % b;

		if (b % a == 0){
			ret = a;
			break;
		}
		b = b % a;

	}
*/
	cout << ret;

	/*Q4*/

	/*if (true){
		cout << "first" << endl;
	}
	else{
		cout << "second" << endl;
	}*/
	return 0;
	
}


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

#include <stdio.h>

int main(void)
{
	int N,P;
	int i,f;
	int A=0;
	long s,t;
	
	scanf("%d%d",&N&P);
	for(i=0;i<P;i++){//P回繰り返す
	    
	    t=1;
	    s=i;
	    while(s!=0){
	   t=t*i;
	     s--;
	    }
	   
	    
	    if(P%t==0)A=i;
	}
	
	printf("%d",A);
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:24: error: invalid operands to binary & (have 'int *' and 'int')
   10 |         scanf("%d%d",&N&P);
      |                      ~~^
      |                      |
      |                      int *
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
  ll n,k;
  cin>>n>>k;
  if(n==1){
    cout<<k;
    return 0;
  }
   double c=1;
  for(double i=1;;i++){
    if((double)k%pow(i,(double)n)==0){
      c=i;
    }else if((double)k<pow(i,(double)n)) break;
  }
  cout<<(ll)c;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: invalid operands of types 'double' and 'double' to binary 'operator%'
   13 |     if((double)k%pow(i,(double)n)==0){
      |        ~~~~~~~~~^~~~~~~~~~~~~~~~~
      |        |            |
      |        double       double
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <unordered_set>
using namespace std;
#define rep(i,n) for(int i=0;i<n;++i)
unordered_multiset<long long int>fact(long long int n){
	unordered_multiset<long long int>ret;
	long long int a=2;
	while (n!=1){
		if (n%a==0){
			n/=a;
			ret.insert(a--);
		}
		a++;
	}
	return ret;
}
int main(){
long long int n,p;
cin >>n>>p;
if (n==1){
	cout <<p;
	return 0;
}
if (n>=20){
	cout <<"1"<<endl;
	return 0
}
long long int ans=1;
auto l=fact(p);
long long int cnt=0;
for (long long int i=1;p>=pow(i-1,n);++i)
	cnt=i;
rep(i,cnt){
	long long int tmp=l.count(i);
	if(tmp>=n)
		ans*=pow(i,tmp/n);
}
cout <<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:17: error: expected ';' before '}' token
   30 |         return 0
      |                 ^
      |                 ;
   31 | }
      | ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
  ll n,k;
  cin>>n>>k;
  if(n==1){
    cout<<k;
    return 0;
  }
  ll double c=1;
  for(double i=1;;i++){
    if((double)k%pow(i,(double)n)==0){
      c=i;
    }else if((double)k<pow(i,(double)n)) break;
  }
  cout<<(ll)c;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:17: error: 'long long' specified with 'double'
    3 | #define ll long long
      |                 ^~~~
a.cc:11:3: note: in expansion of macro 'll'
   11 |   ll double c=1;
      |   ^~
a.cc:13:17: error: invalid operands of types 'double' and 'double' to binary 'operator%'
   13 |     if((double)k%pow(i,(double)n)==0){
      |        ~~~~~~~~~^~~~~~~~~~~~~~~~~
      |        |            |
      |        double       double
Language: C++

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

int main(){
        long N,P;
        int ret;
        bool flg2,flg3,flg5,flg7;
        flg2 = flg3 = flg5 = flg7 =false;

        long mgcm;

        // input
        ret = scanf("%ld%ld", &N, &P);
        if(ret == EOF) return -1;

        if(P%2 != 0) flg2=true;
        if(P%3 != 0) flg3=true;
        if(P%5 != 0) flg5=true;
        if(P%7 != 0) flg7=true;

        // finish value
        long fin = (long)pow(P, 1.0/N);

        // printf("%ld\n", fin);

        double dst;
        long out = 1;
        mgcm = 2;
        while(mgcm <= fin){
                dst = (double)P;
                for(int i=0; i<N; i++){
                        dst = dst/mgcm;
                }
                // printf("%lf %ld\n", dst, (long)dst);
                if((long)dst == dst){
                        out = mgcm;
                }
                mgcm++;

                if(mgcm%2 == 0 %% flg2) mgcm++;
                if(mgcm%3 == 0 %% flg3) mgcm++;
                if(mgcm%5 == 0 %% flg5) mgcm++;
                if(mgcm%7 == 0 %% flg7) mgcm++;
        }

        printf("%ld\n", out);

        return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:33: error: expected primary-expression before '%' token
   41 |                 if(mgcm%2 == 0 %% flg2) mgcm++;
      |                                 ^
a.cc:42:33: error: expected primary-expression before '%' token
   42 |                 if(mgcm%3 == 0 %% flg3) mgcm++;
      |                                 ^
a.cc:43:33: error: expected primary-expression before '%' token
   43 |                 if(mgcm%5 == 0 %% flg5) mgcm++;
      |                                 ^
a.cc:44:33: error: expected primary-expression before '%' token
   44 |                 if(mgcm%7 == 0 %% flg7) mgcm++;
      |                                 ^
Language: C

#include <stdio.h>

long power(int f, int e){
        long ret = 1;
        while(e > 0){
                ret = ret * f;
                e--;
        }
        return ret;
}

long solve(long x, int p, int a, long n){
        if (n==1)
                return x;
        if (x % p == 0){
                long d = power(p,n);
                if (d > x)
                        return a;
                int c = 0;
                while (x % d == 0){
                        x = x / d;
                        c++
                }
                a = a * power(p, c);
        }
        if (p == 2)
                return solve(x,p+1,a,n);
        return solve(x,p+2,a,n);
}

int main(){
        long n,p;
        scanf("%ld %ld",&n,&p);
        printf("%ld\n",solve(p,2,1,n));
        return 0;
}

Compiler output:
main.c: In function 'solve':
main.c:22:28: error: expected ';' before '}' token
   22 |                         c++
      |                            ^
      |                            ;
   23 |                 }
      |                 ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
  ll n,k;
  cin>>n>>k;
  if(n==1){
    cout<<k;
    return 0;
  }
  ll c=1;
  for(int i=1;;i++){
    if(k%pow(i,n)==0){
      c=i;
    }else if(k<pow(i,n)) break;
  }
  cout<<c;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: invalid operands of types 'long long int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   13 |     if(k%pow(i,n)==0){
      |        ~^~~~~~~~~
      |        |    |
      |        |    __gnu_cxx::__promote<double>::__type {aka double}
      |        long long int
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
  ll n,k;
  cin>>n>>k;
  if(n==1){
    cout<<k;
    return 0;
  }
  ll c=1;
  for(i=1;;i++){
    if(k%pow(i,n)==0){
      c=i;
    }else if(k<pow(i,n)) break;
  }
  cout<<c;
}

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

#include <bits/stdc++.h>
#define MAXN 1000000
using namespace std;
bool isprime[MAXN+1];
int prime[MAXN+1],phi[MAXN+1],next[MAXN+1],cnt[MAXN+1];
long long ret=1;
void liner_sieve(int n)
{
    int i,j;
    phi[1] = 1;
    memset(isprime,0,sizeof(isprime));
    prime[0]=0;
    for(i=2;i<=n;i++) 
    {
        if(!isprime[i]) 
        {
            prime[++prime[0]]=i;
            next[i]=prime[0];
            phi[i]=i-1;
        }
        for(j=1;i*prime[j]<=n&&j<=prime[0];j++) 
        {
            isprime[i*prime[j]]=true;
            next[i*prime[j]]=j;
            if(i%prime[j]==0)
                break;
        }
    }
} 
int main()
{
	int n,p;
	scanf("%d %d",&n,&p);
	printf("1");
	return 0;
}

Compiler output:
a.cc: In function 'void liner_sieve(int)':
a.cc:18:13: error: reference to 'next' is ambiguous
   18 |             next[i]=prime[0];
      |             ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:66,
                 from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
  232 |     next(_InputIterator __x, typename
      |     ^~~~
a.cc:5:31: note:                 'int next [1000001]'
    5 | int prime[MAXN+1],phi[MAXN+1],next[MAXN+1],cnt[MAXN+1];
      |                               ^~~~
a.cc:24:13: error: reference to 'next' is ambiguous
   24 |             next[i*prime[j]]=j;
      |             ^~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
  232 |     next(_InputIterator __x, typename
      |     ^~~~
a.cc:5:31: note:                 'int next [1000001]'
    5 | int prime[MAXN+1],phi[MAXN+1],next[MAXN+1],cnt[MAXN+1];
      |                               ^~~~
Language: C++

#include <iostream>
#include <cmath>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#define ll long long
using namespace std;
int main(){
ll N,P,tmp,boset,ans=1;
cin>>N>>P;

if(N==1){
  printf("%lld\n",P);
  return 0;
}

boset=1;
for(ll i=1;;i++){
  boset*=2;
  tmp=1;
  for(ll j=0;j<N;j++){
    tmp*=boset;
  }
  if(tmp>P)
  break;
}
if(P%2==0){
for(ll i=boset;i>0;i--){
  tmp=1;
  for(ll j=0;j<N;j++){
    tmp*=i;
    if(P%tmp=!=0)
    break;
  }
if(P%tmp==0){
ans=i;
break;
}
}
}
else{
  for(ll i=boset-1;i>0;i--){
    tmp=1;
    for(ll j=0;j<N;j++){
      tmp*=i;
      if(P%tmp=!=0)
      break;
    }
  if(P%tmp==0){
  ans=i;
  break;
  }
  i--;
  }
}

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


Compiler output:
a.cc: In function 'int main()':
a.cc:33:14: error: expected primary-expression before '!=' token
   33 |     if(P%tmp=!=0)
      |              ^~
a.cc:47:16: error: expected primary-expression before '!=' token
   47 |       if(P%tmp=!=0)
      |                ^~
Language: C++

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

int main(){
    double n,p,count,a;
    cin >> n >> p;
    for(double i=1;;i++){
        a=pow(i,n);
        if(a<=(p/2){
            if(fmod(p,a)==0){
                count=i;
            }
        }else{
            break;
        } 
    }
    cout << count;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: expected ')' before '{' token
   10 |         if(a<=(p/2){
      |           ~        ^
      |                    )
a.cc:17:5: error: expected primary-expression before '}' token
   17 |     }
      |     ^
Language: C++

#include <math.h>
#include <stdlib.h>
#include <algorithm>
#include <array>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>

using namespace std;

#define rep(i, n) for (int i = 0; i < (n); i++)
#define loop(i, a, n) for (int i = a; i < (n); i++)
#define all(in) in.begin(), in.end()
const int INF = 1e9;
const int MOD = 1e9 + 7;
#define MAX_N 200000000
vector<bool> Isprime(MAX_N, true);
void eratos(long long P) {
    Isprime[0] = false, Isprime[1] = false;
    loop(i, 2, P) {
        if (Isprime[i]) {
            for (long long k = i * 2; k < MAX_N; k += i) Isprime[k] = false;
        }
    }
}
int main() {
    eratos();
    long long N, P, ans = 1;
    cin >> N >> P;
    for (long long i = 2; i < P; i++) {
        long long count = 0;
        if (Isprime[i]) {
            while (P % i == 0) {
                P = P / i;
                count++;
                // cout << i << " " << P << " " << count << endl;
            }
            if (count > 0) {
                ans = ans * max((long long)1, i * (count / N));
            }
        }
    }
    cout << ans << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:11: error: too few arguments to function 'void eratos(long long int)'
   33 |     eratos();
      |     ~~~~~~^~
a.cc:24:6: note: declared here
   24 | void eratos(long long P) {
      |      ^~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <unordered_set>
using namespace std;
#define rep(i,n) for(int i=0;i<n;++i)
unordered_multiset<long long int>fact(long long int n){
	unordered_multiset<long long int>ret;
	long long int a=2;
	while (n!=1){
		if (n%a==0){
			n/=a;
			ret.insert(a--);
		}
		a++;
	}
	return ret;
}
int main(){
long long int n,p;
cin >>n>>p;
if (n==1){
	cout <<p;
	return 0;
}
if (n>=40){
	cout <<"1"<<endl;
	return 0
}
long long int ans=1;
auto l=fact(p);
long long int cnt=0;
for (long long int i=1;p>=pow(i-1,n);++i)
	cnt=i;
rep(i,cnt){
	long long int tmp=l.count(i);
	if(tmp>=n)
		ans*=pow(i,tmp/n);
}
cout <<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:17: error: expected ';' before '}' token
   30 |         return 0
      |                 ^
      |                 ;
   31 | }
      | ~
Language: C++

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<vector>

using namespace std;

/*
n p

*/
typedef long long int ll;
ll n, p;
ll arr[1000000000];

ll pow(ll x, ll n){
  if(n == 0) return 1;
  else return x * pow(x, n - 1);
}

void Eratosthenes(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;
			}
		}
	}

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

  vector<bool> f(p, true);
  int gcd = 1;
  for(int i = 1; i <= p; i++){
    ll prime = arr[i];
    if(p % pow(prime, n) == 0){
      gcd *= prime;
      p /= pow(prime, n);
    }
  }
  cout << gcd << endl;

  return 0;
}



Compiler output:
a.cc: In function 'void Eratosthenes(int)':
a.cc:25:28: error: 'sqrt' was not declared in this scope
   25 |         for(int i = 2; i < sqrt(N); i++){
      |                            ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
	long long n,num,verysum=1;
	cin>>n>>num;
	if(n>=40)
	{
		cout<<1;
		return 0;
	}
	if(n==1){
		cout<<num;
		return 0;
	}
	for(int i=2;pow(i,n)<=num;i++)
	{
		while(num%long long(pow(i,n))==0)
			verysum*=i,
			num/=(pow(i,n));
	}
	cout<<verysum;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:27: error: expected primary-expression before 'long'
   17 |                 while(num%long long(pow(i,n))==0)
      |                           ^~~~
a.cc:17:27: error: expected ')' before 'long'
   17 |                 while(num%long long(pow(i,n))==0)
      |                      ~    ^~~~
      |                           )
a.cc:17:27: error: expected primary-expression before 'long'
   17 |                 while(num%long long(pow(i,n))==0)
      |                           ^~~~