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

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

#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384


int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} 
int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;}    //最大公約数
int lcm(int a,int b){int c=gcd(a,b);a/=c;return a*b;}     //最小公倍数
int nCr(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;} //コンビネーション
int nHr(int a,int b){return nCr(a+b-1,b);}       // 重複組み合わせ
int fact(int a){int i,r=1;for(i=1;i<=a;i++){r*=i;}return r;}  //階乗
int pow(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} // a~bまでの階乗
int dsum(int x){int r=0;while(x){r+=(x%10);x/=10;}return r;}   //数字の各位の和
int dsumb(int x,int b){int r=0;while(x){r+=(x%b);x/=b;}return r;}  // b進数の各位の和？
int sankaku(int x){return ((1+x)*x)/2;} //三角数 xまでの和

//以下long long ver
long long llmax(long long a,long long b){if(a>b){return a;}return b;}
long long llmin(long long a,long long b){if(a<b){return a;}return b;}
long long llzt(long long a,long long b){return llmax(a,b)-llmin(a,b);}
long long llround(long long a,long long b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;}
long long llceil(long long a,long long b){if(a%b==0){return a/b;}return (a/b)+1;}
long long llgcd(long long a,long long b){long long c;while(b!=0){c=a%b;a=b;b=c;}return a;}
long long lllcm(long long a,long long b){long long c=llgcd(a,b);a/=c;return a*b;}
long long llnCr(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;}
long long llnHr(long long a,long long b){return llnCr(a+b-1,b);}
long long llfact(long long a){long long i,r=1;for(i=1;i<=a;i++){r*=i;}return r;}
long long llpow(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=a;}return r;}
long long lldsum(long long x){long long r=0;while(x){r+=(x%10);x/=10;}return r;}
long long lldsumb(long long x,long long b){long long r=0;while(x){r+=(x%b);x/=b;}return r;}
long long llsankaku(long long x){return ((1+x)*x)/2;}

//double
double dbmax(double a,double b){if(a>b){return a;}return b;}
double dbmin(double a,double b){if(a<b){return a;}return b;}
double dbzt(double a,double b){return dbmax(a,b)-dbmin(a,b);}


