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

#include<bits/stdc++.h>
#define mins(a,b) a=min(a,b)
#define maxs(a,b) a=max(a,b)
 template < typename T > std::string to_string( const T& n )
  {
    std::ostringstream stm ;
    stm << n ;
    return stm.str() ;
  }
using namespace std;

const long long INF=9000000000000000;
int main(){
  long long n,x=0,p;
  cin>>n>>p;
  int num[p+10]={};
  if(n==1)
    cout<<p<<endl;
  else{
    for(int i=2;i<=p;i++){
      while(p%i==0){
        num[i]++;
        x++;
      }
      if(p==1)
        break;
    }
    long long ans=1,y=0;
  }
  for(int i=0;i<p+10;i++){
    y+=num[i];
    if(num[i]>=n)
      ans*=i*(num[i]/n);
    if(y==x)
      break;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:5: error: 'y' was not declared in this scope
   31 |     y+=num[i];
      |     ^
a.cc:33:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   33 |       ans*=i*(num[i]/n);
      |       ^~~
      |       abs
Language: C++

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

using namespace std;
typedef long long int ll;

#define repi(i,a,b) for(ll i=a;i<b;i++)
#define rep(i,a) repi(i,0,a)
#define rrep(i,a) for(ll i=a-1;i>=0;i--)

int main(){
  ll N, P;
  cin >> N >> P;
  if(N==1){
    ll ans = P;
  }else{
    ll ans = 1;
    ll p = P;
    ll n = 2;
    while(n <= p && n*n <= P){
      ll pow = 0;
      while(p % n == 0){
        p /= n;
        pow++;
        if(pow%N==0) ans *= n;
      }
      n++;
    }
  }
  cout << ans << endl;
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:34:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   34 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

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

using namespace std;
typedef long long int ll;

#define repi(i,a,b) for(ll i=a;i<b;i++)
#define rep(i,a) repi(i,0,a)
#define rrep(i,a) for(ll i=a-1;i>=0;i--)

int main(){
  ll N, P;
  cin >> N >> P;
  if(N==1){
    ll ans = P
  }else{
    ll ans = 1;
    ll p = P;
    ll n = 2;
    while(n <= p && n*n <= P){
      ll pow = 0;
      while(p % n == 0){
        p /= n;
        pow++;
        if(pow%N==0) ans *= n;
      }
      n++;
    }
  }
  cout << ans << endl;
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:20:3: error: expected ',' or ';' before '}' token
   20 |   }else{
      |   ^
a.cc:34:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   34 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

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

typedef long long ll;

ll N, P;

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

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

	map<ll, ll> res;
	res = prime_factor(P);

	ll sum = 1;
	for (map<ll,ll>::iterator i = res.begin(); i != res.end(); i++) {
		if (i->second >= N) {
			sum *= pow(i->first,(i->second / N));
		}
	}

	cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:32: error: 'pow' was not declared in this scope
   30 |                         sum *= pow(i->first,(i->second / N));
      |                                ^~~
Language: C++

// by adiforluls
#pragma GCC optimize ("-O2")
#include<bits/stdc++.h>
using namespace std;
#define FASTNIBBA   ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define ll          long long
#define ld          long double
#define pb          push_back
#define mp          make_pair
#define pii         pair<int,int>
#define mii         map<int,int>
#define vi          vector<int>
#define vll         vector<long long>
#define lbnd        lower_bound
#define ubnd        upper_bound
#define all(a)      (a).begin(),(a).end()
#define clz(a)      __builtin_clz(a) // count leading zeroes
#define ctz(a)      __builtin_ctz(a) // count trailing zeroes
#define popc(a)     __builtin_popcount(a) // count set bits (for ints only diff for ll)
#define lul         1000000007
#define rep(i,a,b)  for(int i=a;i<b;i++)
#define SIZE        1000005
#define F           first
#define S           second
#define debug(x)    cerr << #x << " = " << x << endl;
#define mod         998244353
#define TRACE
#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
    std::cerr << name << " = " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
    const char* comma = strchr(names + 1, ',');std::cerr.write(names, comma - names) << " = " << arg1<<" |";__f(comma+1, args...);
}
#else
#define trace(...)
#endif
#define endl        '\n'
const ld PI = acos(-1.0);

void solve()
{
   ll n,p; cin>>n>>p;
   ll ans=1;
   if(n==1 || p==1) {cout<<p; return;}
   ll x=p;
   for(ll i=2; i*i<=p; i++)
   {
     ll cnt=0;
     while(x%i==0)
     {
       cnt++;
       x/=i;
     }
     if(cnt>=n)
     {
       ll r=t/n;
       ans*=pow(i,r);
     }
   }
   cout<<ans;   
}
int main()
{
    FASTNIBBA;
   //  #ifndef ONLINE_JUDGE
     // freopen("input.txt", "r", stdin);
     // freopen("output.txt", "w", stdout);
   //  #endif
    int t; t=1;
    while(t--){
       solve();
    }
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:60:13: error: 't' was not declared in this scope
   60 |        ll r=t/n;
      |             ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define FOR(i, a, b) for(int i=(a);i<(b);i++)
#define REP(i, n) FOR(i, 0, n)
#define RFOR(i, a, b) for(int i=(a);i>=(b);i--)
#define RREP(i, n) RFOR(i, n, 0)
#define MFOR(i, m) for(auto i=(m).begin();i!=(m).end();i++)
#define ALL(a) (a).begin(), (a).end()
#define SZ(x) ((int)(x).size())

typedef long long int ll;
typedef pair<int, int> P;
typedef pair<ll, ll> Pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef vector<vll> vvll;

const double eps = 1e-10;
const int MOD = 1000000007;
const int INF = 1000000000;
const ll LINF = 1 << 30;

template<typename T>
void printv(vector<T> const& s) {
  REP(i, SZ(s)) {
    cout << s[i] << " ";
  }
  cout << endl;
}

int main () {
  cin.tie(0);
  cout << setprecision(10);

  ll n, p; cin >> n >> p;
  map<ll, ll> m;
  ll tmp = p
  for(int i = 2; i*i<=tmp;i++) {
    while(p % i == 0) {
      m[i]++;
      p /= i;
    }
  }
  if(p != 1) m[p]++;

  ll ans = 1;
  MFOR(i, m) {
    ans *= max(1ll, i->first * (i->second / n));
  }
  cout << ans << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:45:3: error: expected ',' or ';' before 'for'
   45 |   for(int i = 2; i*i<=tmp;i++) {
      |   ^~~
a.cc:45:18: error: 'i' was not declared in this scope
   45 |   for(int i = 2; i*i<=tmp;i++) {
      |                  ^
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<cmath>
#include<vector>
#include<map>
#include<set>
#include<queue>
#include<stack>
using namespace std;
typedef long long ll;
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define INF 1000000000
int n;
int p;
int ans = 1;
map<ll, int>mp;
ll modpow(ll a, int b) {
	if (!b)return 1;
	if (b % 2)return modpow(a, b - 1)*a;
	return modpow(a, b / 2)*modpow(a, b / 2);
}
int main() {
	cin >> n >> p;
	if (n == 1) {
		cout << p << endl;
		return 0;
	}
  while (p%2 == 0) {
			mp[2]++;
			p /= 2;
			if (p == 1)goto got;
 }
	for (ll i = 3;i <= 100000;i += 2) {
		while (p%i == 0) {
			mp[i]++;
			p /= i;
			if (p == 1)goto got;
		}
	}
got:;
	for (auto x : mp) {
		ans *= modpow(x.first, x.second / n);
	}
	cout << ans << endl;
	getchar();getchar();
	return 0;
}

Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
	ll n, p;
	cin >> n >> p;
	if(n==1){
		cout << p << endl;
		return 0;
	}
	ll ans = 1;
	for(ll i = 2; i <= 1e6; i++){
		int cnt = 0;
		while(p%i==0){
			p/=i;
			cnt++;
		}
		cnt/=n;
		while(cnt){
			ans*=i;
			cnt--;
		}
	}
	cout << ans;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'll' was not declared in this scope
    5 |         ll n, p;
      |         ^~
a.cc:6:16: error: 'n' was not declared in this scope; did you mean 'yn'?
    6 |         cin >> n >> p;
      |                ^
      |                yn
a.cc:6:21: error: 'p' was not declared in this scope
    6 |         cin >> n >> p;
      |                     ^
a.cc:11:11: error: expected ';' before 'ans'
   11 |         ll ans = 1;
      |           ^~~~
      |           ;
a.cc:12:15: error: expected ';' before 'i'
   12 |         for(ll i = 2; i <= 1e6; i++){
      |               ^~
      |               ;
a.cc:12:23: error: 'i' was not declared in this scope
   12 |         for(ll i = 2; i <= 1e6; i++){
      |                       ^
a.cc:20:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
   20 |                         ans*=i;
      |                         ^~~
      |                         abs
a.cc:24:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   24 |         cout << ans;
      |                 ^~~
      |                 abs
Language: C++

#include<iostream>
using namespace std;
int main()
{
	long long n,m;
	cin>>n>>m;

	if(n==1)cout<<m<<endl;
	else
	{
		for(int i=1e6+2,i>0;i--)
		{
			LL x = m,cnt = 0;
			while(x%i == 0)
			{
				x /= i;
				cnt += 1;
			}
			if(cnt == n){
				cout<<i<<endl;
				exit(0);
			}
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:34: error: expected ';' before '>' token
   11 |                 for(int i=1e6+2,i>0;i--)
      |                                  ^
      |                                  ;
a.cc:11:34: error: expected primary-expression before '>' token
a.cc:13:25: error: 'LL' was not declared in this scope
   13 |                         LL x = m,cnt = 0;
      |                         ^~
a.cc:14:31: error: 'x' was not declared in this scope
   14 |                         while(x%i == 0)
      |                               ^
a.cc:17:33: error: 'cnt' was not declared in this scope; did you mean 'int'?
   17 |                                 cnt += 1;
      |                                 ^~~
      |                                 int
a.cc:19:28: error: 'cnt' was not declared in this scope; did you mean 'int'?
   19 |                         if(cnt == n){
      |                            ^~~
      |                            int
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long n,m;
	cin>>n>>m;

	if(n==1)cout<<m<<endl;
	else
	{
		for(int i=1e6+2,i>0;i--)
		{
			LL x = m,cnt = 0;
			while(x%i == 0)
			{
				x /= i;
				cnt += 1;
			}
			if(cnt == n){
				cout<<i<<endl;
				exit(0);
			}
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:34: error: expected ';' before '>' token
   11 |                 for(int i=1e6+2,i>0;i--)
      |                                  ^
      |                                  ;
a.cc:11:34: error: expected primary-expression before '>' token
a.cc:13:25: error: 'LL' was not declared in this scope
   13 |                         LL x = m,cnt = 0;
      |                         ^~
a.cc:14:31: error: 'x' was not declared in this scope
   14 |                         while(x%i == 0)
      |                               ^
a.cc:17:33: error: 'cnt' was not declared in this scope; did you mean 'int'?
   17 |                                 cnt += 1;
      |                                 ^~~
      |                                 int
a.cc:19:28: error: 'cnt' was not declared in this scope; did you mean 'int'?
   19 |                         if(cnt == n){
      |                            ^~~
      |                            int
Language: C++

#include<cstdio>
#include<cmath>
#include<cstring>
#include<algorithm>
#include <numeric>
using namespace std;

int main()
{	
	long long int N;
	long long int P;
	scanf("%lld %lld", &N, &P);

	long long int soin[1000000][2];
	for(long long int i=0;i<1000000;i++){
		soin[i][0]=0;
		soin[i][1]=0;
	}
///	if(N!=1){
	long long int p=2;
	long long int counter=0;
	while(p<=1000000){
		if(P%p==0)
		{	
			P=P/p;
			soin[counter][0]=p;
			soin[counter][1]++;
		}
		else
		{
			if(soin[counter][0]!=0){counter++;}
			p++;
		}
	}
	if(soin[0][0]==0){
		soin[0][0]=P;
		soin[0][1]=1;
	}
		
		
	long long int ans=1;
	for(long long int i=0;i<1000000;i++){
		
			if((soin[i][1])/N!=0)
			{		
					for(long long int j=0;j<(soin[i][1])/N;j++){
						ans=ans*soin[i][0];
					}
			}
		
	}
	if(n==1){ans=ans*P;}
	printf("%lld", ans);
///	}
///	else{
///		printf("%lld", P);
///		}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:52:12: error: 'n' was not declared in this scope
   52 |         if(n==1){ans=ans*P;}
      |            ^
Language: C++

#include<bits/stdc++.h>
 
using namespace std;
long long n,p,maxx=1,dem=0;
 
void input()
{
	cin>>n>>p;
}
 
void output()
{
	cout<<maxx;
}
 
void kt(long long x)
{
	if (x<4) return;
	long long y=x;
	for (long i=2; i*i<=x; i++)
	{
		if (y==1) return;
		dem=0;
		while (y%i==0)
		{
			y=y/i;
			dem++;
		}
		if (dem/n>0) 
		for (int i=1; i<=dem/n; i++) max*=i;
	}
}
 
void fin()
{
	if (n==1) 
	{
		maxx=p;
		return;
	}
	kt(p);
}
 
main()
{
//	freopen("TEST.INP","r",stdin);
//	freopen("TEST.OUT","w",stdout);
	input();
	fin();
	output();
	return 0;
}


Compiler output:
a.cc: In function 'void kt(long long int)':
a.cc:30:51: error: overloaded function with no contextual type information
   30 |                 for (int i=1; i<=dem/n; i++) max*=i;
      |                                                   ^
a.cc: At global scope:
a.cc:44:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   44 | main()
      | ^~~~
Language: C++

#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <string>
#include <deque>
#include <cmath>
#include <queue>
#include <ctime>
#include <functional> // std::greater <int> ()
#define inf 1000000000000000001

typedef long long ll;
typedef long double ld;
using namespace std;

//variables
ll n, p, ans=1;
ll prime[200000001], dem[200000001];
int pos=0;
bool check=0;

//functions
void factor(ll x){
	ll n=2;
	while(x!=1){
		if(x%n==0){
			pos++;
			prime[pos]=n;
			while(x%n==0){
				x=x/n;
				dem[pos]++;
			}
		}
		if(n*n>x){
			pos++;
			prime[pos]=x;
			dem[pos]=1;
		}
		n++;
	}
}

void input(){
	cin >> n >> p;
}

void solve(){
	ll temp;
	if(n==1){
		check=1;
		return;
	}
	factor(p);
	for(int i=1; i<=pos; i++){
		temp=dem[i]/n;
		for(ll j=1; j<=temp; j++){
			ans*=prime[i];
		}
	}
}

void output(){
	if(check){
		cout << p;
		return;
	}
	cout << ans;
	return;
}

int main(){
//  freopen(".INP", "r", stdin);
//  freopen(".OUT", "w", stdout);
	input();
	solve();
	output();
	return 0;
}
//  Author: NamSPro

Compiler output:
/tmp/ccATRFjz.o: in function `factor(long long)':
a.cc:(.text+0x2d): relocation truncated to fit: R_X86_64_PC32 against symbol `pos' defined in .bss section in /tmp/ccATRFjz.o
a.cc:(.text+0x36): relocation truncated to fit: R_X86_64_PC32 against symbol `pos' defined in .bss section in /tmp/ccATRFjz.o
a.cc:(.text+0x3c): relocation truncated to fit: R_X86_64_PC32 against symbol `pos' defined in .bss section in /tmp/ccATRFjz.o
a.cc:(.text+0x6b): relocation truncated to fit: R_X86_64_PC32 against symbol `pos' defined in .bss section in /tmp/ccATRFjz.o
a.cc:(.text+0xc0): relocation truncated to fit: R_X86_64_PC32 against symbol `pos' defined in .bss section in /tmp/ccATRFjz.o
a.cc:(.text+0xc9): relocation truncated to fit: R_X86_64_PC32 against symbol `pos' defined in .bss section in /tmp/ccATRFjz.o
a.cc:(.text+0xcf): relocation truncated to fit: R_X86_64_PC32 against symbol `pos' defined in .bss section in /tmp/ccATRFjz.o
a.cc:(.text+0xee): relocation truncated to fit: R_X86_64_PC32 against symbol `pos' defined in .bss section in /tmp/ccATRFjz.o
/tmp/ccATRFjz.o: in function `solve()':
a.cc:(.text+0x16b): relocation truncated to fit: R_X86_64_PC32 against symbol `check' defined in .bss section in /tmp/ccATRFjz.o
a.cc:(.text+0x1fe): relocation truncated to fit: R_X86_64_PC32 against symbol `pos' defined in .bss section in /tmp/ccATRFjz.o
/tmp/ccATRFjz.o: in function `output()':
a.cc:(.text+0x210): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include<algorithm>
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod=1e12;
ll d(ll a,ll b)
{
    ll c=1;
    while(b)
    { if(b&1)c*=a;
    a*=a;
        b>>=1;
    }
    return c;
}

int main()
{
 ll n,p;
 cin>>n>>p;
 ll sum=1,z;z=2;
 if(n>32){cout<<1;return 0;}
 ll x1=0{ll x;x=0;
 while(x<=p)
 x=d(z,n);//cout<<x<<endl;
  if(x>mod||x<=0||x<x1)break;
  x1=x;
      if(p%x==0)sum*=z,p/=x;
     else z++;
 }if(n==1)sum*=p;
 cout<<sum;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:9: error: expected ',' or ';' before '{' token
   24 |  ll x1=0{ll x;x=0;
      |         ^
Language: C++

#include <iostream>
#include<algorithm>
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod=1e12;
ll d(ll a,ll b)
{
    ll c=1;
    while(b)
    { if(b&1)c*=a;
    a*=a;
        b>>=1;
    }
    return c;
}

int main()
{ 
 ll n,p;
 cin>>n>>p;
 ll sum=1,z;z=2;
 if(n>32){cout<<1;return 0;}
 ll x1=0;
 while(x<=p)
 {ll x;x=d(z,n);//cout<<x<<endl;
  if(x>mod||x<=0||x<x1)break;
  x1=x;
      if(p%x==0)sum*=z,p/=x;
     else z++;
 }if(n==1)sum*=p;
 cout<<sum;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:8: error: 'x' was not declared in this scope; did you mean 'x1'?
   25 |  while(x<=p)
      |        ^
      |        x1
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <math.h>
using namespace std;
int main{
  int N;
  cin>>N;
  int a[100000];
  for(int i=0;i<N;i=i+1){
    cin>>a[i];
  }
  int judge=0;
  for(int i=0;i<N;i=i+1){
    if(a[i]/2==1){
      judge=judge+1;
    }
  }
  if(judge==0){
    cout<<second<<endl;
  }
  else{
    cout<<first<<endl;
  }
}


Compiler output:
a.cc:6:5: error: cannot declare '::main' to be a global variable
    6 | int main{
      |     ^~~~
a.cc:7:3: error: expected primary-expression before 'int'
    7 |   int N;
      |   ^~~
a.cc:7:3: error: expected '}' before 'int'
a.cc:6:9: note: to match this '{'
    6 | int main{
      |         ^
a.cc:8:3: error: 'cin' does not name a type
    8 |   cin>>N;
      |   ^~~
a.cc:10:3: error: expected unqualified-id before 'for'
   10 |   for(int i=0;i<N;i=i+1){
      |   ^~~
a.cc:10:15: error: 'i' does not name a type
   10 |   for(int i=0;i<N;i=i+1){
      |               ^
a.cc:10:19: error: 'i' does not name a type
   10 |   for(int i=0;i<N;i=i+1){
      |                   ^
a.cc:14:3: error: expected unqualified-id before 'for'
   14 |   for(int i=0;i<N;i=i+1){
      |   ^~~
a.cc:14:15: error: 'i' does not name a type
   14 |   for(int i=0;i<N;i=i+1){
      |               ^
a.cc:14:19: error: 'i' does not name a type
   14 |   for(int i=0;i<N;i=i+1){
      |                   ^
a.cc:19:3: error: expected unqualified-id before 'if'
   19 |   if(judge==0){
      |   ^~
a.cc:22:3: error: expected unqualified-id before 'else'
   22 |   else{
      |   ^~~~
a.cc:25:1: error: expected declaration before '}' token
   25 | }
      | ^
Language: C++

#include<iostream>
#include<string>
#include<iomanip>
#include<cmath>
#include<vector>
#include<algorithm>
#include<map>

using namespace std;

#define int long long
#define rep(i,n) for(int i = 0; i < (n); i++)
#define INF (long long)(1e18)
#define MOD (int)(1e9+7)

#define yn(f) ((f)?"Yes":"No")
#define YN(f) ((f)?"YES":"NO")

long long power(long long x, long long n){
	long long ans = 1;
	while(n){
		if(n&1) ans *= x;
		n >>= 1;
		x *= x;
	}
	return ans;
}


signed main(){
	cout<<fixed<<setprecision(7);
	
	map<int,int> mp;
	int N, P, ans = 1;
	
	cin>>N>>P;
	
	int t = P;
	for(int i = 2; i*i <= t; i++){
		if(t%i == 0){
			while(t%i==0){
				t/=i;
				mp[i]++;
			}
		}
	}
	
	if(t != 1) mp[t]++;
	
	for(pair<int,int> y: mp){
		if(y.second >= N){
			ans = max(max(ans,y.first),);
		}
	}
	
	cout<<ans<<endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:52:52: error: expected primary-expression before ')' token
   52 |                         ans = max(max(ans,y.first),);
      |                                                    ^
Language: C++

#include <iostream>
unsigned long long a,b
bool chk(unsigned long long c){
  for(unsigned long long i=0;i<a;i++){
    if(b%c==0) b/=c;
    else return false;
  }
  return true;
}
int main(void){
  std::cin >> a >> b;
  if(a==1){
    std::cout << b;
    return 0;
  }else{
    unsigned long long c=1000000;
    for(;c>1;c--){
      if(chk(c)){
        std::cout << c;
        return 0;
      }
    }
    std::cout << "1";
    return 0;
  }
}

Compiler output:
a.cc:3:1: error: expected initializer before 'bool'
    3 | bool chk(unsigned long long c){
      | ^~~~
a.cc: In function 'int main()':
a.cc:11:20: error: 'b' was not declared in this scope
   11 |   std::cin >> a >> b;
      |                    ^
a.cc:18:10: error: 'chk' was not declared in this scope
   18 |       if(chk(c)){
      |          ^~~
Language: C++

#include<iostream>
#include<math.h>
using namespace std;

bool isPrime(int num){
  double sqrtNum = sqrt(num);
  for (int i = 3; i <= sqrtNum; i += 2){
    if (num % i == 0) return false;
  }
  return true;
}

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

  int st[1000000];
  st[0]=2;
  int j=1;
  double sqP = sqrt(P);
  for(int k=3; k<sqP; k=k+2){
    if(isPrime(k)){
      st[j]=k;
      j++;
    }
  }

  int ans=1, n=0, int PP;
  if(P==1){
    ans = 1;
  }else if(N==1){
    ans = P;
  }else{
    for(int i=0; i<j; i++){
      if(P==1) break;
      if(P%st[i]==0){
        PP=P;
        n=0;
        while(P%st[i]==0){
          n++;
          P /= st[i];
        }
        if(n>=N) ans *= pow(st[i], n/N);
      }
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:19: error: expected unqualified-id before 'int'
   29 |   int ans=1, n=0, int PP;
      |                   ^~~
a.cc:38:9: error: 'PP' was not declared in this scope; did you mean 'P'?
   38 |         PP=P;
      |         ^~
      |         P
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define ALL(A) A.begin(),A.end()
#define RALL(A) A.rbegin(),A.rend()
typedef long LL;
typedef pair<LL,LL> P;
const LL mod=1e9+7;
const LL LINF=1LL<<62;
const int INF=10000000;

vector<LL> pdivi(LL K){
    vector<LL> v;
    for(LL i=2;i*i<=K;i++){
        if(K%i) continue;
        v.pb(i);
        while(K%i==0){
            K/=i;
        }
    }
    if(K!=1) v.pb(K);
    return v;
}



int main(){
    LL N,P;cin >> N >> P;
     t=pdivi(P);
    LL ans=1;
    for(int i=0;i<t.size();i++){
        int k=0;
        while(P%t[i]==0){
            P/=t[i];
            k++;
        }
        for(int j=0;j<k/N;j++) ans*=t[i];
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:6: error: 't' was not declared in this scope
   33 |      t=pdivi(P);
      |      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll MOD = 1e9 + 7;

int main(){
  ll n, pp;
  cin >> n >> pp;
  map<ll, int> mp;
  for (ll i = 2; i <= 1e6; i++) {
    while (pp % i == 0) {
      pp /= i;
      mp[i]++;
      if (pp == 1LL) break;
    }
    if (pp == 1LL) break;
  }
  if (pp != 1LL) mp[p]++;
  ll ans = 1LL;
  for (auto p: mp) {
    if (p.second >= n) {
      for (int i = 0; i < p.second / n; i++) {
        ans *= p.first;
      }
    }
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:21: error: 'p' was not declared in this scope; did you mean 'mp'?
   18 |   if (pp != 1LL) mp[p]++;
      |                     ^
      |                     mp
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll MOD = 1e9 + 7;

int main(){
  ll n, pp;
  cin >> n >> p0;
  map<ll, int> mp;
  for (ll i = 2; i <= 1e6; i++) {
    while (pp % i == 0) {
      pp /= i;
      mp[i]++;
    }
    if (pp == 0) break;
  }
  ll ans = 1LL;
  for (auto p: mp) {
    if (p.second >= n) {
      for (int i = 0; i < p.second / n; i++) {
        ans *= p.first;
      }
    }
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: 'p0' was not declared in this scope; did you mean 'pp'?
    8 |   cin >> n >> p0;
      |               ^~
      |               pp
Language: C++

#include <bits/stdc++.h>
typedef long long ll;
typedef long double ld;
const int INF=1e9,MOD=1e9+7,ohara=1e6;
const ll LINF=1e18;
using namespace std;

#define rep(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define rrep(i,a,b) for(int i=(a);i<(b);i++)
#define rrrep(i,a,b) for(int i=(a);i>=(b);i--)
#define all(v) (v).begin(), (v).end()
#define Size(n) (n).size()
#define Cout(x) cout<<(x)<<endl

ll n,cnt,ans,a,b,c,d,tmp,tmpp,m,h,w,x,y,sum,pos,k;
ld doua;
int dy[]={1,0,-1,0};
int dx[]={0,1,0,-1};
//int dy[]={-1,0,1,-1,1,-1,0,1};
//int dx[]={-1,-1,-1,0,0,1,1,1};
string alph("abcdefghijklmnopqrstuvwxyz"),s;
bool fl;
struct edge{int to,cost;};

//-------------------------↓↓↓↓↓↓------------------------

int main(void){
       cin.tie(0);
    ios::sync_with_stdio(false);
      
    cin>>n>>p;
    a=pow(p,1.0/(ld)n);
    for(ll i=a;i>=ans;i--){
        b=pow(i,n-1);
        c=__gcd(i,p/b);
        if(c>=ans&&p%b==0){
            ans=c;
        }
    }
    Cout(ans);
    return 0;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:13: error: 'p' was not declared in this scope
   31 |     cin>>n>>p;
      |             ^
Language: C++

#include <iostream>

using namespace std;

int main(){
   long long n, p;
   cin >> n >> p;
   if(n==1){
      cout << p << endl;
      return;
   }

   long long ans = 1;
   for(long i =2;p>1;i++){
      if(p%i==0){
         long long count = 0;
         while(p%i == 0){p/=i;count++;}
         if(count >= n){
            ans *= i;
         }
      }
   }

   cout << ans << endl;
}

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

#include<cstdio>
#include<cmath>
#include<cstring>
#include<algorithm>
#include <numeric>
using namespace std;

long long int main()
{	
	long long int N;
	long long int P;
	scanf("%lld %lld", &N, &P);

	long long int soin[1000000][2];
	for(long long int i=0;i<1000000;i++){
		soin[i][0]=0;
		soin[i][1]=0;
	}
	long long int p=2;
	long long int counter=0;
	while(p<=1000000){
		if(P%p==0)
		{	
			P=P/p;
			soin[counter][0]=p;
			soin[counter][1]++;
		}
		else
		{
			if(soin[counter][0]!=0){counter++;}
			p++;
		}
	}
	long long int ans=1;
	for(long long int i=0;i<1000000;i++){
		if(soin[i][0]!=0)
		{
			if((soin[i][1])/N!=0)
			{
				for(long long int j=0;j<(soin[i][1])/N;j++)
				{
					ans=ans*soin[i][0];
					}
			};
		}
	}
	printf("%lld", ans);
}


Compiler output:
a.cc:8:11: error: '::main' must return 'int'
    8 | long long int main()
      |           ^~~
Language: C

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

typedef long long int int64;

#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))
#define ABS(a) ((a)>(0)?(a):-(a))

void run(void){
  int n;
  scanf("%d",&n);
  int64 *a=(int64 *)calloc(n,sizeof(int64));
  int i;
  for(i=0;i<n;i++) scanf("%lld",a+i);
  int64 *dp=(int64 *)calloc(n,sizeof(int64));
  int *next=(int *)calloc(n,sizeof(int));
  dp[n-1]=0;
  next[n-1]=n;
  for(i=n-2;i>=0;i--){
    dp[i]=dp[i+1];
    next[i]=next[i+1];
    if(a[i]<=a[i+1]){
      if(a[i]*4LL<=a[i+1]){
	next[i]=i+1;
      }
      continue;
    }
    int cnt=0;
    int p;
    for(p=i+1;p<n;p=next[p]){
      while(cnt--){
	a[p-1]*=4;
      }
      if(a[p-1]<=a[p]){
	break;
      }
      cnt=0;
      double t=a[p];
      while(prev>t){
	t*=4;
	cnt++;
      }
      dp[i]+=2LL*cnt*(next[p]-p);
    }
    next[i]=p;
  }
  for(i=0;i<n-1-i;i++){
    int swap=a[i];
    a[i]=a[n-1-i];
    a[n-1-i]=swap;
  }
  int64 *dp2=(int64 *)calloc(n,sizeof(int64));
  dp2[n-1]=1;
  next[n-1]=n;
  for(i=n-2;i>=0;i--){
    dp2[i]=dp2[i+1]+1;
    next[i]=next[i+1];
    if(a[i]<=a[i+1]){
      if(a[i]*4LL<=a[i+1]){
	next[i]=i+1;
      }
      continue;
    }
    int cnt=0;
    int p;
    for(p=i+1;p<n;p=next[p]){
      double prev=a[p-1]*pow(4,cnt);
      if(prev<=a[p]){
	break;
      }
      cnt=0;
      double t=a[p];
      while(prev>t){
	t*=4;
	cnt++;
      }
      dp2[i]+=2LL*cnt*(next[p]-p);
    }
    next[i]=p;
  }
  int64 min=dp[0];
  for(i=1;i<n;i++){
    int64 x=dp[i]+dp2[n-i];
    if(x<min) min=x;
  }
  printf("%lld\n",min);
}

void naive(void){
  int n;
  scanf("%d",&n);
  int *a=(int *)calloc(n,sizeof(int));
  int i;
  for(i=0;i<n;i++) scanf("%d",a+i);
  int64 min=10000000000000;
  int64 *b=(int64 *)calloc(n,sizeof(int64));
  for(i=0;i<n;i++){
    int64 cnt=0;
    b[i]=a[i];
    int j;
    for(j=i+1;j<n;j++){
      b[j]=a[j];
      while(b[j]<b[j-1]){
	b[j]*=4;
	cnt+=2;
      }
    }
    if(i>0){
      b[i-1]=-2*a[i-1];
      cnt++;
      for(j=i-2;j>=0;j--){
	b[j]=-2*a[j];
	while(b[j]>b[j+1]){
	  b[j]*=4;
	  cnt+=2;
	}
      }
    }
    if(cnt<min) min=cnt;
  }
  printf("%lld\n",min);
}

int main(void){
  naive();
  return 0;
}


Compiler output:
main.c: In function 'run':
main.c:41:13: error: 'prev' undeclared (first use in this function)
   41 |       while(prev>t){
      |             ^~~~
main.c:41:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
using namespace std;
#define REP(i,m,n) for(int i=(int)m ; i < (int) n ; ++i )
#define rep(i,n) REP(i,0,n)
typedef long long ll;
typedef pair<int,int> pint;
typedef pair<ll,int> pli;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;
const ll mod=1e9+7 ;

int main(){
    ll n;
    cin>>n;
    ll p;
    cin>>p;
    if(n==1){
        cout<<p<<endl;
        return 0;
    }
    ll ret=1;
    rep(i,10000000){
        int cnt=0;
        if(i<2)continue;
        while(p%i==0){
            p/=i;
            cnt++;
        }
        if(cnt>=n){
            cnt/=n;
            ret*=pow(i,cnt);
    }
    cout<<ret<<endl;
    return 0;
}


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

#include<iostream>
#include<string>
#include<algorithm>
#include<cmath>
#include<vector>
#include<map>
#include<set>
#include<queue>
#include<stack>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<n;i++)
#define INF 1000000000
int n;
ll p;
ll ans = 1;
map<ll, int>mp;
ll modpow(ll a, int b) {
	if (!b)return 1;
	if (b % 2)return modpow(a, b - 1)*a;
	return modpow(a, b / 2)*modpow(a, b / 2);
}
int main() {
	cin >> n >> p;
	if (n == 1) {
		cout << p << endl;
		return 0;
	}
  if(n>=65){
cout<<1<<endl;
    return 0;
  }
  for(int i=2;i<=1000000;i++){
    ll cnt=1;
    int cn=0;
    while(p%i==0){
      if(4000000000000000000<cnt)break;
      cnt*=i;
      cn++;
    }
    ans=max(ans,cn/n);
  }
	cout << ans << endl;
	getchar();getchar();
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:41:12: error: no matching function for call to 'max(ll&, int)'
   41 |     ans=max(ans,cn/n);
      |         ~~~^~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/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:41:12: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   41 |     ans=max(ans,cn/n);
      |         ~~~^~~~~~~~~~
/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:3:
/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:41:12: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   41 |     ans=max(ans,cn/n);
      |         ~~~^~~~~~~~~~
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<cmath>
#include<vector>
#include<map>
#include<set>
#include<queue>
#include<stack>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<n;i++)
#define INF 1000000000
int n;
ll p;
ll ans = 1;
map<ll, int>mp;
ll modpow(ll a, int b) {
	if (!b)return 1;
	if (b % 2)return modpow(a, b - 1)*a;
	return modpow(a, b / 2)*modpow(a, b / 2);
}
int main() {
	cin >> n >> p;
	if (n == 1) {
		cout << p << endl;
		return 0;
	}
  if(n>=65){
cout<<1<<endl;
    return 0;
  }
  for(int i=2;i<=1000000;i++){
    int cnt=1;
    int cn=0;
    while(p%i==0){
      if(4000000000000000000>cnt)break;
      cnt*=i;
      cn++;
    }
    ans=max(ans,cn/n);
  }
	cout << ans << endl;
	getchar();getchar();
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:41:12: error: no matching function for call to 'max(ll&, int)'
   41 |     ans=max(ans,cn/n);
      |         ~~~^~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/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:41:12: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   41 |     ans=max(ans,cn/n);
      |         ~~~^~~~~~~~~~
/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:3:
/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:41:12: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   41 |     ans=max(ans,cn/n);
      |         ~~~^~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    int cot=0;
    while(~scanf("%d",&n))
    {
        cot++;
        if(cot==2||cot>13) pritnf("second\n");
        else printf("first\n");
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:28: error: 'pritnf' was not declared in this scope; did you mean 'printf'?
   10 |         if(cot==2||cot>13) pritnf("second\n");
      |                            ^~~~~~
      |                            printf
Language: C++

#pragma GCC optimize "-O3"
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
const int lmax=1999999999;
const long long lmx=1999999999999999999;
ll Nn,N,P;
ll ans=1LL;
ll lp[10000004];
int main(){std::ios::sync_with_stdio(false);
cin>>Nn>>P;
if(Nn==1LL){
	cout<<P<<endl;
	return 0;
}
N=sqrt(P)+4LL;
for (ll i=2; i<=N; ++i) {
    if (lp[i] == 0) {
        lp[i] = i;
        ll k=0;
		while(P%i==0){
			P/=i;
			k++;
		}
		if(k>=Nn){
			ans*=i;
		}
    }
    for (ll j=0; j<(ll)pr.size() && pr[j]<=lp[i] && i*pr[j]<=N; ++j)
        lp[i * pr[j]] = pr[j];
}
cout<<ans<<endl;
}
/*

                   *         *
                  * *       * *
                 *   *     *   *
                *     *   *     *
               *       * *       *
               *        *        *
                *               *
                 *             *
                  *           *
                   *         *
                    *       *
                     *     *
                      *   *
                       * *
                        *



*/





Compiler output:
a.cc: In function 'int main()':
a.cc:29:24: error: 'pr' was not declared in this scope
   29 |     for (ll j=0; j<(ll)pr.size() && pr[j]<=lp[i] && i*pr[j]<=N; ++j)
      |                        ^~
Language: C++

// C.

#include <iostream>
#include <sstream>
#include <vector>

using namespace std;

typedef long long LL;

int main(int argc, char *argv[]) {
	LL n, p, ans = 1;
	cin >> n >> p;
	if (n == 1) {
		ans = p;
	} else if (n >= 64) {
		;
	} else if (n >= 4) {
		LL sq = (LL)sqrt(p);
		LL m = (LL)sqrt(sq);
		for (LL a = m; a > 1; --a) {
			LL x = 1;
			for (LL b = 0; b < n; ++b) {
				x *= a;
				if (x > p) {
					break;
				}
			}
			if (p >= x && (p % x) == 0) {
				ans = a;
				break;
			}
		}
	} else {
		LL sq = (LL)sqrt(p);
		for (LL a = sq; a > 1; --a) {
			LL x = 1;
			for (LL b = 0; b < n; ++b) {
				x *= a;
				if (x > p) {
					break;
				}
			}
			if (p >= x && (p % x) == 0) {
				ans = a;
				break;
			}
		}
	}
	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:19:29: error: 'sqrt' was not declared in this scope; did you mean 'sq'?
   19 |                 LL sq = (LL)sqrt(p);
      |                             ^~~~
      |                             sq
a.cc:35:29: error: 'sqrt' was not declared in this scope; did you mean 'sq'?
   35 |                 LL sq = (LL)sqrt(p);
      |                             ^~~~
      |                             sq
Language: C++

#include<bits/stdc++.h>

#define INF 1e9
#define llINF 1e18
#define MOD 1000000007
#define pb push_back
#define mp make_pair 
#define F first
#define S second
#define ll long long
#define ALL(a) (a).begin(),(a).end()
#define Yes(hoge) cout<<((hoge)?"Yes":"No")<<endl;
#define YES(hoge) cout<<((hoge)?"YES":"NO")<<endl;
typedef struct aaaaa{
  int x,y,t;
}Grid;
using namespace std;
int main(){
  ll n,p;
  cin>>n>>p;
  vector<pair<ll,ll> >prime;
  prime.pb(mp(2,0));
  for(ll i=3;i<=sqrt((ll)1000000000000);i+=2){
    bool flag=true;
    for(ll j=2;j<=sqrt(i);j++){
      if(i%j==0){flag=false;break;}
    }
    if(flag)prime.pb(mp(i,0));
  }
  ll pp=p;
  ll cnt=0;
  while(pp>1){
    while(pp%prime[cnt].F==0){
      prime[cnt].S++;
      pp/=prime[cnt].F;
    }
    cnt++;
    if(cnt==prime.size())break;
  }
  ll ans=1;
  if(pp>1&&pp%n==0){ans*=pp/n};
  for(int i=0;i<prime.size();i++){
    if(prime[i].F*(prime[i].S/n)!=0)
      ans*=prime[i].F*(prime[i].S/n);
  }
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:30: error: expected ';' before '}' token
   41 |   if(pp>1&&pp%n==0){ans*=pp/n};
      |                              ^
      |                              ;
Language: C++

//#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
//#include<cstdio>//"scanf("%lf",&(double));printf("%f",(double));"
//#include<iomanip>//"cout<<fixed<<setprecision(n)<<sth<<endl;"
//#include<string>//"reverse(s's it,s's it)"
//#include<functional>//"greater<T>" "sort(a,a+n,greater<int>());""
//#include<cmath>//"abs" "sqrt"
//#include<numeric>//"accumulate(inputit,inputit,init,(optional) object)"
//#include<algorithm>//"lower_bound(it,it,v)" "next_permutation(a,a+n)"
//"reverse(v's it,v's it)"(v: vector)
//#include<cassert>//"assert(cond);": error if cond doesn't hold.
using namespace std;
#define pb push_back//also for STRING
#define fi first
#define sc second
#define mp make_pair
#define is insert//also use as v.is(v's it,w's it,w's it);//Be careful in topcoder
#define ps push//stack,(priority) queue,//Be careful in topcoder.
#define fr front//queue//for priority, use top().//Be careful in topcoder.
typedef long long ll;//not necessarily//Be careful in topcoder.
typedef pair<int,int> pii;//Be careful in topcoder.

set<int> nonprime;
void sieve(){
    int n = 1000000;
    nonprime.is(0);
    nonprime.is(1);
	int m=sqrt(n);
	for(int i=2;i<=m;++i) if(nonprime.find(i)==nonprime.end()){
		for(int j=i*i;j<=n;j+=i) nonprime.is(j);
	}
	return;
}

long long pow(long long x,long long n){
	long long ret=1;
	for(;n>0;x=(x*x)%M,n>>=1) if(n&1) ret=ret*x;
	return ret;
}

int main(){
    ll n,p,ans = 1;
    cin>>n>>p;
    for(int i = 2;i<=1000000;++i) if(nonprime.find(i)==nonprime.end()){
        int cnt = 0;
        while(p%i == 0){
            p/=i;
            ++cnt;
        }
        ans *= pow(i,cnt/n);
    }
    printf("%lld\n",ans);
}


Compiler output:
a.cc: In function 'long long int pow(long long int, long long int)':
a.cc:37:26: error: 'M' was not declared in this scope
   37 |         for(;n>0;x=(x*x)%M,n>>=1) if(n&1) ret=ret*x;
      |                          ^
Language: C++

//#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
//#include<cstdio>//"scanf("%lf",&(double));printf("%f",(double));"
//#include<iomanip>//"cout<<fixed<<setprecision(n)<<sth<<endl;"
//#include<string>//"reverse(s's it,s's it)"
//#include<functional>//"greater<T>" "sort(a,a+n,greater<int>());""
//#include<cmath>//"abs" "sqrt"
//#include<numeric>//"accumulate(inputit,inputit,init,(optional) object)"
//#include<algorithm>//"lower_bound(it,it,v)" "next_permutation(a,a+n)"
//"reverse(v's it,v's it)"(v: vector)
//#include<cassert>//"assert(cond);": error if cond doesn't hold.
using namespace std;
#define pb push_back//also for STRING
#define fi first
#define sc second
#define mp make_pair
#define is insert//also use as v.is(v's it,w's it,w's it);//Be careful in topcoder
#define ps push//stack,(priority) queue,//Be careful in topcoder.
#define fr front//queue//for priority, use top().//Be careful in topcoder.
typedef long long ll;//not necessarily//Be careful in topcoder.
typedef pair<int,int> pii;//Be careful in topcoder.
//Add other types in the same way.
ll mod(ll a){	return (a + M) % M;	}//M can be a variable
void plmod(ll &a,ll b){	a = (a + b + M) % M;	return;	}
void mnmod(ll &a,ll b){	a = (a - b + M) % M;	return;	}
void mlmod(ll &a,ll b){	a = (a * b) % M;  	return;	}
//Caution! you may need sth larger than "+M"!
void chmax(int &a,int b){	a = max(a, b);	return;	}
void chmin(int &a,int b){	a = min(a, b);	return;	}
//These 2 could be better in long long

set<int> nonprime;
void sieve(){
    int n = 1000000;
    nonprime.is(0);
    nonprime.is(1);
	int m=sqrt(n);
	for(int i=2;i<=m;++i) if(nonprime.find(i)==nonprime.end()){
		for(int j=i*i;j<=n;j+=i) nonprime.is(j);
	}
	return;
}

long long pow(long long x,long long n){
	long long ret=1;
	for(;n>0;x=(x*x)%M,n>>=1) if(n&1) ret=ret*x;
	return ret;
}

int main(){
    ll n,p,ans = 1;
    cin>>n>>p;
    for(int i = 2;i<=1000000;++i) if(nonprime.find(i)==nonprime.end()){
        int cnt = 0;
        while(p%i == 0){
            p/=i;
            ++cnt;
        }
        ans *= pow(i,cnt/n);
    }
    printf("%lld\n",ans);
}


Compiler output:
a.cc: In function 'll mod(ll)':
a.cc:23:29: error: 'M' was not declared in this scope
   23 | ll mod(ll a){   return (a + M) % M;     }//M can be a variable
      |                             ^
a.cc: In function 'void plmod(ll&, ll)':
a.cc:24:38: error: 'M' was not declared in this scope
   24 | void plmod(ll &a,ll b){ a = (a + b + M) % M;    return; }
      |                                      ^
a.cc: In function 'void mnmod(ll&, ll)':
a.cc:25:38: error: 'M' was not declared in this scope
   25 | void mnmod(ll &a,ll b){ a = (a - b + M) % M;    return; }
      |                                      ^
a.cc: In function 'void mlmod(ll&, ll)':
a.cc:26:39: error: 'M' was not declared in this scope
   26 | void mlmod(ll &a,ll b){ a = (a * b) % M;        return; }
      |                                       ^
a.cc: In function 'long long int pow(long long int, long long int)':
a.cc:46:26: error: 'M' was not declared in this scope
   46 |         for(;n>0;x=(x*x)%M,n>>=1) if(n&1) ret=ret*x;
      |                          ^
Language: C++

using System;
using System.Linq;

namespace CADDi2018C
{
    internal class Program
    {
        public static void Main(string[] args)
        {
            long[] inp = Console.ReadLine().Split(' ').Select(a => long.Parse(a)).ToArray();
            long N = inp[0];
            long P = inp[1];

            if (N == 1)
            {
                Console.WriteLine(P);
                return;
            }

            long Max = Convert.ToInt64(Math.Pow(P, 1.0 / N));
            long ans = 1;
            for (int i = 2; i <= Max; i++)
            {
                if (P % i == 0)
                {
                    if (P % Convert.ToInt64(Math.Pow(i, N)) == 0)
                    {
                        ans = i;
                    }
                }
            }
            Console.WriteLine(ans);
        }
    }
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Linq;
      |       ^~~~~~
a.cc:6:5: error: 'internal' does not name a type
    6 |     internal class Program
      |     ^~~~~~~~