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

//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(v) v.begin(), v.end()
#define allr(v) v.rbegin(), v.rend()

int main() {
  int x, ans = 0;
  cin >> x;
  for (int b = 1; b < 1000; b++) {
    for (int p = 2; p < 1000; p++) {
      if (pow(b, p) <= x) ans = max(ans, pow(b, p));
    }
  }
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:36: error: no matching function for call to 'max(int&, __gnu_cxx::__promote<double>::__type)'
   14 |       if (pow(b, p) <= x) ans = max(ans, pow(b, p));
      |                                 ~~~^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:14:36: note:   deduced conflicting types for parameter 'const _Tp' ('int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'})
   14 |       if (pow(b, p) <= x) ans = max(ans, pow(b, p));
      |                                 ~~~^~~~~~~~~~~~~~~~
/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:
/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:14:36: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   14 |       if (pow(b, p) <= x) ans = max(ans, pow(b, p));
      |                                 ~~~^~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define pb push_back
using namespace std;
using P = pair<int,int>;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef tuple<int,int,int> T;
typedef vector<P> vp;
typedef vector<T> vt;

int main(void){
  int x;
  cin >> x;
  int ans=1;
  for(int b=1;b<=x;b++){
    int power=b*b;
    for(int p=2;;p++){
      if(power>x) break;
      ans=max(ans,power);
      power *=b;
    }
  }
  cout << ans << endl;
  return 0;






Compiler output:
a.cc: In function 'int main()':
a.cc:30:12: error: expected '}' at end of input
   30 |   return 0;
      |            ^
a.cc:17:15: note: to match this '{'
   17 | int main(void){
      |               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,d;
cin >>a>>b>>c>>d;
if(abs(a-c)<=d || (abs(a-b)<=d && abs(b-c)<=d)) puts("Yes");
else puts("No");
}

#include<stdio.h>
int abs(int,int);
int main(void){
  int a,b,c,d;
  scanf("%d %d %d %d",a,b,c,d);
  if(abs(a,c)<=d || (abs(a-b)<=d && abs(b-c)<=d)){
    printf("Yes");
  }else{
    printf("No");
  }
  return 0;
}
int abs(int x,int y){
  int sub=x-y;
  if(sub<=0){
    sub=-1*sub;
  }
  return sub;
}

Compiler output:
a.cc:12:5: error: redefinition of 'int main()'
   12 | int main(void){
      |     ^~~~
a.cc:3:5: note: 'int main()' previously defined here
    3 | int main(){
      |     ^~~~
Language: C++

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

int main() {
  int X;
  cin >> X;
  vector<bool> exp(X+1);
  exp[1] = 1;
  for (int i = 2; i <= X; i++) {
    int B = i*i;
    while (B <= X) {
      exp[B] = true;
      B *=　i;
    }
  }
  for (int i = X; i>= 1; i--) {
    if (exp[i]) {
      cout << i << endl;
      return 0;
    }
  }
}

Compiler output:
a.cc:15:11: error: extended character 　 is not valid in an identifier
   15 |       B *=　i;
      |           ^
a.cc: In function 'int main()':
a.cc:15:11: error: '\U00003000i' was not declared in this scope
   15 |       B *=　i;
      |           ^~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define intt long long
#define FAST ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

const int N = 1005;

int a[N];

int main() {

	FAST;

	int x;
	cin >> x;
	for (int i = 2; i * i <= x; i ++) {
		int k = i;
		while (k <= n) {
			a[k] ++;
			k *= i;
		}
	}
	while (!a[x]) {
		x --;
	}
	cout << x << '\n';
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:29: error: 'n' was not declared in this scope
   20 |                 while (k <= n) {
      |                             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int x,a,num;
int main(){
    cin>>x;
    for(int i=x;i>=1;i--)
    {
    	if(i==1) {cout<<i;return 0;}
    	for(int j=2;j<=sqrt(i);j++)
    	{
    		a=i;
    		num=0;
    		while(a>j)
    		{
    			if(a%j!=0) break;
    			a/=j;
    			num++;
			}
			if(a==j&&()num>=2) {cout<<i;return 0;}
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:35: error: expected primary-expression before ')' token
   19 |                         if(a==j&&()num>=2) {cout<<i;return 0;}
      |                                   ^
a.cc:19:36: error: expected ')' before 'num'
   19 |                         if(a==j&&()num>=2) {cout<<i;return 0;}
      |                           ~        ^~~
      |                                    )
Language: C++

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

int main() {
  int X;
  cin >> X;
  for(int b=2;b<=X;b++){
    int v = b*b;
    while(v<=X){
      expo[v] = 1;
      v *= b;
    }
  }
  for(int i=X;i>=1;i--) if(expo[i]){
  cout <<i<<endl;
  return 0;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: 'expo' was not declared in this scope; did you mean 'expl'?
   10 |       expo[v] = 1;
      |       ^~~~
      |       expl
a.cc:14:28: error: 'expo' was not declared in this scope; did you mean 'expl'?
   14 |   for(int i=X;i>=1;i--) if(expo[i]){
      |                            ^~~~
      |                            expl
Language: C++

/*   _/                _/                 _/_/_/   _/
  _/_/_/_/   _/_/   _/_/_/_/   _/_/    _/       _/_/
   _/     _/    _/   _/     _/    _/  _/_/_/     _/
  _/     _/    _/   _/     _/    _/  _/    _/   _/
   _/_/   _/_/       _/_/   _/_/      _/_/     _/ */
#include<iostream>
#include<algorithm>
#include<cmath>
#include<iomanip>
#include<set>
#include<map>
#include<queue>
#include<vector>
using namespace std;
using ll=long long;
const int MOD=1e9+7;
const double pi=3.14159265358979323846;
const int inf=2e9;
const ll INF=1e18;
using P=pair<int,int>;
int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};
int main() {
  cin.tie(0),cout.tie(0);
  ios::sync_with_stdio(false);
  int x,ans=1;
  cin >> x;
  for(int =2; i<32; i++) {
    int cnt=i*i;
    while(cnt<=x) {
      ans=max(ans,cnt);
      cnt*=i;
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:11: error: expected unqualified-id before '=' token
   27 |   for(int =2; i<32; i++) {
      |           ^
a.cc:27:10: error: expected ';' before '=' token
   27 |   for(int =2; i<32; i++) {
      |          ^~
      |          ;
a.cc:27:11: error: expected primary-expression before '=' token
   27 |   for(int =2; i<32; i++) {
      |           ^
a.cc:27:15: error: 'i' was not declared in this scope
   27 |   for(int =2; i<32; i++) {
      |               ^
a.cc:27:19: error: expected ')' before ';' token
   27 |   for(int =2; i<32; i++) {
      |      ~            ^
      |                   )
a.cc:27:21: error: 'i' was not declared in this scope
   27 |   for(int =2; i<32; i++) {
      |                     ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

const ll MAX = 9000000000000000000;

typedef long long int ll;

#define fin(ans) cout << (ans) << endl;

ll mod_pow(ll x, ll n, ll mod = MAX)
{
  ll res = 1;
  while (n > 0)
  {
    if (n & 1)
      res = res * x % mod;
    x = x * x % mod;
    n >>= 1;
  }
  return res;
}

int main()
{
  ios::sync_with_stdio(false);
  cin.tie(0);
  ll x; cin >> x;
  ll ans = 1;
  for(ll i = 2;i < x;i++)
  {
    for(ll j = 2;mod_pow(i, j) <= x;j++)
    {
      ans = max(ans, mod_pow(i, j));
    }
  }
  fin(ans);
  return 0;
}


Compiler output:
a.cc:5:7: error: 'll' does not name a type
    5 | const ll MAX = 9000000000000000000;
      |       ^~
a.cc:11:33: error: 'MAX' was not declared in this scope
   11 | ll mod_pow(ll x, ll n, ll mod = MAX)
      |                                 ^~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

const ll MAX = 9000000000000000000;

typedef long long int ll;

ll mod_pow(ll x, ll n, ll mod = MAX)
{
  ll res = 1;
  while (n > 0)
  {
    if (n & 1)
      res = res * x % mod;
    x = x * x % mod;
    n >>= 1;
  }
  return res;
}

int main()
{
  ios::sync_with_stdio(false);
  cin.tie(0);
  ll x; cin >> x;
  ll ans = 1;
  for(ll i = 2;i < x;i++)
  {
    for(ll j = 2;mod_pow(i, j) <= x;j++)
    {
      ans = max(ans, mod_pow(i, j));
    }
  }
  fin(ans);
  return 0;
}

Compiler output:
a.cc:5:7: error: 'll' does not name a type
    5 | const ll MAX = 9000000000000000000;
      |       ^~
a.cc:9:33: error: 'MAX' was not declared in this scope
    9 | ll mod_pow(ll x, ll n, ll mod = MAX)
      |                                 ^~~
a.cc: In function 'int main()':
a.cc:35:3: error: 'fin' was not declared in this scope; did you mean 'sin'?
   35 |   fin(ans);
      |   ^~~
      |   sin
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, n) for(int i = 0; i < (int)(n); i++)

int main() {
int n;
cin>>n;
double ans=1;
for (int i = 1; i < n; i++)

  
  for (int j = 2; j < 1000; j++)
  {
    /* code */

    ans=max(ans,pow(i,j));
    if (ans*i>n)
    {
      /* code */
      break;
    }
    
  }
  
}
cout<<ans<<endl;
}

Compiler output:
a.cc:27:1: error: 'cout' does not name a type
   27 | cout<<ans<<endl;
      | ^~~~
a.cc:28:1: error: expected declaration before '}' token
   28 | }
      | ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;
typedef vector<ll> vll;

#define fin(ans) cout << (ans) << endl;
#define all(a) a.begin(), a.end()

template <typename T>
void Sort(T &n, ll a = 0, ll b = 0)
{
  if (b == 0)
  {
    return (sort(n.begin() + a, n.end()));
  }
  else
  {
    return (sort(n.begin() + a, n.begin() + b));
  }
}

template <typename T>
void Reve(T &n, ll a = 0, ll b = 0)
{
  if (b == 0)
  {
    return (reverse(n.begin() + a, n.end()));
  }
  else
  {
    return (reverse(n.begin() + a, n.begin() + b));
  }
}

ll mod_pow(ll x, ll n, ll mod = MAX)
{
  ll res = 1;
  while (n > 0)
  {
    if (n & 1)
      res = res * x % mod;
    x = x * x % mod;
    n >>= 1;
  }
  return res;
}

void Main()
{
  ll X; cin >> X;
  vll ans(30000, 1);
  ans[0] == 1;
  ll u = 1;
  for(ll i = 2;i <= X;i++)
  {
    for(ll j = 2;j <= X;j++)
    {
      if(mod_pow(i, j) <= X)
      {
        ans[u] = mod_pow(i, j);
      }
      else
      {
        break;
      }
      
    }
  }
  Sort(ans);
  Reve(ans);
  fin(ans[0]);
}

int main()
{
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(20);
  Main();
  return 0;
}


Compiler output:
a.cc:37:33: error: 'MAX' was not declared in this scope
   37 | ll mod_pow(ll x, ll n, ll mod = MAX)
      |                                 ^~~
Language: C++

#include <iostream>
#include <string>
#include <cstring>
#include <vector>
#include <numeric>
#include <cstdlib>
#include <map>
#include <set>
#include <algorithm>
#include <math.h>

using namespace std;

int main(){
    int X;

    cin >> X;

    while(i*i <= X){
        i++;
    }

    cout << (i-1)*(i-1) << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:11: error: 'i' was not declared in this scope
   19 |     while(i*i <= X){
      |           ^
a.cc:23:14: error: 'i' was not declared in this scope
   23 |     cout << (i-1)*(i-1) << endl;
      |              ^
Language: C++

#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <stdlib.h>
#include <stdio.h>

using namespace std;
using Graph = vector<vector<int>>;

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; }

vector<bool> seen;

void dfs(const Graph& G, int v) {
    seen[v] = true; // v を訪問済にする

    // v から行ける各頂点 next_v について
    for (auto next_v : G[v]) {
        if (seen[next_v]) continue; // next_v が探索済だったらスルー
        dfs(G, next_v); // 再帰的に探索
    }
}

int abs_A(int num) {
    if (num > 0)
        return num;
    else
        return -num;
}

int abs_B(long long num, long long numb) {
    if (num - numb >= 0)
        return num - numb;
    else
        return -1 * (num - numb);
}

long long gcd(long long a, long long b) {
    if (b == 0) return a;
    else return gcd(b, a % b);
}
long long lcm(long long a, long long b) {
    return a * b / gcd(a, b);
}

bool permutation(vector<int>& vec, vector<int>& P) {
    bool ok = true;
    for (int i = 0; i < vec.size(); i++) {
        if (vec.at(i) != P.at(i)) {
            ok = false;
        }
    }
    return ok;
}

const long long MOD = 1000000007;
const int INF = 1001001001;

int main() {
    int X;
    cin >> X;
    int count = 0;
    int ans = 1;
    for (int i = 1; i < X; i++) {
        for (int j = 2; j < X; j++) {
            int zyou = pow(i, j);
            if (zyou <= X) {
                count = zyou;
            }
            else {
                break;
            }
            ans = max(ans, count);
            count = 0;
        }
    }

    cout << ans << endl;
        
}


Compiler output:
a.cc: In function 'int main()':
a.cc:81:24: error: 'pow' was not declared in this scope
   81 |             int zyou = pow(i, j);
      |                        ^~~
Language: C++

#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <stdlib.h>
#include <stdio.h>

using namespace std;
using Graph = vector<vector<int>>;

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; }

vector<bool> seen;

void dfs(const Graph& G, int v) {
    seen[v] = true; // v を訪問済にする

    // v から行ける各頂点 next_v について
    for (auto next_v : G[v]) {
        if (seen[next_v]) continue; // next_v が探索済だったらスルー
        dfs(G, next_v); // 再帰的に探索
    }
}

int abs_A(int num) {
    if (num > 0)
        return num;
    else
        return -num;
}

int abs_B(long long num, long long numb) {
    if (num - numb >= 0)
        return num - numb;
    else
        return -1 * (num - numb);
}

long long gcd(long long a, long long b) {
    if (b == 0) return a;
    else return gcd(b, a % b);
}
long long lcm(long long a, long long b) {
    return a * b / gcd(a, b);
}

bool permutation(vector<int>& vec, vector<int>& P) {
    bool ok = true;
    for (int i = 0; i < vec.size(); i++) {
        if (vec.at(i) != P.at(i)) {
            ok = false;
        }
    }
    return ok;
}

const long long MOD = 1000000007;
const int INF = 1001001001;

int main() {
    int X;
    cin >> X;
    int count = 0;
    int ans = 1;
    for (int i = 1; i < X; i++) {
        for (int j = 2; j < X; j++) {
            if ((pow(i,j)) <= X) {
                count = pow(i,j);
            }
            else {
                break;
            }
            ans = max(ans, count);
            count = 0;
        }
    }

    cout << ans << endl;
        
}


Compiler output:
a.cc: In function 'int main()':
a.cc:81:18: error: 'pow' was not declared in this scope
   81 |             if ((pow(i,j)) <= X) {
      |                  ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef int64_t ll;
typedef long double ld;
const ll MOD=1000000007;
#define loop(i,n) for(ll i=0;i<(ll)(n);i++)
#define change(a,b) do{ll c=a; a=b; b=c;}while(0)
long long gcd(long long a,long long b){
    ll gcdmax=max(a,b);
    ll gcdmin=min(a,b);
    while(true){
        if(gcdmax%gcdmin==0)break;
        else gcdmax%=gcdmin;
        change(gcdmin,gcdmax);
    }
    return gcdmin;
}
ll powerup(ll N,ll P,ll M){
    if(P==0)return 1;
    else if(P%2==0){
        ll t=powerup(N,P/2,M);
        return t*t%M;
    }
    else return N*powerup(N,P-1,M)%M;
}
int main()
{
  ll N;
  ll ans=0;
  cin>>N;
  loop(i,10){
    loop(j,10){
      if(powerup(i,j)<=N) ans=max(ans,powerup(i,j));
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:17: error: too few arguments to function 'll powerup(ll, ll, ll)'
   33 |       if(powerup(i,j)<=N) ans=max(ans,powerup(i,j));
      |          ~~~~~~~^~~~~
a.cc:18:4: note: declared here
   18 | ll powerup(ll N,ll P,ll M){
      |    ^~~~~~~
a.cc:33:46: error: too few arguments to function 'll powerup(ll, ll, ll)'
   33 |       if(powerup(i,j)<=N) ans=max(ans,powerup(i,j));
      |                                       ~~~~~~~^~~~~
a.cc:18:4: note: declared here
   18 | ll powerup(ll N,ll P,ll M){
      |    ^~~~~~~
Language: C++

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

int main() {
    int n;
    cin >> n;
    vector<int> a(100000,0);
    int ans=1;
    int t=1;
    a.at(0)=0;
    for(int i=2;i<n;i++){
        int n=i*i;
        a.at(t)=n;
        t++;
        while(n*i<n;){
            n*=i;
            a.at(t)=n;
            t++;
        }
    }
    sort(a.begin(),a.end());
    for(int i=0;i<100000;i++){
        if(a.at(i)<=n&&a.at(i+1)>n){
            cout<<a.at(i)<<endl;
            break;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:20: error: expected ')' before ';' token
   15 |         while(n*i<n;){
      |              ~     ^
      |                    )
a.cc:15:21: error: expected primary-expression before ')' token
   15 |         while(n*i<n;){
      |                     ^
Language: C++

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

int main() {
    int n;
    cin >> n;
    vector<int> a(50,1001);
    a.at(0)=0;
    for(int i=1;i<33;i++){
        a.at(i)=i*i;
        if(n<a.at(i)){
            int ans=a.at(i-1);
            break;
        }
    }
    cout << ans << endl;
}

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

#include <bits/stdc++.h>

using namespace std;
 
int main()
{
   vector<int > v;
  int i;
  for(i=1;i<=31;++i)
  {
    v.push_back(i*i);
  }
  
  for(i=1;i<=10;++i)
  {
    v.push_back(i*i*i);
  }
  
  for(i=1;i<=5;++i)
  {
    v.push_back((i*i*i*i));
  }
  
  for(i=0;i<v.size();++i)
  {
    if(v[i]>x)
        break;
  }
  printf("%d",v[i-1]);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:13: error: 'x' was not declared in this scope
   26 |     if(v[i]>x)
      |             ^
Language: C++

#include <bits/stdc++.h>
 
int main()
{
   vector<int > v;
  int i;
  for(i=1;i<=31;++i)
  {
    v.push_back(i*i);
  }
  
  for(i=1;i<=10;++i)
  {
    v.push_back(i*i*i);
  }
  
  for(i=1;i<=5;++i)
  {
    v.push_back((i*i*i*i));
  }
  
  for(i=0;i<v.size();++i)
  {
    if(v[i]>x)
        break;
  }
  printf("%d",v[i-1]);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:4: error: 'vector' was not declared in this scope
    5 |    vector<int > v;
      |    ^~~~~~
a.cc:5:4: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:5:11: error: expected primary-expression before 'int'
    5 |    vector<int > v;
      |           ^~~
a.cc:9:5: error: 'v' was not declared in this scope
    9 |     v.push_back(i*i);
      |     ^
a.cc:14:5: error: 'v' was not declared in this scope
   14 |     v.push_back(i*i*i);
      |     ^
a.cc:19:5: error: 'v' was not declared in this scope
   19 |     v.push_back((i*i*i*i));
      |     ^
a.cc:22:13: error: 'v' was not declared in this scope
   22 |   for(i=0;i<v.size();++i)
      |             ^
a.cc:24:13: error: 'x' was not declared in this scope
   24 |     if(v[i]>x)
      |             ^
a.cc:27:15: error: 'v' was not declared in this scope
   27 |   printf("%d",v[i-1]);
      |               ^
Language: C++

#include <bits/stdc++.h>

int main()
{
   vector<int > v;
  int i;
  for(i=1;i<=31;++i)
  {
    v.push_back(i*i);
  }
  
  for(i=1;i<=10;++i)
  {
    v.push_back(i*i*i);
  }
  
  for(i=1;i<=5;++i)
  {
    v.push_back((i*i*i*i));
  }
  
  for(i=0;i<v.size();++i)
  {
    if(v[i]>x)
        break;
  }
  printf("%d",v[i-1]);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:4: error: 'vector' was not declared in this scope
    5 |    vector<int > v;
      |    ^~~~~~
a.cc:5:4: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:5:11: error: expected primary-expression before 'int'
    5 |    vector<int > v;
      |           ^~~
a.cc:9:5: error: 'v' was not declared in this scope
    9 |     v.push_back(i*i);
      |     ^
a.cc:14:5: error: 'v' was not declared in this scope
   14 |     v.push_back(i*i*i);
      |     ^
a.cc:19:5: error: 'v' was not declared in this scope
   19 |     v.push_back((i*i*i*i));
      |     ^
a.cc:22:13: error: 'v' was not declared in this scope
   22 |   for(i=0;i<v.size();++i)
      |             ^
a.cc:24:13: error: 'x' was not declared in this scope
   24 |     if(v[i]>x)
      |             ^
a.cc:27:15: error: 'v' was not declared in this scope
   27 |   printf("%d",v[i-1]);
      |               ^
Language: Java

import java.util.Scanner;

class Main{
	public static void main(String args[]){
		int x, a, b, c;
		int n = 1;
		Scanner sc = new Scanner(System.in);
		x = sc.nextInt();
		if(x == 1){
			System.out.print(1);
			return;
		}
		for(int i = 2; i < 34; i++){
			b = i;
			while(b * b =< x){
              b *= b;
			  if(n =< b){
				  n = b;
			  }
			}
		}
		System.out.print(n);
	}
}


Compiler output:
Main.java:15: error: > or ',' expected
			while(b * b =< x){
			                ^
Main.java:17: error: > or ',' expected
			  if(n =< b){
			           ^
2 errors
Language: Java

import java.util.Scanner;

class test{
	public static void main(String args[]){
		int x, a, b, c;
		int n = 1;
		Scanner sc = new Scanner(System.in);
		x = sc.nextInt();
		if(x == 1){
			System.out.print(1);
			return;
		}
		for(int i = 2; i < 34; i++){
			b = i;
			while(b * b =< x){
              b *= b;
			  if(n =< b){
				  n = b;
			  }
			}
		}
		System.out.print(n);
	}
}


Compiler output:
Main.java:15: error: > or ',' expected
			while(b * b =< x){
			                ^
Main.java:17: error: > or ',' expected
			  if(n =< b){
			           ^
2 errors
Language: Java

import java.util.Scanner;

class test{
	public static void main(String args[]){
		int x, a, b, c;
		int n = 1;
		Scanner sc = new Scanner(System.in);
		x = sc.nextInt();
		if(x == 1){
			System.out.print(1);
			return;
		}
		for(int i = 2; i < 34; i++){
			b = i;
			while(b * b < x){
              b *= b;
			  if(n =< b){
				  n = b;
			  }
			}
		}
		System.out.print(n);
	}
}


Compiler output:
Main.java:17: error: > or ',' expected
			  if(n =< b){
			           ^
1 error
Language: Java

import java.util.Scanner;

class Main{
	public static void main(String args[]){
		int x, a, b, c;
		int n = 1;
		Scanner sc = new Scanner(System.in);
		x = sc.nextInt();
		if(x == 1){
			System.out.print(1);
			return;
		}
		for(int i = 2; i < 34; i++){
			b = i;
			while(b *= b < x){
			}
			if(n < b){
				n = b;
			}
		}
		System.out.print(n);
	}
}

Compiler output:
Main.java:15: error: bad operand types for binary operator '*'
			while(b *= b < x){
			        ^
  first type:  int
  second type: boolean
1 error
Language: Java

import java.util.Scanner;

class Main{
	public static void main(String args[]){
		int x, a, b, c;
		int n = 1;
		Scanner sc = new Scanner(System.in);
		x = sc.nextInt();
		if(x == 1){
			System.out.print(1);
			return;
		}
		for(int i = 2; i < 34; i++){
			b = i;
			while(b < x)){
				b *= b;
			}
			if(n < b){
				n = b;
			}
		}
		System.out.print(n);
	}
}

Compiler output:
Main.java:15: error: illegal start of expression
			while(b < x)){
			            ^
1 error
Language: C

#include <stdio.h>
#include <math.h>
double logn(int base,double antilog){
  return log(antilog)/log(double(base))
}

int main(){
  int x;
  scanf("%d",&x);
  for(int i=0;i<x;i++){
    judge_num = x-i;
    for(int j=1;j<=judge_num;j++){
      if(ceil(log(j,judge_num))==floor(log(j,judge_num)) printf("%d",judge_num);
         }
  return 0;
}


Compiler output:
main.c: In function 'logn':
main.c:4:27: error: expected expression before 'double'
    4 |   return log(antilog)/log(double(base))
      |                           ^~~~~~
main.c:4:40: error: expected ';' before '}' token
    4 |   return log(antilog)/log(double(base))
      |                                        ^
      |                                        ;
    5 | }
      | ~                                       
main.c: In function 'main':
main.c:11:5: error: 'judge_num' undeclared (first use in this function)
   11 |     judge_num = x-i;
      |     ^~~~~~~~~
main.c:11:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:15: error: too many arguments to function 'log'
   13 |       if(ceil(log(j,judge_num))==floor(log(j,judge_num)) printf("%d",judge_num);
      |               ^~~
In file included from /usr/include/features.h:523,
                 from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:28,
                 from main.c:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:122:1: note: declared here
  122 | __MATHCALL_VEC (log,, (_Mdouble_ __x));
      | ^~~~~~~~~~~~~~
main.c:13:40: error: too many arguments to function 'log'
   13 |       if(ceil(log(j,judge_num))==floor(log(j,judge_num)) printf("%d",judge_num);
      |                                        ^~~
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:122:1: note: declared here
  122 | __MATHCALL_VEC (log,, (_Mdouble_ __x));
      | ^~~~~~~~~~~~~~
main.c:13:57: error: expected ')' before 'printf'
   13 |       if(ceil(log(j,judge_num))==floor(log(j,judge_num)) printf("%d",judge_num);
      |         ~                                               ^~~~~~~
      |                                                         )
main.c:14:10: error: expected expression before '}' token
   14 |          }
      |          ^
main.c:16:1: error: expected declaration or statement at end of input
   16 | }
      | ^
Language: C++

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

int main() {
  int x;
  cin >> x;
  int a=1;
  for (int i=2;i*i<=x;i++){
    int t=i*i;
    while (t<=x) {
      ans=max(a,t);
      t*=i;
    }
  }
  cout << a << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |       ans=max(a,t);
      |       ^~~
      |       abs
Language: C++

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

int main() {
  int x;
  cin >> x;
  int a=1;
  for (int i=2;i*i<=x;i++){
    int t=i*i;
    while (tmp <= x) {
      ans=max(a,t);
      t*=i;
    }
  }
  cout << a << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   10 |     while (tmp <= x) {
      |            ^~~
      |            tm
a.cc:11:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |       ans=max(a,t);
      |       ^~~
      |       abs
Language: Java

import java.util.scanner;

class Main{
	public static void main(String args[]){
		int x, a, b;
		Scanner sc = new Scanner(System.in);
		x = sc.nextInt();
		b = x;
		while(b > 2) {
			b -= 1;
			a = b;
			while(a > 0) {
				a -= b;
				if(a == 0) {
					System.out.println(b);
				}
			}
		}
	}
}

Compiler output:
Main.java:1: error: cannot find symbol
import java.util.scanner;
                ^
  symbol:   class scanner
  location: package java.util
Main.java:6: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
3 errors
Language: Java

import java.util.Scanner;

class Main{
	public static void main(String args[]){
		int x,y,i,j;
		Scanner sc = new Scanner(System.in);

		x = sc.nextInt();
		i = j = 0;

		while(true){
			if (i * j <= x && x > y) y = x;
			else break; 
			j++;
		}
	}
}

Compiler output:
Main.java:12: error: variable y might not have been initialized
			if (i * j <= x && x > y) y = x;
			                      ^
1 error
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <fstream>
#include <string>
#include <math.h>
#include <cstdlib>
#include <istream>
#include <sstream>
#include <cctype>
#define fore(i,x,y) for(ll i=(x);i<(y);i++)
#define disp(a) cout << a << endl;
typedef long long ll;
using namespace std;
int main()
{
	int x,ANS=0;
	cin >> x;
	if (x <= 3) {
		disp("1");
	}
	else {
		for (int i = 2; i <= 32; i++) {
			for (int j = 2; pow(i, j) <= x; j++) {
				if (ANS <= pow(i, j))ANS = pow(i, j);
			}
		}
		disp(ANS);
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:10: error: expected '}' at end of input
   29 |         }
      |          ^
a.cc:16:1: note: to match this '{'
   16 | {
      | ^
Language: C++

#pragma gcc optimize("Ofast")
#include <bits/stdc++.h>

using namespace std;
using ll = long long;

#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(V) (V).begin(),(V).end()
#define SORT(V) sort(ALL(V)) //小さい方からソート
#define REV(V) reverse(ALL(V)) //リバース
#define RSORT(V) SORT(V);REV(V) //大きい方からソート
#define NPN(V) next_permutation(ALL(V)) //順列
#define pb(n) push_back(n)
#define endl '\n'
#define Endl '\n'
#define DUMP(x)  cout << #x << " = " << (x) << endl
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define Yay(n) cout << ((n) ? "Yay!": ":(") << endl
#define RAPID cin.tie(0);ios::sync_with_stdio(false)
#define VSUM(V) accumulate(ALL(V), 0)
#define MID(a,b,c) (a) < (b) && (b) < (c)
#define MIDe(a,b,c) (a) <= (b) && (b) <= (c)
#define IN(n) cin >> n
#define IN2(a,b) cin >> a >> b
#define IN3(a,b,c) cin >> a >> b >> c 
#define IN4(a,b,c,d) cin >> a >> b >> c >> d
#define VIN(V) for(int i = 0; i < (V).size(); i++) {cin >> (V).at(i);}
#define OUT(n) cout << n << endl
#define VOUT(V) REP(i, (V).size()) {cout << (V)[i] << endl;}
#define VOUT2(V) REP(i, (V).size()) {cout << (V)[i] << " ";} cout<<endl;

// 型マクロ定義
#define int long long
#define P pair<ll,ll>
#define Vi vector<ll>
#define Vd vector<double>
#define Vs vector<string>
#define Vc vector<char>
#define M map<ll,ll>
#define S set<ll>
#define PQ priority_queue<ll>
#define PQG priority_queue<ll,V,greater<ll>
//

const int MOD = 1000000007;
const int INF = 1061109567;
const double EPS = 1e-10;
const double PI  = acos(-1.0);

int gcd(int a,int b){return b != 0 ? gcd(b, a % b) : a;} //最大公約数
int lcm(int a, int b){return a * b / gcd(a, b);}
string toStrUp(string str){char diff = 'A'-'a';REP(i,str.size()) str[i] += diff;return str;}
string gCh(string str, int key){return str.substr(key,1);}

signed main() {
  RAPID;
  // デフォルト変数定義
  int n=0,m=0,a=0,b=0,c=0,d=0,x=0,y=0,z=0;
  string s="",t="";
  //

  // ここから
  IN(x);
  Vb expo(x+1);
  expo[1] = true;
  FOR(i,2,x+1){
    int v = i * i;
    while(v <= x){
      expo[v] = true;
      v *= i;
    }
  }
  for(int i = x; i >= 1; i--){
    if(expo[i]) OUT(i);
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:66:3: error: 'Vb' was not declared in this scope; did you mean 'b'?
   66 |   Vb expo(x+1);
      |   ^~
      |   b
a.cc:67:3: error: 'expo' was not declared in this scope; did you mean 'expl'?
   67 |   expo[1] = true;
      |   ^~~~
      |   expl
Language: C++

X = int(input())

ans = 0

for i in range(2, 51):

 tmp = i

 while tmp * i < X + 1:

  tmp = tmp * i

  ans = max(ans, tmp)

print(ans)

Compiler output:
a.cc:1:1: error: 'X' does not name a type
    1 | X = int(input())
      | ^
Language: C++

x = int(input())

ans = 0

for i in range(2, 51):

 tmp = i

 while tmp * i < x + 1:

  tmp = tmp * i

  ans = max(ans, tmp)

print(ans)

Compiler output:
a.cc:1:1: error: 'x' does not name a type
    1 | x = int(input())
      | ^
Language: C++

//#include <bits/stdc++.h>
#include <iostream>
#include <algorithm>
#include <climits>
#include <cmath>

using namespace std;

#define rep(i , n) for(int i=0 ; i<n ; i++)
#define rep1(i , n) for(int i=1 ; i<=n ; i++)

typedef long long int ll;


int main()
{
	ios_base :: sync_with_stdio(false);
	cin.tie(NULL);

	int n;
	cin >> n;

	for(int i=n ; i>=1 ; i--)
	{
		int temp = sqrt(i);
		if(temp*temp == i)
		{
			cout << i;
			break;
		}
	}
	return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:32:18: error: expected '}' at end of input
   32 |         return 0;
      |                  ^
a.cc:16:1: note: to match this '{'
   16 | {
      | ^
Language: C++

#include<iostream>
using namespace std;
int main(){
int a,k;
cin>>a;      
for(int i=1;;i++){
if(i*i>a)k=i-1,break;
}
cout<<k*k<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expected primary-expression before 'break'
    7 | if(i*i>a)k=i-1,break;
      |                ^~~~~
Language: C++

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

int main(void){
int N;
scanf("%d",&N);
printf("%d\n",pow((int)sqrt(N),2))
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:35: error: expected ';' before 'return'
    7 | printf("%d\n",pow((int)sqrt(N),2))
      |                                   ^
      |                                   ;
    8 | return 0;
      | ~~~~~~
Language: C++

int main(){
    int n;
    cin>>n;
    int j;
    for(int i=1;i*i<=n;i++){
        int f=n;
        while(f%i==0){
            f/=i;
            if(f==i){
                j=i;
                break;
            }
        }
    }
    cout<<j;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin>>n;
      |     ^~~
a.cc:15:5: error: 'cout' was not declared in this scope
   15 |     cout<<j;
      |     ^~~~
Language: C++

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

int main()
{
 int x;
  cin>>n;
  int y=sqrt(x);
  cout<<y*y<<"\n";
  
  
  return 0;
}

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

#include <iostream>
#include<string>
#include<stdio.h>
using namespace std;
int main(void){
	int a;
	int N;
	int max=0;
	scanf_s("%d", &N);
	if (N == 1) {
		printf("1");
		return 0;
	}
	for (int i = 1;i<N;i++) {
		a = i;
		for (int j = 1;1;j++)a *= i;
		if (a > N) {
			if (a > max)max = a/i;
			break;
		}
	}
	printf("%d", max);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    9 |         scanf_s("%d", &N);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <iostream>
#include<string>
#include<stdio.h>
using namespace std;
int main(void){
	int a;
	int N;
	scanf_s("%d", &N);
	if (N == 1) {
		printf("1");
		return 0;
	}
	for (int i = 0;1;i++) {
		if (i * i > N) {
			a = (i - 1)*(i - 1);break;
		}

	}
	printf("%d", a);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    8 |         scanf_s("%d", &N);
      |         ^~~~~~~
      |         scanf
Language: C++

#include<iostream>
using namespace std;
int main(void) {
	//入力
	int x;
	cin >> x;
	bool power[1001];
	//初期化
	for (int i(1); i <= x; i++) {
		power[i] = false;
	}
	//べき乗をtrueにする
	power[1] = true;
	for (int i(2); i <= 31; i++) {
		if (!(i == 2 || i == 3 || i == 5 || i == 7 || i == 11 || i == 13 || i == 17 || i == 19 || i == 23 || i == 29 || i == 31))continue;
		for (int j(1); j <= 10; j++) {
			if (pow(i,j) >= x)break;
			else power[(int)pow(i,j)] = true;
		}
	}
	//trueの中で最大のべき乗を探す
	for (int i(x); i > 0; i--) {
		if (power[i] == true) {
			cout << i << endl;
			break;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:29: error: 'pow' was not declared in this scope; did you mean 'power'?
   17 |                         if (pow(i,j) >= x)break;
      |                             ^~~
      |                             power
Language: C++

#include "bits/stdc++.h"
using namespace std;
#define Would
#define you
#define all(n)  n.begin(),n.end()
#define rall(n) n.rbegin(),n.rend()
typedef long long ll;
const ll INF = 1e18;
const ll MOD = 1e9 + 7;
const double EPS = 1e-10;
const double pi = acos(-1);//3.1415926535897932384626433832795028...
const ll SIZE = 1 << 17;
int dx[] = { 1,0,-1,0 }, dy[] = { 0,1,0,-1 }, alp[30];
ll fac[200005], finv[200005], inv[200005];
vector<ll>dij;
struct edge { ll to, cost; };
vector<vector<edge> >G;

ll mod_pow(ll a, ll b) {
	ll res = 1, mul = a;
	for (int i = 0; i < 31; ++i) {
		if (b >> i & 1) {
			res *= mul;
			res %= MOD;
		}
		mul = (mul * mul) % MOD;
	}
	return res;
}

void addedge(int from, int to, int cost) {
	G[from].push_back({ to,cost });
	G[to].push_back({ from,cost });
}

template<typename T>
vector<T> make_v(size_t a) { return vector<T>(a); }

template<typename T, typename... Ts>
auto make_v(size_t a, Ts... ts) {
	return vector<decltype(make_v<T>(ts...))>(a, make_v<T>(ts...));
}

template<typename T, typename V>
typename enable_if<is_class<T>::value == 0>::type
fill_v(T & t, const V & v) { t = v; }

template<typename T, typename V>
typename enable_if<is_class<T>::value != 0>::type
fill_v(T & t, const V & v) {
	for (auto& e : t) fill_v(e, v);
}

template<typename T>
void outp(vector<T>v) {
	for (int i = 0; i < v.size(); ++i) {
		cout << v[i];
		if (i != v.size() - 1) { cout << " "; }
	}
}

double add(double a, double b) {
	if (abs(a + b) < EPS * (abs(a) + abs(b))) { return 0; }
	return a + b;
}


int n, an = 1s;
int main() {
	cin >> n;
	for (int i = 2; i <= sqrt(n); ++i) {
		for (int j = pow(i, 2); j <= n; j *= i) { ans = max(ans, j); }
	}
	cout << ans << endl;
}

Compiler output:
a.cc:68:13: error: cannot convert 'std::chrono::seconds' {aka 'std::chrono::duration<long int>'} to 'int' in initialization
   68 | int n, an = 1s;
      |             ^~
      |             |
      |             std::chrono::seconds {aka std::chrono::duration<long int>}
a.cc: In function 'int main()':
a.cc:72:59: error: 'ans' was not declared in this scope; did you mean 'an'?
   72 |                 for (int j = pow(i, 2); j <= n; j *= i) { ans = max(ans, j); }
      |                                                           ^~~
      |                                                           an
a.cc:74:17: error: 'ans' was not declared in this scope; did you mean 'an'?
   74 |         cout << ans << endl;
      |                 ^~~
      |                 an
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <cmath>
#include <queue>
#include <numeric>

using namespace std;
#define repp(i,a,b) for(int i = (int)(a) ; i < (int)(b) ; ++i)
#define reppe(i,a,b) for(int i = (int)(a) ; i <= (int)(b) ; ++i)
#define repm(i,a,b) for(int i = (int)(a) ; i > (int)(b) ; --i)
#define repme(i,a,b) for(int i = (int)(a) ; i >= (int)(b) ; --i)

typedef long long ll;

long long GCD(long long a, long long b){if(b==0)return a;return GCD(b,a%b);}

int main() {
    int X; cin >> X;
    int res = 0;
    for(int i = 0; i * i < N; ++i) res = i * i;
    cout << res << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:28: error: 'N' was not declared in this scope
   23 |     for(int i = 0; i * i < N; ++i) res = i * i;
      |                            ^
Language: C++

max_beki = max(max_beki, );#include <bits/stdc++.h>
using namespace std;
int main()
{
    int x;
    cin >> x;

    int two_pow = 1;
    while(x >= two_pow*two_pow){
        two_pow++;
    }
    int beki = 2;
    int max_beki = 0;
    while(beki*beki <= x){
        int tmp;
        int count = 2;
        while(tmp <= x){
            tmp = pow(beki, count);
            count++;
            if(tmp <= x){
                max_beki = max(max_beki, tmp);
            }
        }
        beki++;
    }
    
    cout << max(max_beki, (two_pow-1)*(two_pow-1));
    return 0;
}

Compiler output:
a.cc:1:28: error: stray '#' in program
    1 | max_beki = max(max_beki, );#include <bits/stdc++.h>
      |                            ^
a.cc:1:1: error: 'max_beki' does not name a type
    1 | max_beki = max(max_beki, );#include <bits/stdc++.h>
      | ^~~~~~~~
a.cc:1:29: error: 'include' does not name a type
    1 | max_beki = max(max_beki, );#include <bits/stdc++.h>
      |                             ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin >> x;
      |     ^~~
a.cc:18:19: error: 'pow' was not declared in this scope
   18 |             tmp = pow(beki, count);
      |                   ^~~
a.cc:21:28: error: 'max' was not declared in this scope
   21 |                 max_beki = max(max_beki, tmp);
      |                            ^~~
a.cc:27:5: error: 'cout' was not declared in this scope
   27 |     cout << max(max_beki, (two_pow-1)*(two_pow-1));
      |     ^~~~
a.cc:27:13: error: 'max' was not declared in this scope
   27 |     cout << max(max_beki, (two_pow-1)*(two_pow-1));
      |             ^~~
Language: C++

#include<stdio.h>
int main(void){
int a,p[31],x,max = 0
scanf("%d",&x);
p[0] = 1;
for (int i = 2;i <= 31;i++){
    a = i;
    if(a*i<=x){
    while(a*i <= x){
        a = a*i;
    }    
    }    
    else{
        a = 1;
    }
    p[i-1] = a;
	}
	for(int j=0;j<31;j++){
      if(max <= p[j]){
  	  max = p[j];
	    }
	}

	if(x == 1){
 	   printf("%d\n",p[0]);
	}
	else if(x > 1){
    	printf("%d\n",max);
	}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:1: error: expected ',' or ';' before 'scanf'
    4 | scanf("%d",&x);
      | ^~~~~
Language: C++

//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#include <numeric>
typedef long long Int;
#define rep(i,a,b) for(Int i=a;i<b;++i)
#define rrep(i,a,b) for(Int i=a;i>=b;--i)
using namespace std;

int main() {
    cin.tie(0); cout.tie(0);
    ios::sync_with_stdio(false);

    int X; cin >> X;
    int res = 1;
    for (int b = 1; b*b <= X; ++b) {
      int p = 2;
      int bp = b*b;
      while (bp <= x) {
        res = max(res, bp);
        bp *= b;
      }
    }
  
    cout << res << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:20: error: 'x' was not declared in this scope
   18 |       while (bp <= x) {
      |                    ^
Language: C++

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

int main(){
  int a;
 
    cin>>a;
 
  
  for(int i=a; i>=0;i--){
     for(int j =0;j<32 ;j++){
   if(i == j*j){
     cout << j*j <<endl;
     return 0;
   }
    if(i ==j*j*j){
      cout << j*j*j << endl;
      return 0;
    }
       if(i == j*j*j*j*j){
         cout << i << endl;
         return 0;
       }
       if( i == j*j*j*j*j*j*j){
         cout << i << endl;
         return 0;
       }
     }
    return 0;
  }


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

import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        int g = 0;
        for (int b = 1; a <= x; a++) {
            for (int p = 2; b <= x; b++) {
                if (a * b > x) {
                    break;
                } else {
                    g = (int)Math.pow(b,p);
                }
            }
        }
        System.out.print(g);
        sc.close();
    }
}

Compiler output:
Main.java:8: error: cannot find symbol
        for (int b = 1; a <= x; a++) {
                        ^
  symbol:   variable a
  location: class Main
Main.java:8: error: cannot find symbol
        for (int b = 1; a <= x; a++) {
                                ^
  symbol:   variable a
  location: class Main
Main.java:10: error: cannot find symbol
                if (a * b > x) {
                    ^
  symbol:   variable a
  location: class Main
3 errors
Language: Java

import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        int g = 0;
        for (int b = 1; a <= x; a++) {
            for (int p = 2; b <= x; b++) {
                if (a * b > x) {
                    break;
                } else {
                    g = (int)Math.pow(a,b);
                }
            }
        }
        System.out.print(g);
        sc.close();
    }
}

Compiler output:
Main.java:8: error: cannot find symbol
        for (int b = 1; a <= x; a++) {
                        ^
  symbol:   variable a
  location: class Main
Main.java:8: error: cannot find symbol
        for (int b = 1; a <= x; a++) {
                                ^
  symbol:   variable a
  location: class Main
Main.java:10: error: cannot find symbol
                if (a * b > x) {
                    ^
  symbol:   variable a
  location: class Main
Main.java:13: error: cannot find symbol
                    g = (int)Math.pow(a,b);
                                      ^
  symbol:   variable a
  location: class Main
4 errors