typedef pair<int, int> ii;
typedef long long ll;
typedef vector<ll> vll;
typedef pair<ll,ll> pll;
#define forr(i,a,b) ; for(int i=(a); i<(b); i++)
#define clean(arr,val) memset(arr,val,sizeof(arr))
#define forn(i,n) forr(i,0,n)
#define PB push_back
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<pll> vpll;
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};

 
/*CODE START HERE*/
int main() {
  int x;
  cin >> x;
  int ans = 1;
  forr(i,2,x+1){
    int a = i*i;
    forr(j,2,11){
      if(a>x){
        continue;
      }else {
        ans= max(ans,a);
        a*=i
      }
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:70:13: error: expected ';' before '}' token
   70 |         a*=i
      |             ^
      |             ;
   71 |       }
      |       ~
Language: C++

#include <bits/stdc++.h> 
using namespace std; 
typedef long long int ll;
typedef long double ld;
typedef unsigned long long int ull;
const long long int m=pow(10,9)+7;

int main() 
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll n;
    cin>>n;
    ll ans=0;
    for(int i=1;i<=X;i++)
    {
        for(int j=2;j<=10;j++)
        {
            ll y=pow(i,j);
            if(y<=X)
                ans=max(ans,y);
        }
    }
    cout<<ans<<endl;
    return 0;
}


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

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

int main() {
  int x ;
  cin >> x;
  vector <bool> a(x+1,false);
  if ( x <=3){
    cout << 1 << endl;
    return 0;
  }
  for ( int i=2 ; i<=x ; i++){
    int v = i*i ; 
    for ( int j=2 ; j<=10 ; j++){
      if ( v > x){
        continue ;
      }else if ( v <=x){
        a.at(v)=true;
        v*=i;
      }
    }
  }
  for ( int i =x ; i>0 ; i--){
    if(a.at(i)) cout << i<< ensl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:29: error: 'ensl' was not declared in this scope
   24 |     if(a.at(i)) cout << i<< ensl;
      |                             ^~~~
Language: C++

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

int main() {
  int x ;
  cin >> x;
  vector <bool> a(x+1,false);
  if ( x <=3){
    cout << 1 << endl;
    return 0;
  }
  for ( int i=2 ; i<=x ; i++){
    int v = i*i ; 
    for ( int j=2 ; j<=10 ; j++){
      if ( v > x){
        continue ;
      }else if ( v <=x){
        a.at(v)=true;
        v*=i
      }
    }
  }
  for ( int i =x ; i>0 ; i--){
    if(a.at(i)) cout << i<< ensl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:13: error: expected ';' before '}' token
   19 |         v*=i
      |             ^
      |             ;
   20 |       }
      |       ~      
a.cc:24:29: error: 'ensl' was not declared in this scope
   24 |     if(a.at(i)) cout << i<< ensl;
      |                             ^~~~
Language: C++

#include <iostream>
#include <vector>

#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define endl "\n"

using namespace std;
using ll = long long;

const ll MOD = 1000000007LL; // = 10^9 + 7
const double PI = 3.14159265358979;

void solve()
{
  int x;
  cin >> x;
  vector<int> exps {1};
  for(int i = 2; i * i <= x; ++i)
  {
    int num = i * i;
    while(num <= x)
    {
      exps.emplace_back(num);
      num *= i;
    }
  }
  int ans = *std::max_element(exps.begin(), exps.end());
  cout << ans;
}

int main()
{
  fastio;
  solve();

  return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:27:19: error: 'max_element' is not a member of 'std'; did you mean 'tuple_element'?
   27 |   int ans = *std::max_element(exps.begin(), exps.end());
      |                   ^~~~~~~~~~~
      |                   tuple_element
Language: C++

#include <iostream>
#include <vector>

#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define endl "\n"

using namespace std;
using ll = long long;

const ll MOD = 1000000007LL; // = 10^9 + 7
const double PI = 3.14159265358979;

void solve()
{
  int x;
  cin >> x;
  vector<int> exps {1};
  for(int i = 2; i * i <= x; ++i)
  {
    int num = i * i;
    while(num <= x)
    {
      exps.emplace_back(num);
      num *= i;
    }
  }
  cout << (*std::max_element(exps.begin(), exps.end()));
}

int main()
{
  fastio;
  solve();

  return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:27:18: error: 'max_element' is not a member of 'std'; did you mean 'tuple_element'?
   27 |   cout << (*std::max_element(exps.begin(), exps.end()));
      |                  ^~~~~~~~~~~
      |                  tuple_element
Language: C++

#include <iostream>
#include <vector>

#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define endl "\n"

using namespace std;
using ll = long long;

const ll MOD = 1000000007LL; // = 10^9 + 7
const double PI = 3.14159265358979;

void solve()
{
  int x;
  cin >> x;
  vector<int> exps {1};
  for(int i = 2; i * i <= x; ++i)
  {
    int num = i * i;
    while(num <= x)
    {
      exps.emplace_back(num);
      num *= i;
    }
  }
  cout << *max_element(exps.begin(), exps.end());
}

int main()
{
  fastio;
  solve();

  return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:27:12: error: 'max_element' was not declared in this scope
   27 |   cout << *max_element(exps.begin(), exps.end());
      |            ^~~~~~~~~~~
Language: C++

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

int main(){
	int X;
	cin >> X;
	int p = sqrt(X);
	if (X == p*p) {
		cout << X << endl;
		return 0;
	}
	int ans = 1;
	for (int i = 2; i <= p; i++) {
		int test = 1;
		int j = 2;
		while (test <= X) {
			test = pow(i,j);
			j++;
		}
		ans = max(ans,test/i);
	}
	cout << ans << endl;

	return 0;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope
    8 |         cin >> X;
      |         ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | include <bits/stdc++.h>
a.cc:9:17: error: 'sqrt' was not declared in this scope
    9 |         int p = sqrt(X);
      |                 ^~~~
a.cc:11:17: error: 'cout' was not declared in this scope
   11 |                 cout << X << endl;
      |                 ^~~~
a.cc:11:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:30: error: 'endl' was not declared in this scope
   11 |                 cout << X << endl;
      |                              ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | include <bits/stdc++.h>
a.cc:19:32: error: 'pow' was not declared in this scope
   19 |                         test = pow(i,j);
      |                                ^~~
a.cc:22:23: error: 'max' was not declared in this scope
   22 |                 ans = max(ans,test/i);
      |                       ^~~
a.cc:24:9: error: 'cout' was not declared in this scope
   24 |         cout << ans << endl;
      |         ^~~~
a.cc:24:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:24:24: error: 'endl' was not declared in this scope
   24 |         cout << ans << endl;
      |                        ^~~~
a.cc:24:24: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: Java

mport java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        ArrayList<Integer> list = new ArrayList<>();
        list.add(1);
        for (int i = 2; i <= a; i++) {
            int tmp = 0;
            int count = 2;
            while(tmp <= a) {
                tmp = (int) Math.pow(i, count);
                if(tmp <= a) {
                    count++;
                    list.add(tmp);
                }
            }
        }
        System.out.println(Collections.max(list));
    }
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.ArrayList;
^
Main.java:2: error: class, interface, enum, or record expected
import java.util.Collections;
^
Main.java:3: error: class, interface, enum, or record expected
import java.util.Scanner;
^
3 errors
Language: C++


#include <stdio.h>
#include <string.h>
#include <limits.h>
#include <math.h>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <bitset>

typedef unsigned long long ULLONG;
typedef long long LLONG;
static const LLONG MOD_NUM = 1000000007; //998244353;

template<class _T> static void get(_T& a) {
	std::cin >> a;
}
template<class _T> static void get(_T& a, _T& b) {
	std::cin >> a >> b;
}
template<class _T> static void get(_T& a, _T& b, _T& c) {
	std::cin >> a >> b >> c;
}

static void D();

int main()
{
	D();
	fflush(stdout);
	return 0;
}

static void D()
{
	int X;
	get(X);
	
	int base = 1, exp = 0, ans = 1;
	for (base = 1; base <= X; base++) {
		for (exp = 2; exp <= X; exp++) {
			int tmp = tp_pow<int>(base, exp);
			if (tmp > X) break;
			ans = std::max(ans, tmp);
		}
	}
	printf("%d\n", ans);
}


Compiler output:
a.cc: In function 'void D()':
a.cc:48:35: error: 'tp_pow' was not declared in this scope
   48 |                         int tmp = tp_pow<int>(base, exp);
      |                                   ^~~~~~
a.cc:48:42: error: expected primary-expression before 'int'
   48 |                         int tmp = tp_pow<int>(base, exp);
      |                                          ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
int X;
cin >>X;
vector <bool > expo(X+1);
expo[1] = 1;
for(int b=2;b<=X;b++){
int v = b*b;
while(v<=X){
expo[v] = 1;
v *= b;
}
}


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

#include<stdio.h>
int main(){
  int x[1001]={0},i,j,n;
  for(i=2;i<35)for(j=i*i;j<1001;j*=i)x[j]=1;x[1]=1
  scanf("%d",&n);
  for(i=n;i>0;i--)if(x[i]){printf("%d",i);return 0;}
}


Compiler output:
main.c: In function 'main':
main.c:4:15: error: expected ';' before ')' token
    4 |   for(i=2;i<35)for(j=i*i;j<1001;j*=i)x[j]=1;x[1]=1
      |               ^
      |               ;
main.c:4:51: error: expected ';' before 'scanf'
    4 |   for(i=2;i<35)for(j=i*i;j<1001;j*=i)x[j]=1;x[1]=1
      |                                                   ^
      |                                                   ;
    5 |   scanf("%d",&n);
      |   ~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N; cin>>N;
  int K=1;
  if(N<2)
    cout<<1<<endl;

  else{
    while(N>K){
      K**;
      K++;
    }
    cout<<K<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: expected primary-expression before ';' token
   11 |       K**;
      |          ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N; cin>>N;
  int K=1;
  if(N<2)
    cout<<1<<endl;

  else{
    while(N<K){
      K**;
      K++;
    }
    cout<<K<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: expected primary-expression before ';' token
   11 |       K**;
      |          ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N; cin>>N;
  int K=1;
  if(N<2)
    cout<<1<<endl;

  else{
    while(N<K){
      K**;
      K++;
    }
    cout<<K<<endl;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: expected primary-expression before ';' token
   11 |       K**;
      |          ^
a.cc:15:4: error: expected '}' at end of input
   15 |   }
      |    ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
int X;
cin >>X;
vector <bool > expo(X+1);
expo[1] = 1;
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:19:2: error: expected '}' at end of input
   19 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main(){
  int X;
  cin>>x;
  int x=sqrt(X);
  
  cout<<x*x<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: 'x' was not declared in this scope
    6 |   cin>>x;
      |        ^
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
using namespace std;


int main() {
	int X;
	cin >> X;
	vector<int> vec(X);
	
	for (int i = 0; i < X && 1 <= i; i++) {
		for (int j; j < X && 2 <= X; j++) {
			for (int k; k < X; k++){
				if (pow(i, j) <= X) {
					vec.at(k) == pow(i, j);
				}
			}
			
		}
	}
	sort(vec.begin(), vec.end());
	reverse(vec.begin(), vec.end());

	cout << vec.at(0) << endl;
	
}

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

import java.util.*;
 
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int X = sc.nextInt();
        int b; 
        int p;
        if (b == X){
            System.out.println(1);
            return;
        }
        int max = 4;
        for (b = 2; b <= X; ++b){
            for (p = 2; p <= X; ++p){
               max = (int) Math.pow(b,p); 
                if(max > X) {
                    break;
                }
            }
        }
        System.out.println(max);
    }
}

Compiler output:
Main.java:9: error: variable b might not have been initialized
        if (b == X){
            ^
1 error
Language: Java

import java.util.*;
 
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int X = sc.nextInt();
        int b; 
        int p;
        if (b == X){
            System.out.println(1);
            return;
        }
        int max = 4;
        for (b = 2; b <= X; ++b){
            for (p = 2; p <= X; ++p){
                int max = (int) Math.pow(b,p); 
                if(expo > X) {
                    break;
                }
            }
        }
        
        //出力
        System.out.println(max);
    }
}

Compiler output:
Main.java:16: error: variable max is already defined in method main(String[])
                int max = (int) Math.pow(b,p); 
                    ^
Main.java:17: error: cannot find symbol
                if(expo > X) {
                   ^
  symbol:   variable expo
  location: class Main
2 errors
Language: Java

import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int x = sc.nextInt();
    int ans = 1;
    
    for(int i=2;ans<x;i++){
      for(int j=1;j<=x;j++){
          ans = Math.pow(i,j);
      }
    }
    System.out.println(ans);
  }
}

Compiler output:
Main.java:10: error: incompatible types: possible lossy conversion from double to int
          ans = Math.pow(i,j);
                        ^
1 error
Language: Java

import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int X = sc.nextInt();
    int i=0;
    //べき乗数を探す
    for(i=X;i>0;i++){
      if(judge(i)){
        break;
      }
    }
    System.out.println(i);
  }
    //べき乗数かどうか
    private static boolean judge(int n){
      for(int i=1;i<n;i++){
        for(int j=1;j<n;j++){
          int m = (int)Math.pow(i,j);
          if(m==n){
            return true;
          }else{
            return false;
          }
        }
      }
    }
}

Compiler output:
Main.java:27: error: missing return statement
    }
    ^
1 error
Language: Java

import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int X = sc.nextInt();
    //べき乗数を探す
    for(int i=X;i>0;i++){
      if(judge(i)){
        break;
      }
    }
    System.out.println(i);
  }
    //べき乗数かどうか
    private static boolean judge(int n){
      for(int i=1;i<n;i++){
        for(int j=1;j<n;j++){
          int m = (int)Math.pow(i,j);
          if(m==n){
            return true;
          }else{
            return false;
          }
        }
      }
    }
}

Compiler output:
Main.java:12: error: cannot find symbol
    System.out.println(i);
                       ^
  symbol:   variable i
  location: class Main
1 error
Language: Java

import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int X = sc.nextInt();
    //べき乗数を探す
    for(int i=X;i>0;i++){
      if(judge(i)){
        break;
      }
    }System.out.println(i);
  }
    //べき乗数かどうか
    private static boolean judge(int n){
      for(int i=1;i<n;i++){
        for(int j=1;j<n;j++){
          int m = (int)Math.pow(i,j);
          if(m==n){
            return true;
          }else{
            return false;
          }
      }
    }
}

