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

#include<iostream>
#include<cmath>
#include<numeric>
#include<functional>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
#include<iomanip>
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<n;i++)
#define ll long long
#define modbig (10*10*10*10*10*10*10*10*10+7)
using namespace std;

int main(){
  ll n,p,q,ans=1;
  cin>>n>>p; q=p;
  map<ll,ll> mp;
  for(ll i=2; i<=sqrt(q); i++){
    if(p%i==0){
      p/=i;
      mp[i]++;
      i-=1;
    }
    if(p==1){
      break;
    }
  }
  mp[p]++;
  for(auto x: mp){
    for(int j=1,j<=x.second/n;j++){
      ans*=x.first;
    }
  }
  cout<<ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:18: error: expected ';' before '<=' token
   32 |     for(int j=1,j<=x.second/n;j++){
      |                  ^~
      |                  ;
a.cc:32:18: error: expected primary-expression before '<=' token
   32 |     for(int j=1,j<=x.second/n;j++){
      |                  ^~
Language: C++

#include<iostream>
#include<cmath>
#include<numeric>
#include<functional>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
#include<iomanip>
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<n;i++)
#define ll long long
#define modbig (10*10*10*10*10*10*10*10*10+7)
using namespace std;

int main(){
  ll n,p,q,ans=1;
  cin>>n>>p; q=p;
  map<ll,ll> mp;
  for(ll i=2; i<=sqrt(q); i++){
    if(p%i==0){
      p/=i;
      mp[i]++;
      i-=1;
    }
    if(p==1){
      break;
    }
  }
  mp[p]++;
  for(auto x: mp){
    for(int j=1,j<=(x.second/n);j++){
      ans*=x.first;
    }
  }
  cout<<ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:18: error: expected ';' before '<=' token
   32 |     for(int j=1,j<=(x.second/n);j++){
      |                  ^~
      |                  ;
a.cc:32:18: error: expected primary-expression before '<=' token
   32 |     for(int j=1,j<=(x.second/n);j++){
      |                  ^~
Language: C++

#define _LIBCPP_DEBUG 0
#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=int(a);i<int(b);i++)
typedef vector<int> vi;
typedef long long ll;

bool ispri[1000010];

void eratos(ll n){
    rep(i,0,floor(sqrt(n)))ispri[i]=1;
    ispri[0]=0;ispri[1]=0;
    rep(i,2,floor(sqrt(n))){
        ll j=2*i;
        while(j<=floor(sqrt(n))){
            ispri[j]=0;
            j+=i;
        }
    }
}

int main(){
    ll N,P,an=1,cn;cin>>N>>P;
    if(N==1){
        cout<<P<<endl;
        return 0;
    }
    eratos(P);
    rep(j,0,3){
    rep(i,2,floor(sqrt(P))){
        cn=0;
        if(ispri[i]){
            while(P!=1&&P%i==0){
                P=P/i;
                cn++;
            }
        }
        an=an*pow(i,(ll)(cn/N));
    }
    cout<<an<<endl;
}






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

#include<bits/stdc++.h>
#include<unordered_set>
#include<unordered_map>
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
#define ll long long
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define FORR(i,a,b)for(ll i=(a);i<=(b);i++)
#define repR(i,n) for(ll i=n;i>=0;i--)
#define all(v)(v).begin(),(v).end()
#define rall(v)(v).rbegin(),(v).rend()
#define F first
#define S second
#define pb push_back
#define pu push
#define COUT(x) cout<<(x)<<endl
#define PQ priority_queue<ll>
#define PQR priority_queue<ll,vector<ll>,greater<ll>>
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define mp make_pair
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
#define sz(x) (int)(x).size()
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const ll MOD = 1000000007LL;
const ll INF = 1LL << 60;
using vll = vector<ll>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vvll = vector<vll>;
using vstr = vector<string>;
using pll = pair<ll, ll>;
using vc = vector<char>;
using vvc = vector<vc>;
ll dx[4]={0,1,0,-1};
ll dy[4]={1,0,-1,0};
ll p;
map<ll,ll> insuu;
void prime_factor(ll p){
    ll k=p;
	for(int i=2;i*i<=p;i++){
	    while(k%i==0){
	        insuu[i]++;
	        k/=i;
	    }
	}
	if(k!=1) insuu[k]=1;
	return 0;
}
int main(){
  ll n;
  cin>>n>>p;
  ll ans=1;
  prime_factor(p);
  for(auto p:insuu){
    for(int i=0;i<p.S/n;i++){
      ans*=p.F;
    }
  }
  COUT(ans);
}

Compiler output:
a.cc: In function 'void prime_factor(long long int)':
a.cc:53:16: error: return-statement with a value, in function returning 'void' [-fpermissive]
   53 |         return 0;
      |                ^
Language: C++

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

int main()
{
  int64_t N, P, p, tmp, res = 1;
  cin >> N >> P;
  if (N == 1)
  {
    cout << P << endl;
    return 0;
  }
  vector<pair<int, int>> D(0);
  p = P;
  for (int i = 2; i <= sqrt(P); i++)
  {
    if (p == 1)
      break;
    if (p % i == 0)
      if (D.size() > 0 && D.at(D.size() - 1).first == i)
      {
        D.at(D.size() - 1).second++;
      }
      else
      {
        D.push_back(make_pair(i, 1));
      }
    p /= i;
    i--;
  }
}
for (int i = 0; i < D.size(); i++)
{
  tmp = pow(D.at(i).first, (D.at(i).second / N));
  if (tmp != 0)
    res *= tmp;
}
cout << res << endl;
}

Compiler output:
a.cc:32:1: error: expected unqualified-id before 'for'
   32 | for (int i = 0; i < D.size(); i++)
      | ^~~
a.cc:32:17: error: 'i' does not name a type
   32 | for (int i = 0; i < D.size(); i++)
      |                 ^
a.cc:32:31: error: 'i' does not name a type
   32 | for (int i = 0; i < D.size(); i++)
      |                               ^
a.cc:38:1: error: 'cout' does not name a type
   38 | cout << res << endl;
      | ^~~~
a.cc:39:1: error: expected declaration before '}' token
   39 | }
      | ^
Language: C++

package main

import "fmt"

func main() {
	var n, p int
	fmt.Scan(&n, &p)

	m := make(map[int]int)
	t := p
	for i := 2; i*i <= p; i++ {
		for t%i == 0 {
			m[i]++
			t /= i
		}
	}
	if t != 1 {
		m[t] = 1
	}

	ans := 1
	for k, v := range m {
		for i := 0; i < v/n; i++ {
			ans *= k
		}
	}

	fmt.Println(ans)
}


Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <functional>
#include <queue>
#include <string>
#include <cstring>
#include <numeric>
#include <cstdlib>
#include <cmath>
#include <map>
#include <unordered_map>
#include <unordered_set>
using namespace std;
 
typedef long long ll;
 
using vi = vector<int>;
using vii = vector<vi>;
using vl = vector<ll>;
using vll = vector<vl>;

#define INF 10e17
#define rep(i,n) for(long long i=0; i<n; i++)
#define repr(i,n,m) for(long long i=m; i<n; i++)
#define END cout << endl
#define MOD 1000000007
#define pb push_back
#define sorti(x) sort(x.begin(), x.end())
#define sortd(x) sort(x.begin(), x.end(), std::greater<long long>())
#define debug(x) std::cerr << (x) << std::endl;
#define roll(x) for (auto&& itr : x) { debug(itr); }
 
template <class T> inline void chmax(T &ans, T t) { if (t > ans) ans = t;}
template <class T> inline void chmin(T &ans, T t) { if (t < ans) ans = t;}

template<typename T>
map<T, int> factorize(T x){
  map<T, ll> res;
  for(int i=2;i*i<=x;i++){
    while(x%i==0){
      x/=i;
      res[i]++;
    }
  }
  if(x!=1) res[x]++;
  return res;
}
 
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);

  ll n, p;
  cin >> n >> p;

  auto fac = factorize(p);
  ll ans = 1;
  for (auto itr : fac) {
    ans *= (itr.second >= n) ? itr.first : 1;
  }

  cout << ans << endl;
}

Compiler output:
a.cc: In instantiation of 'std::map<T, int> factorize(T) [with T = long long int]':
a.cc:58:23:   required from here
   58 |   auto fac = factorize(p);
      |              ~~~~~~~~~^~~
a.cc:48:10: error: could not convert 'res' from 'map<[...],long long int,[...],allocator<pair<[...],long long int>>>' to 'map<[...],int,[...],allocator<pair<[...],int>>>'
   48 |   return res;
      |          ^~~
      |          |
      |          map<[...],long long int,[...],allocator<pair<[...],long long int>>>
Language: C++

include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#define rep(i,n) for(int i=0;i<n;i++)
const long long MOD = 1000000007;
const long long INF = MOD*MOD;
typedef pair<int,int> P;
typedef long long ll;
ll n,m,k, ans;
string s;


int main(){
  cin >> n;
  ans = 0;
  int l = 0;
  rep(i,n){
    int ai; cin  >> ai;
    l = max(ai, l);
    ans += ai;
  }
  if(ans % 2 || l == 1) cout << "first\n";
  else cout << "second\n";
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc:7:9: error: 'pair' does not name a type
    7 | typedef pair<int,int> P;
      |         ^~~~
a.cc:10:1: error: 'string' does not name a type
   10 | string s;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:14:3: error: 'cin' was not declared in this scope
   14 |   cin >> n;
      |   ^~~
a.cc:19:9: error: 'max' was not declared in this scope
   19 |     l = max(ai, l);
      |         ^~~
a.cc:22:25: error: 'cout' was not declared in this scope
   22 |   if(ans % 2 || l == 1) cout << "first\n";
      |                         ^~~~
a.cc:23:8: error: 'cout' was not declared in this scope
   23 |   else cout << "second\n";
      |        ^~~~
Language: C++

require 'prime'
n, q = gets.split.map(&:to_i)
ans = 1
q.prime_division.each{|a| (a[1] / n).times do ans *= a[0] end}
puts ans

Compiler output:
a.cc:1:9: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    1 | require 'prime'
      |         ^~~~~~~
a.cc:1:1: error: 'require' does not name a type
    1 | require 'prime'
      | ^~~~~~~
a.cc:5:1: error: 'puts' does not name a type
    5 | puts ans
      | ^~~~
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(ll i = 0; i < (ll)n; i++)
#define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF (1ll << 60)
#define sz(x) int(x.size())
using namespace std;
typedef long long ll;
using vl = vector<ll>;
using vvl = vector<vl>;
typedef double db;
typedef string str;
typedef pair<ll, ll> p;
constexpr int MOD = 1000000007;
using ll = long long;
template <class T> inline bool chmin(T &a, T b) {
    if(a > b) {
        a = b;
        return true;
    }
    return false;
}
template <class T> inline bool chmax(T &a, T b) {
    if(a < b) {
        a = b;
        return true;
    }
    return false;
}

void print(const std::vector<int> &v) {
    std::for_each(v.begin(), v.end(), [](int x) { std::cout << x << " "; });
    std::cout << std::endl;
}
vector<pair<long long, long long>> prime_factorize(long long n) {
    vector<pair<long long, long long>> res;
    for(long long p = 2; p * p <= n; ++p) {
        if(n % p != 0)
            continue; //因数じゃない
        int num = 0;
        while(n % p == 0) {
            ++num;
            n /= p;
        }
        res.push_back(make_pair(p, num));
    }
    if(n != 1)
        res.push_back(make_pair(n, 1)); // nが素数だった場合
    return res;
}

int main() {
    ll N;
    ll P;
    auto p = prime_factorize(P);
    ll ans = 1;
    for(auto cur : p) {
        /* code */
        if(cur.second > N) {
            ans *= cur.first * (cur.second / N)
        }
    }
    cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:60:48: error: expected ';' before '}' token
   60 |             ans *= cur.first * (cur.second / N)
      |                                                ^
      |                                                ;
   61 |         }
      |         ~
Language: C++

#include <iostream>
#include <string>
//#include <math.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < n; ++i)
typedef long long ll;


ll pow(ll a,ll n){
ll ret=1;
for(;n>0;n>>=1,a=a*a){
if(n%2==1)ret=ret*a
}
return ret;
}


int main()
{
	ll n ,p;cin >> n >> p;
	int ans;
	//cout<<pow(4 ,2)<<endl;

	if(n==1)
	{
		cout<<p<<endl;
		return 0;
	}
	/*
	if(n>p){
		cout<<1<<endl;
		return 0;
	}
	*/
	//rep(i,100)cout<<pow(i,2)<<endl;
	/*if(n==2)
	{
		for(int i=1;i*i<p;++i)if(p%(i*i)==0)ans=i;
		cout<<ans<<endl;
		return 0;

	}
	*/
//cout<<pow(2,2)<<endl;
	for(int i=1;p>=pow(i,n);i+=ans)
	{
		//cout<<pow(i,n)<<endl;
		if( ! ( p%pow(i,n) )  )
		{
			ans=i;
			i=ans;
		}
	
	//cout << i<<endl;
	}
	//cout<<pow(2,3)<<endl;
	cout<<ans<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'll pow(ll, ll)':
a.cc:12:20: error: expected ';' before '}' token
   12 | if(n%2==1)ret=ret*a
      |                    ^
      |                    ;
   13 | }
      | ~
Language: C++

//### In The Name Of GOD ###

//%% Remember; (((He))) is The (((Accepter))) %%

// GOD IS GREATER ...

#include <bits/stdc++.h>

using namespace std;

typedef long long ll ;
typedef long double ld ;

//#define int ll
#define pb push_back
#define bp pop_back
#define pf push_front
#define fp pop_front
#define X first
#define Y second
#define IO ios_base::sync_with_stdio(false);
#define sz(a) (int)(a.size())
#define sg(a, b) (a + b - 1) /b

const int MOD = 1000 * 1000 * 1000 + 7;
const int INF = 1 * 1000 * 1000 * 1000 + 200;
const int MAXN = 10  * 1000 * 1000 + 10;
const int MLOG = 30;
const int NMAX = 20;

signed main() {
	ll N, P;
	cin >> N >> P;
	if(n == 1) {
		cout << P;
		return 0;
	}
	map <int, int> mp;
	for(int i  = 2; i < MAXN; i++) {
		while(P % i == 0)
			P /= i, mp[i]++;
	}
	int ans = 1;
	for(auto v : mp) {
		v.Y /= N;
		for(int i = 0; i < v.Y; i++) ans *= v.X;
	}
	cout << ans;
}



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

#include <bits/stdc++.h>
#include <cmath>
#include <numeric>
using namespace std;
#define rep(i,a,b) for(int i=(a); i<(b); ++i) // a ≦ i < b 
#define Rrep(i,a,b) for(int i=(a);i>=(b);--i) // reverse repeat. a から b まで減少．
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend() //逆イテレータ
#define RANGE(a,b,c) (a).begin()+b,(a).begin()+c // コンテナ a の 要素 b から c へのイテレータ
#define MOD 1000000007ll
#define INF 1000000000
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef vector<PII> VP;

// まずは全探索，次にDP
// 偶奇，逆から，ソート，出現回数，DP
// 存在判定：構成方法，入力の特徴
// 例外を十分に含む一般化．想像力の限界
// 場合分け
int main() {
cin.tie(0);
ios::sync_with_stdio(false);

int64_t N, P, p; cin >> N >> P;
p = P;

if (N == 1) {
    cout << P << "\n";
    return 0;
}

// P の素因数分解で N 個以上ある素因数の積
VI cntp(1000010, 0);
int64_t i = 2;
while (i * i <= P) {
    if (p % i == 0){
        ++cntp[i];
        p /= i;
    }
    else ++i;
}
if (p == P){
    cout << "1\n";
    return 0;
}

int64_t GCD = 1;
if (p < 1000010) ++cntp[p];
else GCD *= p;
for(int64_t i = 1, i < 1000010; ++i){
    if (cntp[i] >= N) GCD *= pow(i , cntp[i] / N);
}
cout << GCD << "\n";
}

// 境界，出力文字列 チェック



Compiler output:
a.cc: In function 'int main()':
a.cc:53:21: error: expected ';' before '<' token
   53 | for(int64_t i = 1, i < 1000010; ++i){
      |                     ^~
      |                     ;
a.cc:53:22: error: expected primary-expression before '<' token
   53 | for(int64_t i = 1, i < 1000010; ++i){
      |                      ^
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <numeric>
#include <map>
#include <iomanip>
#include <limits.h>

using namespace std;    
typedef long long ll;
typedef pair<ll, ll> pll;
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
const bool DEBAG = false;


// xを二進数に変換
vector<ll> to2(ll x){
    vector<ll> ret;
    while(x > 0){
        if(x % 2){
            ret.push_back(1);
        }
        else{
            ret.push_back(0);
        }
        x /= 2;        
    }
    return ret;
}

ll myPow(ll x, ll n){
    vector <ll> r = to2(n);
    vector <ll> v(r.size()); // v[0] = v^1 v[1] = v^2, v[2] = v^4, v[3] = v^8, 

    ll tmp = 1;
    for(ll i = 0; i < r.size(); i++){ 
        if(i == 0) v[i] = x;
        else v[i] = v[i-1] * v[i-1];

        if(r[i] == 1){
            tmp *= v[i];
        }
    }
    return tmp;

}

int main(){

    ll N, P;
    cin >> N >> P;

    ll logMax = log(P) / N + 1;

    ll left = 1;
    ll right = P;

    while(right - left >= 2){
        ll mid = (right + left) / 2;
        if( log(mid) <= logMax ){
            left = mid;
        }
        else{
            right = mid;
        }
    }

    for(ll i = right; i >= 1; i--){
        if( P % myPow(i , N) == 0 ){
            cout << i << endl;
            return 0;
        }
    }


}

Compiler output:
a.cc: In function 'int main()':
a.cc:55:17: error: 'log' was not declared in this scope; did you mean 'long'?
   55 |     ll logMax = log(P) / N + 1;
      |                 ^~~
      |                 long
Language: C++

#include <iostream>
using namespace std;
int main(){
  long long n,p;cin>>n>>p;
  if(n==1){
    cout << p << endl;
    return 0;
  }
  long long nw = 0;
  long long ans = 1;
  bool lock = false;
  for(long long i = 2; p >= i*i; i++){
    if(p%i==0){
      nw++;
      if(i*i==p)nw++;
      if(nw > n){
        lock = true;
        ans *= i;
      p/=i;
      i--;
    }else{
      lock = false;
      nw = 0;
    }
  }
  cout << ans << endl;
}
      

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

import java.util.*;

public class Main{
    
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        
        long N = sc.nextLong();
        long P = sc.nextLong();
        sc.close();

        if(N == 1){
            System.out.println(P);
        } else {
            int a = P;
            long gcd = 1;
            for(long i = 2; (i*i) <= a; i++){
                long count = 0;
                while(P % i == 0){
                    count++;
                    P /= i;
                }
                if(count >= N){
                    gcd *= (count/N)*i;
                }
            }
            System.out.println(gcd);
        }
   }
}

Compiler output:
Main.java:15: error: incompatible types: possible lossy conversion from long to int
            int a = P;
                    ^
1 error
Language: C++

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

#define mem(x, y) memset(x, y, sizeof(x))
#define PI acos(-1.00)
#define ERR 1e-9
#define __                        \
    ios_base::sync_with_stdio(0); \
    cin.tie(0);
#define file                           \
    freopen("input.txt", "rt", stdin); \
    freopen("output.txt", "wt", stdout);
#define MAX 1001010
const int inf = 0x7FFFFFFF;
typedef long long ll;

ll _GCD(ll a, ll b) { return b ? _GCD(b, a % b) : a; } //gcd

ll mark[MAX];
vector<ll> Prime;

void sieve()
{
    mem(mark, 0);
    mark[0] = mark[1] = 1;
    for (int i = 4; i < MAX; i += 2)
        mark[i] = 1;
    Prime.push_back(2);
    for (ll i = 3; i < MAX; i += 2)
    {
        if (!mark[i])
        {
            Prime.push_back(i);
            for (ll = i * i; j < MAX; j += 2 * i)
            {
                mark[j] = 1;
            }
        }
    }
}
ll N, P;

//prototypes
ll solution();

int main()
{
    //__;
    //file;
    int tc = 1, cas = 0;
    sieve();
    //cin>>tc;
    while (tc--)
    {
        //printf("Case %d: ",++cas);
        solution();
    }
    return 0;
}

ll solution()
{
    cin >> N >> P;
    if (N == 1)
    {
        cout << P;
        return 0;
    }
    ll ans = 1;
    ll lim = sqrt(P);
    for (ll i = 0;i!=Prime.size()&& Prime[i] <= lim; i++)
    {

        if(P%Prime[i]==0){
            ll count = 0;
            while (P % Prime[i] == 0)
            {
                P /= Prime[i];
                count++;
            }
            lim = sqrt(P);
            count /= N;
            if (count)
                ans *=pow(Prime[i], count);
        }
    }
    cout << ans;

    return 0;
}

Compiler output:
a.cc: In function 'void sieve()':
a.cc:34:21: error: expected unqualified-id before '=' token
   34 |             for (ll = i * i; j < MAX; j += 2 * i)
      |                     ^
a.cc:34:20: error: expected ';' before '=' token
   34 |             for (ll = i * i; j < MAX; j += 2 * i)
      |                    ^~
      |                    ;
a.cc:34:21: error: expected primary-expression before '=' token
   34 |             for (ll = i * i; j < MAX; j += 2 * i)
      |                     ^
a.cc:34:30: error: 'j' was not declared in this scope
   34 |             for (ll = i * i; j < MAX; j += 2 * i)
      |                              ^
a.cc:34:37: error: expected ')' before ';' token
   34 |             for (ll = i * i; j < MAX; j += 2 * i)
      |                 ~                   ^
a.cc:34:39: error: 'j' was not declared in this scope
   34 |             for (ll = i * i; j < MAX; j += 2 * i)
      |                                       ^
Language: C++

#include <bits/stdc++.h>
//#include <E:\codeblocksfile\c++\learning.h>
using namespace std;
#define sci1(a) scanf("%d",&a)
#define sci2(a,b) scanf("%d %d",&a,&b)
#define sci3(a,b,c) scanf("%d %d %d",&a,&b,&c)
#define scs(s) scanf("%s",s)
#define ll long long
#define pii pair<int,int>
#define mp(a,b) make_pair(a,b)
#define infi 0x7fffffff
#define infl 0x7fffffffffffffff
#ifndef GET_MACRO
#define GET_MACRO(__1,__2,__3,NAME,...) NAME
#endif // GET_MACRO
#define sci(...) GET_MACRO(__VA_ARGS__,sci3,sci2,sci1)(__VA_ARGS__)


int fill_p_q(int64_t n,int64_t* pfactor,int64_t* power){
    if(n<2)return 0;
    double sq=sqrt((double)n);
    int64_t l=(int64_t)sq,i;
    int j=0;
    for(i=2;i<=l;i++){
    if((n%i)==0){
        pfactor[j]=i;
        power[j]=0;
        while((n%i)==0){
            n/=i;
            power[j]++;
        }
        j++;
    }
    }
    if(n!=1){
        power[j]=1;
        pfactor[j]=n;
        j++;
    }
    return j;
}
ll pow_(ll n,ll p){
    ll ans=1;
    while(p>0){
        ans*=n;
        p--;
    }
    return ans;
}
int main(){
    //freopen("input.txt","r",stdin);
    ll n,p;
    cin>>n>>p;
    ll pfactor[100],power[100];
    int j=fill_p_q(p,pfactor,power);
    int i;
    ll ans=1;
    for(i=0;i<j;i++){
        ans*=pow_(pfactor[i],power[i]/n);
    }
    cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:55:22: error: invalid conversion from 'long long int*' to 'int64_t*' {aka 'long int*'} [-fpermissive]
   55 |     int j=fill_p_q(p,pfactor,power);
      |                      ^~~~~~~
      |                      |
      |                      long long int*
a.cc:19:33: note:   initializing argument 2 of 'int fill_p_q(int64_t, int64_t*, int64_t*)'
   19 | int fill_p_q(int64_t n,int64_t* pfactor,int64_t* power){
      |                        ~~~~~~~~~^~~~~~~
a.cc:55:30: error: invalid conversion from 'long long int*' to 'int64_t*' {aka 'long int*'} [-fpermissive]
   55 |     int j=fill_p_q(p,pfactor,power);
      |                              ^~~~~
      |                              |
      |                              long long int*
a.cc:19:50: note:   initializing argument 3 of 'int fill_p_q(int64_t, int64_t*, int64_t*)'
   19 | int fill_p_q(int64_t n,int64_t* pfactor,int64_t* power){
      |                                         ~~~~~~~~~^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
#define rev(a) reverse(a.begin(),a.end())
 int wari(int a,int b) {
   if(a%b==0)
     return a/b;
   else
     return a/b+1;
 }
 int keta(int a){
  double b=a;
  b=log10(b);
  int c=b;
  return c+1;
 }
 int souwa(int a){
  return a*(a+1)/2;
 }
 int lcm(int a,int b){
  int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return d*e/f;
    }
  int gcm(int a,int b){
      int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return f;
  }
 bool prime(int a){
   if(a<2)
     return false;
   else if(a==2)
     return true;
   else if(a%2==0)
     return false;
   double b=sqrt(a);
    for(int i=3;i<=b;i+=2){
      if(a%i==0){
        return false;
      }
    }
   return true;
 }
signed main(){
  int a,b,c=0,d=1;
  cin>>a>>b;
  double e=a;
  fo(i,1000000000000000){
    if(pow(i,a)>b)
      break;
    c=i;
  }
  for(double i=0;i<c+1;i++){
    if(b%pow(i,e)==0){
      d*=i;
      i--;
    }
  }
  cout<<d<<endl;
}

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

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
#define rev(a) reverse(a.begin(),a.end())
 int wari(int a,int b) {
   if(a%b==0)
     return a/b;
   else
     return a/b+1;
 }
 int keta(int a){
  double b=a;
  b=log10(b);
  int c=b;
  return c+1;
 }
 int souwa(int a){
  return a*(a+1)/2;
 }
 int lcm(int a,int b){
  int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return d*e/f;
    }
  int gcm(int a,int b){
      int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return f;
  }
 bool prime(int a){
   if(a<2)
     return false;
   else if(a==2)
     return true;
   else if(a%2==0)
     return false;
   double b=sqrt(a);
    for(int i=3;i<=b;i+=2){
      if(a%i==0){
        return false;
      }
    }
   return true;
 }
signed main(){
  int a,b,c=0,d=1;
  cin>>a>>b;
  fo(i,1000000000000000){
    if(pow(i,a)>b)
      break;
    c=i;
  }
  for(double i=0;i<c+1;i++){
    if(b%pow(i,a)==0){
      d*=i;
      i--;
    }
  }
  cout<<d<<endl;
}


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

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
#define rev(a) reverse(a.begin(),a.end())
 int wari(int a,int b) {
   if(a%b==0)
     return a/b;
   else
     return a/b+1;
 }
 int keta(int a){
  double b=a;
  b=log10(b);
  int c=b;
  return c+1;
 }
 int souwa(int a){
  return a*(a+1)/2;
 }
 int lcm(int a,int b){
  int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return d*e/f;
    }
  int gcm(int a,int b){
      int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return f;
  }
 bool prime(int a){
   if(a<2)
     return false;
   else if(a==2)
     return true;
   else if(a%2==0)
     return false;
   double b=sqrt(a);
    for(int i=3;i<=b;i+=2){
      if(a%i==0){
        return false;
      }
    }
   return true;
 }
signed main(){
  int a,b,c=0,d=1;
  cin>>a>>b;
  fo(i,1000000000000000){
    if(pow<int>(i,a)>b)
      break;
    c=i;
  }
  fo(i,c+1){
    if(b%pow<int>(i,a)==0){
      d*=i;
      i--;
    }
  }
  cout<<d<<endl;
}


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

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
#define rev(a) reverse(a.begin(),a.end())
 int wari(int a,int b) {
   if(a%b==0)
     return a/b;
   else
     return a/b+1;
 }
 int keta(int a){
  double b=a;
  b=log10(b);
  int c=b;
  return c+1;
 }
 int souwa(int a){
  return a*(a+1)/2;
 }
 int lcm(int a,int b){
  int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return d*e/f;
    }
  int gcm(int a,int b){
      int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return f;
  }
 bool prime(int a){
   if(a<2)
     return false;
   else if(a==2)
     return true;
   else if(a%2==0)
     return false;
   double b=sqrt(a);
    for(int i=3;i<=b;i+=2){
      if(a%i==0){
        return false;
      }
    }
   return true;
 }
signed main(){
  int a,b,c=0,d=1;
  cin>>a>>b;
  fo(i,1000000000000000){
    if(pow(i,a)>b)
      break;
    c=i;
  }
  fo(i,c+1){
    if(b%pow(i,a)==0){
      d*=i;
      i--;
    }
  }
  cout<<d<<endl;
}

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

#include<iostream>
#include<string>
#include<vector>
#include<utility>
#include<algorithm>
#include<math.h>
#include<iomanip>

using namespace std;
typedef pair<int, int> P;
typedef long long int ll;
const int INF = 1<<30;
int main(){
  ll n, p;cin>>n>>p;
  if(n==1){cout<<p<<endl;return;}
  ll ans=1;
  ll i=2;
  while(p!=1){
    if(pow(i, n)>p)break;
    if(p%i==0){
      ll tmp=pow(i, n);
      int count=0;
      while(p%tmp==0){
        p/=tmp;count++;
      }
      ans*=pow(tmp, count);
    }
    i++;
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:26: error: return-statement with no value, in function returning 'int' [-fpermissive]
   15 |   if(n==1){cout<<p<<endl;return;}
      |                          ^~~~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <iterator>
#include <numeric>
#include <bitset>

using namespace std;
typedef long long int ll;

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define all(c) c.begin(),c.end()
#define pb push_back
#define fs first
#define sc second
#define show(x) cout << #x << " = " << (x) << endl
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
template<class S, class T> ostream & operator<<(ostream & o, const pair<S, T> & p) {
	return o << "(" << p.fs << "," << p.sc << ")";
}
template<class T> ostream& operator<<(ostream& o, const vector<T>& vc) {
	o << "{";
	for (const T& v : vc) o << v << ",";
	o << "}";
	return o;
}
using ll = long long;
template<class T> using V = vector<T>;
template<class T> using VV = vector<vector<T>>;

template<class T>
T gcd(T a, T b) {
	a = abs(a), b = abs(b);
	if (b == 0) return a;
	return gcd(b, a % b);
}
template<class T, class U>
T pow_mod(T x, U p, T mod) {
	assert(p >= 0);
	x %= mod;
	T a = 1 % mod;
	while (p) {
		if (p & 1) a = a * x % mod;
		x = x * x % mod;
		p >>= 1;
	}
	return a;
}
bool isprime(ll n) {
	if (n <= 1) return 0;
	if (n == 2) return 1;
	if (n % 2 == 0) return 0;
	ll d = n - 1;
	while (d % 2 == 0) d /= 2;
	static const vector<ll> alist{ 2,3,5,7,11,13,17,19,23,29,31,37 };
	for (ll a : alist) {
		if (n <= a) break;
		ll t = d;
		ll y = pow_mod<ll>(a, t, n);
		while (t != n - 1 && y != 1 && y != n - 1) {
			y = ll(y) * y % n;
			t <<= 1;
		}
		if (y != n - 1 && t % 2 == 0) return 0;
	}
	return 1;
}
int main() {
	ll N, P;
	cin >> N >> P;
	ll i = 2, gcd = 1;

	while (pow(i, N) <= P) {

		if (isprime(i) && P % ll(pow(i, N)) == 0) {
			gcd *= i;
			P /= ll(pow(i, N));
		}
		else {
			i++;
		}
	}

	cout << gcd;
	return 0;
}


Compiler output:
a.cc: In instantiation of 'T pow_mod(T, U, T) [with T = long long int; U = long long int]':
a.cc:76:21:   required from here
   76 |                 ll y = pow_mod<ll>(a, t, n);
      |                        ~~~~~~~~~~~^~~~~~~~~
a.cc:56:15: error: 'assert' was not declared in this scope
   56 |         assert(p >= 0);
      |         ~~~~~~^~~~~~~~
a.cc:19:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
   18 | #include <bitset>
  +++ |+#include <cassert>
   19 |
Language: C++

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <iterator>
#include <numeric>
#include <bitset>

using namespace std;
typedef long long int ll;

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define all(c) c.begin(),c.end()
#define pb push_back
#define fs first
#define sc second
#define show(x) cout << #x << " = " << (x) << endl
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
template<class S, class T> ostream & operator<<(ostream & o, const pair<S, T> & p) {
	return o << "(" << p.fs << "," << p.sc << ")";
}
template<class T> ostream& operator<<(ostream& o, const vector<T>& vc) {
	o << "{";
	for (const T& v : vc) o << v << ",";
	o << "}";
	return o;
}
using ll = long long;
template<class T> using V = vector<T>;
template<class T> using VV = vector<vector<T>>;

template<class T>
T gcd(T a, T b) {
	a = abs(a), b = abs(b);
	if (b == 0) return a;
	return gcd(b, a % b);
}
template<class T, class U>
T pow_mod(T x, U p, T mod) {
	assert(p >= 0);
	x %= mod;
	T a = 1 % mod;
	while (p) {
		if (p & 1) a = a * x % mod;
		x = x * x % mod;
		p >>= 1;
	}
	return a;
}
bool isprime(ll n) {
	if (n <= 1) return 0;
	if (n == 2) return 1;
	if (n % 2 == 0) return 0;
	ll d = n - 1;
	while (d % 2 == 0) d /= 2;
	static const vector<ll> alist{ 2,3,5,7,11,13,17,19,23,29,31,37 };
	for (ll a : alist) {
		if (n <= a) break;
		ll t = d;
		ll y = pow_mod<__int64>(a, t, n);
		while (t != n - 1 && y != 1 && y != n - 1) {
			y = __int64(y) * y % n;
			t <<= 1;
		}
		if (y != n - 1 && t % 2 == 0) return 0;
	}
	return 1;
}
int main() {
	ll N, P;
	cin >> N >> P;
	ll i = 2, gcd = 1;

	while (pow(i, N) <= P) {

		if (isprime(i) && P % ll(pow(i, N)) == 0) {
			gcd *= i;
			P /= ll(pow(i, N));
		}
		else {
			i++;
		}
	}

	cout << gcd;
	return 0;
}


Compiler output:
a.cc: In function 'bool isprime(ll)':
a.cc:76:32: error: '__int64' was not declared in this scope; did you mean '__ynf64'?
   76 |                 ll y = pow_mod<__int64>(a, t, n);
      |                                ^~~~~~~
      |                                __ynf64
a.cc:76:40: error: no matching function for call to 'pow_mod<<expression error> >(ll&, ll&, ll&)'
   76 |                 ll y = pow_mod<__int64>(a, t, n);
      |                        ~~~~~~~~~~~~~~~~^~~~~~~~~
a.cc:55:3: note: candidate: 'template<class T, class U> T pow_mod(T, U, T)'
   55 | T pow_mod(T x, U p, T mod) {
      |   ^~~~~~~
a.cc:55:3: note:   template argument deduction/substitution failed:
a.cc:76:40: error: template argument 1 is invalid
   76 |                 ll y = pow_mod<__int64>(a, t, n);
      |                        ~~~~~~~~~~~~~~~~^~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#include<algorithm>
#include<math.h>
using namespace std;
 
template <class T> using V = vector<T>;
 
using ll = long long;
using db = double;
using st = string;
using ch = char;
using vll = V<ll>;
using vpll =V<pair<ll,ll>>;
using vst = V<st>;
using vdb = V<db>;
using vch = V<ch>;
 
 
#define FOR(i,a,b) for(ll i=(a);i<(ll)(b);i++)
#define rFOR(i,a,b) for(ll i=(b);i>(ll)(a);i--)
#define oFOR(i,a,b) for(ll i=(a);i<(ll)(b);i+=2)
#define bgn begin()
#define en end()
#define SORT(a) sort((a).bgn,(a).en)
#define REV(a) reverse((a).bgn,(a).en)
#define M(a,b) max(a,b)
#define rM(a,b) min(a,b)
#define fi first
#define se second
#define sz size()
#define gcd(a,b) __gcd(a,b)
#define co(a) cout<<a<<endl;
#define ci(a) cin>>a;
 
 
ll sum(ll n) {
  ll m=0;
  FOR(i,0,20){
    m+=n%10;
    n/=10;
    if(n==0){
      break;
    }
  }
  return m;
}
 
 
ll combi(ll n,ll m) {
  ll ans=1;
  rFOR(i,n,n-m){
    ans*=i;
  }
  FOR(i,1,m+1){
    ans/=i;
  }
  return ans;
}
 
 
ll lcm(ll a,ll b){
  ll n;
  n=a/gcd(a,b)*b;
  return n;
}
 
 
/****************************************\
| Thank you for viewing my code:)        |
| Written by RedSpica a.k.a. RanseMirage |
| Twitter:@asakaakasaka                  | 
\****************************************/
 
 
signed main() {
  ll n,m;
  	ci(n>>m);
  ll ans=1;
  if(n==1){
    co(m)
  }
  else{
  FOR(i,1,sqrt(m)){
    if(m%pow(i,n)==0){
      ans*=i;
      m/=pow(i,n);
    }
  }
  }
  co(ans)
}
  

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

#include "bits/stdc++.h"
#define ALL(x) x.begin(), x.end()
#define LEN(x) (int)x.size()
#define iostreamBooster() do{ cin.tie(nullptr); ios_base::sync_with_stdio(false); }while(0)
using namespace std;
typedef int64_t i64;
typedef pair<int,int> pii;
template<class A, class B>inline bool chmax(A &a, const B &b){return b>a ? a=b,1 : 0;}
template<class A, class B>inline bool chmin(A &a, const B &b){return b<a ? a=b,1 : 0;}
constexpr int INF = 0x3f3f3f3f;

signed main()
{
  i64 N, P;
  cin >> N >> P;

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

  i64 ans = 1;
  for (i64 i = 2; i*i <= P; ++i) {
    i64 cnt = 0;
    while(P % i == 0) {
      ++cnt;
      P /= i;
    }

    cnt /= N;
    for (i64 j = 0; j < cnt; ++j) ans *= i;
  }

  cout << ans << endl;

  return 0;
}

#include "bits/stdc++.h"
#define ALL(x) x.begin(), x.end()
#define LEN(x) (int)x.size()
#define iostreamBooster() do{ cin.tie(nullptr); ios_base::sync_with_stdio(false); }while(0)
using namespace std;
typedef int64_t i64;
typedef pair<int,int> pii;
template<class A, class B>inline bool chmax(A &a, const B &b){return b>a ? a=b,1 : 0;}
template<class A, class B>inline bool chmin(A &a, const B &b){return b<a ? a=b,1 : 0;}
constexpr int INF = 0x3f3f3f3f;

signed main()
{
  i64 N, P;
  cin >> N >> P;

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

  i64 ans = 1;
  for (i64 i = 2; i*i <= P; ++i) {
    i64 cnt = 0;
    while(P % i == 0) {
      ++cnt;
      P /= i;
    }

    cnt /= N;
    for (i64 j = 0; j < cnt; ++j) ans *= i;
  }

  cout << ans << endl;

  return 0;
}



Compiler output:
a.cc:46:39: error: redefinition of 'template<class A, class B> bool chmax(A&, const B&)'
   46 | template<class A, class B>inline bool chmax(A &a, const B &b){return b>a ? a=b,1 : 0;}
      |                                       ^~~~~
a.cc:8:39: note: 'template<class A, class B> bool chmax(A&, const B&)' previously declared here
    8 | template<class A, class B>inline bool chmax(A &a, const B &b){return b>a ? a=b,1 : 0;}
      |                                       ^~~~~
a.cc:47:39: error: redefinition of 'template<class A, class B> bool chmin(A&, const B&)'
   47 | template<class A, class B>inline bool chmin(A &a, const B &b){return b<a ? a=b,1 : 0;}
      |                                       ^~~~~
a.cc:9:39: note: 'template<class A, class B> bool chmin(A&, const B&)' previously declared here
    9 | template<class A, class B>inline bool chmin(A &a, const B &b){return b<a ? a=b,1 : 0;}
      |                                       ^~~~~
a.cc:48:15: error: redefinition of 'constexpr const int INF'
   48 | constexpr int INF = 0x3f3f3f3f;
      |               ^~~
a.cc:10:15: note: 'constexpr const int INF' previously defined here
   10 | constexpr int INF = 0x3f3f3f3f;
      |               ^~~
a.cc:50:8: error: redefinition of 'int main()'
   50 | signed main()
      |        ^~~~
a.cc:12:8: note: 'int main()' previously defined here
   12 | signed main()
      |        ^~~~
Language: C++

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

int main(){
  int N;
  cin >> N;
  long long T,A;
  long long t=1;
  long long a=1;
  for (int i=0;i<N;i++){
    cin >> T >> A;
    j=max((t+T-1)/T,(a+A-1)/A)
    t=j*T;
    a=j*A;
  }
  cout << t+a << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'j' was not declared in this scope
   12 |     j=max((t+T-1)/T,(a+A-1)/A)
      |     ^
Language: C++

#include <iostream>
using namespace std;

typedef long long ll;

int main(){
  ll n,m;
  cin >> n >> m;
  ll ans=1;
  if(n==1){
    cout << m << endl;
  }
  else{
    for(int i=2;i*i<=m;i++){
      int count=0;
      while(m%i==0){
        count++;
        m/=i;
      }
      int x=count/n;
      ans*=(ll)pow(i,x);
    }
    cout << ans << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:16: error: 'pow' was not declared in this scope
   21 |       ans*=(ll)pow(i,x);
      |                ^~~
Language: C++

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

typedef long long ll;

int main(){
  ll n,m;
  cin >> n >> m;
  if(n==1){
    cout << m << endl;
  }
  else{
    ll ans=1;
    for(int i=1;i<=1000000;i++){
      if(m%pow(i,n)==0){
        ans=i;
      }
    }
    cout << ans << endl;
  }
}

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

#include <iostream>
using namespace std;

typedef long long ll;

int main(){
  ll n,m;
  cin >> n >> m;
  if(n==1){
    cout << m << endl;
  }
  else{
    ll ans=1;
    for(int i=1;i<=1000000;i++){
      if(m%pow(i,n)==0){
        ans=i;
      }
    }
    cout << ans << endl;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:15:12: error: 'pow' was not declared in this scope
   15 |       if(m%pow(i,n)==0){
      |            ^~~
a.cc:20:4: error: expected '}' at end of input
   20 |   }
      |    ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
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,ans=1,p,x;
  cin>>n>>p;
  x=p;
  long long num[1000010]={};
  if(n==1){
    cout<<p<<endl;
  }
  else{
    for(long long i=2;pow(i,n)<=x;i++){
      while(p%i==0){
        p/=i;
        num[i]++;
      }
      if(p==1)
        break;
    }
  }
  for(long long i=0;pow(i,n)<=x;i++){
    if(num[i]>=n)
      ans*=i*(num[i]/n);
  }
  cout<<ans<<endl;
  }
}


Compiler output:
a.cc:37:1: error: expected declaration before '}' token
   37 | }
      | ^
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,ans=1,p,x;
  cin>>n>>p;
  x=p;
  long long num[1000010]={};
  if(n==1)
    cout<<p<<endl;
  else{
    for(long long i=2;pow(i,n)<=x;i++){
      while(p%i==0){
        p/=i;
        num[i]++;
      }
      if(p==1)
        break;
    }
  }
  for(long long i=0;pow(i,n)<=x;i++){
    if(num[i]>=n)
      ans*=i*(num[i]/n);
  }
  cout<<ans<<endl;
  }
}


Compiler output:
a.cc:36:1: error: expected declaration before '}' token
   36 | }
      | ^
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,ans=1,p,x;
  cin>>n>>p;
  x=p;
  long long num[1000000]={};
  if(n==1)
    cout<<p<<endl;
  else{
    for(long long i=2;pow(i,n)<=x;i++){
      while(p%i==0){
        p/=i;
        num[i]++;
      }
      if(p==1)
        break;
    }
  }
  for(long long i=0;pow(i,n)<=x;i++){
    if(num[i]>=n)
      ans*=i*(num[i]/n);
  }
  cout<<ans<<endl;
}
}


Compiler output:
a.cc:36:1: error: expected declaration before '}' token
   36 | }
      | ^
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,y=0,ans=1,p;
  cin>>n>>p;
  int num[p/2])]={};
  if(n==1)
    cout<<p<<endl;
  else{
    for(int i=2;i<=p;i++){
      while(p%i==0){
        p/=i;
        num[i]++;
        x++;
      }
      if(p==1)
        break;
    }
  }
  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:16:15: error: expected initializer before ')' token
   16 |   int num[p/2])]={};
      |               ^
a.cc:23:9: error: 'num' was not declared in this scope; did you mean 'enum'?
   23 |         num[i]++;
      |         ^~~
      |         enum
a.cc:31:8: error: 'num' was not declared in this scope; did you mean 'enum'?
   31 |     y+=num[i];
      |        ^~~
      |        enum
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,y=0,ans=1,p;
  cin>>n>>p;
  int num[pow(p,0.5)]={};
  if(n==1)
    cout<<p<<endl;
  else{
    for(int i=2;i<=p;i++){
      while(p%i==0){
        p/=i;
        num[i]++;
        x++;
      }
      if(p==1)
        break;
    }
  }
  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:16:14: error: conversion from '__gnu_cxx::__promote<double>::__type' {aka 'double'} to 'long unsigned int' in a converted constant expression
   16 |   int num[pow(p,0.5)]={};
      |           ~~~^~~~~~~
a.cc:16:14: error: could not convert 'std::pow<long long int, double>(p, 5.0e-1)' from '__gnu_cxx::__promote<double>::__type' {aka 'double'} to 'long unsigned int'
   16 |   int num[pow(p,0.5)]={};
      |           ~~~^~~~~~~
      |              |
      |              __gnu_cxx::__promote<double>::__type {aka double}
a.cc:16:14: error: size of array 'num' has non-integral type '__gnu_cxx::__promote<double>::__type' {aka 'double'}