Compiler output:
Main.java:25: error: reached end of file while parsing
}
 ^
1 error
Language: Java

import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int X = sc.nextInt();
    //べき乗数を探す
    for(int i=X;i>0;i++){
      if(judge(i)){
        break;
      }
    }
    //べき乗数かどうか
    private static boolean judge(int n){
      for(int i=1;i<n;i++){
        for(int j=1;j<n;j++){
          int m = (int)Math.pow(i,j);
          if(m==n){
            return true;
          }else{
            return false;
          }
      }
    }
    System.out.println(i);
  }
}

Compiler output:
Main.java:13: error: illegal start of expression
    private static boolean judge(int n){
    ^
1 error
Language: Java

import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int X = sc.nextInt();
    //べき乗数を探す
    for(int i=X;i>0;i++){
      if(judge(i)){
        break;
      }
    }
    //べき乗数かどうか
   public static boolean judge(int n){
      for(int i=1;i<n;i++){
        for(int j=1;j<n;j++){
          int m = (int) Math.pow(i,j);
          if(m==n){
            return true;
          }else{
            return false;
          }
      }
    }
    System.out.println(i);
  }
}

Compiler output:
Main.java:13: error: illegal start of expression
   public static boolean judge(int n){
   ^
1 error
Language: Java

import java.util.*;
 
public class Main{
  
  public static void main (String []args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    
    for(int i = 0; i < N; i++){
        int num = i * i;
        while(num =< N){
            num *= i;
        }
    }
    System.out.println(num);
  }
}

Compiler output:
Main.java:11: error: > or ',' expected
        while(num =< N){
                      ^
1 error
Language: C++

int x;
bool isbeki[1010];

int main() {
    cin >> x;
    isbeki[1] = true;
    for (int i = 2;i<=1000; i++) {
        for (int j = 2; pow(i, j) <= 1000; j++) {
            isbeki[(int)pow(i, j)] = true;
        }
    }
    for (int i=x; i >= 0; i--) {
        if (isbeki[i]) {
            cout << i << endl;
            return 0;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin >> x;
      |     ^~~
a.cc:8:25: error: 'pow' was not declared in this scope
    8 |         for (int j = 2; pow(i, j) <= 1000; j++) {
      |                         ^~~
a.cc:14:13: error: 'cout' was not declared in this scope
   14 |             cout << i << endl;
      |             ^~~~
a.cc:14:26: error: 'endl' was not declared in this scope
   14 |             cout << i << endl;
      |                          ^~~~
Language: C++

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
#define rep(i,n) for (ll i = 0; i < (ll)(n); ++i)
#define rrep(i,j,n) for(ll i = (ll)(j); i < (ll)(n); i++)
#define mrep(i,n) for (ll i = (ll)(n-1); i > 0; i--)
#define be(v) (v).begin(), (v).end()
#define dcout cout << fixed << setprecision(20) 
ll INF = 1LL << 60;
ll mod = 1e9 + 7;

int main() {
	int n; cin >> n;
	vector<bool> s(n+1);
	s[1]=true;
	for(int i=2;i<=n;i++) {
		int v=i*i;
		while(v<=n) {
			s[v]=true;
			v*=i;
		}
	}
	mrep(i,k){
		if(s[i]) {
			cout << i << endl;
			return 0;
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:16: error: 'k' was not declared in this scope
   25 |         mrep(i,k){
      |                ^
a.cc:8:36: note: in definition of macro 'mrep'
    8 | #define mrep(i,n) for (ll i = (ll)(n-1); i > 0; i--)
      |                                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int x;
  cin >> x;
  int ans = 1;
  for(int i=2; i<=X; i++) {
    for(int j=2; j<11; j++) {
      if(pow(i,j) > x) {
        break;
      } else if(pow(i,j) <= x && pow(i,j) > ans) {
        ans = pow(i,j);
      }
    }
  }
  cout << ans << endl;
}

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

#include <bits/stdc++.h>
#define repl(i, l, r) for (ll i = l; i < r; i++)
#define rep(i, n) repl(i, 0, n)
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
using P = pair<int, int>;

int main()
{
    int x;
    cin >> x;
    int m = 0;
    int n = 0;
    bool finished = false;
    for(int b = 31; b > 0; b--) {
        for(int p = 9; p > 1; p--) {
            if(pow(b, p) <= x) {
                m = pow(b, p);
                finished = true;
                break;
            }
        }
        if(finished) break;
    }
    bool finished = false;
    for(int p = 9; p > 1; p--) {
        for(int b = 31; b > 0; b--) {
            if(pow(b, p) <= x) {
                n = pow(b, p);
                finished = true;
                break;
            }
        }
        if(finished) break;
    }
    cout << max(m, n) << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:10: error: redeclaration of 'bool finished'
   26 |     bool finished = false;
      |          ^~~~~~~~
a.cc:15:10: note: 'bool finished' previously declared here
   15 |     bool finished = false;
      |          ^~~~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(int argc, const char *argv[]) {
  int x;
  cin >> x;

  int ans = x - 1;
  for (int i = 2; i * i <= x; ++i) {
    int powi = i * i;
    for (int powi = i * i; powi <= x; pow *= i) {
      ans = min(ans, x - powi);
    }
  }
  
  cout << ans << '\n';
  return 0;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:12:46: error: overloaded function with no contextual type information
   12 |     for (int powi = i * i; powi <= x; pow *= i) {
      |                                              ^
Language: C++

#include<bits/stdc++.h>
#include<cmath>
#include<algorithm>
using namespace std;
int main(){
  int N;
  cin>>N;
  int ans=0;
  for(int i=2;i<=10;i++){
    for(int j=1;j<N;j++){
      if(pow(j,i)<=N){
        ans=max(ans,pow(j,i));
      }
    }
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: no matching function for call to 'max(int&, __gnu_cxx::__promote<double>::__type)'
   12 |         ans=max(ans,pow(j,i));
      |             ~~~^~~~~~~~~~~~~~
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:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:12:16: note:   deduced conflicting types for parameter 'const _Tp' ('int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'})
   12 |         ans=max(ans,pow(j,i));
      |             ~~~^~~~~~~~~~~~~~
/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:12:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   12 |         ans=max(ans,pow(j,i));
      |             ~~~^~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
#include<cmath>
using namespace std;
int main(){
  int N;
  cin>>N;
  int ans=0;
  for(int i=2;i<=10;i++){
    for(int j=1;j<N;j++){
      if(pow(j,i)<=N){
        ans=max(ans,pow(j,i));
      }
    }
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: no matching function for call to 'max(int&, __gnu_cxx::__promote<double>::__type)'
   11 |         ans=max(ans,pow(j,i));
      |             ~~~^~~~~~~~~~~~~~
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:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:11:16: note:   deduced conflicting types for parameter 'const _Tp' ('int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'})
   11 |         ans=max(ans,pow(j,i));
      |             ~~~^~~~~~~~~~~~~~
/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:11:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   11 |         ans=max(ans,pow(j,i));
      |             ~~~^~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin>>N;
  int ans=0;
  for(int i=2;i<=10;i++){
    for(int j=1;j<N;j++){
      if(pow(j,i)<=N){
        ans=max(ans,pow(j,i));
      }
    }
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: no matching function for call to 'max(int&, __gnu_cxx::__promote<double>::__type)'
   10 |         ans=max(ans,pow(j,i));
      |             ~~~^~~~~~~~~~~~~~
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:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:10:16: note:   deduced conflicting types for parameter 'const _Tp' ('int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'})
   10 |         ans=max(ans,pow(j,i));
      |             ~~~^~~~~~~~~~~~~~
/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:10:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   10 |         ans=max(ans,pow(j,i));
      |             ~~~^~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin>>N;
  int ans=0;
  for(int i=2;i<=10;i++){
    for(int j=1;j<N;j++){
      if(pow(j,i)<=N){
        ans=max(ans,pow(j,i));
      }
    }
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: no matching function for call to 'max(int&, __gnu_cxx::__promote<double>::__type)'
   10 |         ans=max(ans,pow(j,i));
      |             ~~~^~~~~~~~~~~~~~
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:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:10:16: note:   deduced conflicting types for parameter 'const _Tp' ('int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'})
   10 |         ans=max(ans,pow(j,i));
      |             ~~~^~~~~~~~~~~~~~
/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:10:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   10 |         ans=max(ans,pow(j,i));
      |             ~~~^~~~~~~~~~~~~~
Language: C++

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

int main() {
  vector<int> a;
  a = {1,4,8,16,32,64,128,256,512,9,27,81,243,729,25,125,625,36,216,49,343,100,1000,121,144,169,196,225,289,324,361,400,441,484,529,576,676,784,841,900,961}
  sort(a.begin(),a.end());
  int x;
  cin >> x;
  
  int max=0;
  
  for(int i=0; i<a.size(); i++){
    if(a.at(i)>x){
      break;
    }
    else{
      max=a.at(i);
    }
  }
   cout << max << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:157: error: expected ';' before 'sort'
    6 |   a = {1,4,8,16,32,64,128,256,512,9,27,81,243,729,25,125,625,36,216,49,343,100,1000,121,144,169,196,225,289,324,361,400,441,484,529,576,676,784,841,900,961}
      |                                                                                                                                                             ^
      |                                                                                                                                                             ;
    7 |   sort(a.begin(),a.end());
      |   ~~~~
Language: C++

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

int main() {
  vector<int> a:
  a = {1,4,8,16,32,64,128,256,512,9,27,81,243,729,25,125,625,36,216,49,343,100,1000,121,144,169,196,225,289,324,361,400,441,484,529,576,676,784,841,900,961}
  sort(a.begin(),a.end());
  int x;
  cin >> x;
  
  int max=0;
  
  for(int i=0; i<a.size(); i++){
    if(a.at(i)>x){
      break;
    }
    else{
      max=a.at(i);
    }
  }
   cout << max << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: found ':' in nested-name-specifier, expected '::'
    5 |   vector<int> a:
      |                ^
      |                ::
a.cc:5:15: error: 'a' has not been declared
    5 |   vector<int> a:
      |               ^
a.cc:6:5: error: qualified-id in declaration before '=' token
    6 |   a = {1,4,8,16,32,64,128,256,512,9,27,81,243,729,25,125,625,36,216,49,343,100,1000,121,144,169,196,225,289,324,361,400,441,484,529,576,676,784,841,900,961}
      |     ^
a.cc:7:8: error: 'a' was not declared in this scope
    7 |   sort(a.begin(),a.end());
      |        ^
Language: C++

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

int main() {
  vector<int> a:
  a = {1,4,8,16,32,64,128,256,512,9,27,81,243,729,25,125,625,36,216,49,343,100,1000,121,144,169,196,225,289,324,361,400,441,484,529,576,676,784,841,900,961}
  sort(a.begin(),a.end());
  int x;
  cin >> x;
  
  int max=0;
  
  for(int i=0; i<a.size(); i++){
    if(a.at(i)>x){
      break;
    }
    else{
      max=a.at(i);
    }
  }
   cout << max << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: found ':' in nested-name-specifier, expected '::'
    5 |   vector<int> a:
      |                ^
      |                ::
a.cc:5:15: error: 'a' has not been declared
    5 |   vector<int> a:
      |               ^
a.cc:6:5: error: qualified-id in declaration before '=' token
    6 |   a = {1,4,8,16,32,64,128,256,512,9,27,81,243,729,25,125,625,36,216,49,343,100,1000,121,144,169,196,225,289,324,361,400,441,484,529,576,676,784,841,900,961}
      |     ^
a.cc:7:8: error: 'a' was not declared in this scope
    7 |   sort(a.begin(),a.end());
      |        ^
Language: C++

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

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


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

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


int main()
{
	int X;
	cin>>X;
	int ans=1;
	Rep(i,2,X)
	{
		for(int j=2;pow(i,j)<=X;j++)
		{
			ans=max(ans,pow(i,j));
		}	
	}
	cout<<ans<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:32: error: no matching function for call to 'max(int&, __gnu_cxx::__promote<double>::__type)'
   17 |                         ans=max(ans,pow(i,j));
      |                             ~~~^~~~~~~~~~~~~~
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:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:17:32: note:   deduced conflicting types for parameter 'const _Tp' ('int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'})
   17 |                         ans=max(ans,pow(i,j));
      |                             ~~~^~~~~~~~~~~~~~
/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:17:32: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   17 |                         ans=max(ans,pow(i,j));
      |                             ~~~^~~~~~~~~~~~~~
Language: C++

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



int main() {
int N;
cin >> N;
for(int i = N; i > 0; i--){
for(int j = 1; j < 35;)
if(i == j*j){
    cout << i << endl;
    break;
}

}


}



Compiler output:
a.cc:3:20: error: declaration does not declare anything [-fpermissive]
    3 |  typedef long long int;
      |                    ^~~
Language: C++

#include<iostream>
#include<string>
#include<algorithm>

using namespace std;
int main() {
    int x, ans=1;
    cin >> x;
    for (int i = 2; i<x ; i++) {
        for (int j = 2; pow((double)i, (double)j) <= (double)x;j++) {
            double a=pow((double)i,(double) j);
            ans = max((int)a, ans);
       }
        
    }
    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:25: error: 'pow' was not declared in this scope
   10 |         for (int j = 2; pow((double)i, (double)j) <= (double)x;j++) {
      |                         ^~~
Language: C++

#include<iostream>
#include<string>
#include<algorithm>

using namespace std;
int main() {
    int x, ans=1;
    cin >> x;
    for (int i = 2; i<x ; i++) {
        for (int j = 2; pow((double)i, (double)j) <= x;j++) {
            double a=pow((double)i,(double) j);
            ans = max((int)a, ans);
       }
        
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:25: error: 'pow' was not declared in this scope
   10 |         for (int j = 2; pow((double)i, (double)j) <= x;j++) {
      |                         ^~~
Language: C++

import java.io.PrintWriter

fun main(args: Array<String>) {
    PrintWriter(System.out).use { out ->
        solve(out)
        out.flush()
    }
}


fun solve(out: PrintWriter) {
    val x = readInteger()
    for (i in x downTo 1) {
        val a = Math.sqrt(i.toDouble()).toInt()
        if (i == a * a) {
            println(i)
            return
        }
    }
    println(1)
}

fun readInteger() = readLine()!!.toInt()
fun readLong() = readLine()!!.toLong()
fun readStringList() = readLine()!!.split(" ")
fun readIntegerList() = readStringList().map(String::toInt)
fun readLongList() = readStringList().map(String::toLong)
fun readDoubleList() = readStringList().map(String::toDouble)


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.PrintWriter
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:11:1: error: 'fun' does not name a type
   11 | fun solve(out: PrintWriter) {
      | ^~~
a.cc:23:1: error: 'fun' does not name a type
   23 | fun readInteger() = readLine()!!.toInt()
      | ^~~