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

import java.util.Scanner;

class Rp1ABC097B {
    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 Rp1ABC097B
Main.java:8: error: cannot find symbol
        for (int b = 1; a <= x; a++) {
                                ^
  symbol:   variable a
  location: class Rp1ABC097B
Main.java:10: error: cannot find symbol
                if (a * b > x) {
                    ^
  symbol:   variable a
  location: class Rp1ABC097B
Main.java:13: error: cannot find symbol
                    g = (int)Math.pow(a,b);
                                      ^
  symbol:   variable a
  location: class Rp1ABC097B
4 errors
Language: C++

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

int main() {
  int N, S=0,;
  cin >> N;
  S = sqrt(N);
  cout << pow(S, 2) <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:14: error: expected unqualified-id before ';' token
    5 |   int N, S=0,;
      |              ^
Language: Java

import java.util.Scanner;

class Main {
  public static void main(String args[]) {
    int num;
    Scanner sc = new Scanner(System.in);

    System.err.print("num: ");
    num = sc.nextInt();

    int temporaryNum = 1;

    while (num >= temporaryNum) {
      for (int i = 1; Math.pow(i, 2) <= num; i++) {
        for (int n = 2; Math.pow(i, n) <= num; n++) {
          if (temporaryNum < Math.pow(i, n)) {
            temporaryNum = Math.pow(i, n);
          }
        }
      }
    }
    System.out.println(temporaryNum);
  }
}


Compiler output:
Main.java:17: error: incompatible types: possible lossy conversion from double to int
            temporaryNum = Math.pow(i, n);
                                   ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
    int X;
    cin >> X;
    vector<bool> expo(X+1);

    expo.at(i) = 1;

    for (int i = 1; i <= X; i ++){
        int v = i * i;
        while ( v <= X){
            expo.at(v) = 1;
            v *= i;
        }
    } 

    for (int i = X; i >= 1; i--){
        if(expo.at(i)){
            cout << i << endl;
            break;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'i' was not declared in this scope
    9 |     expo.at(i) = 1;
      |             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define int long long
signed main(){
  int a,b=1,c=0;
  cin>>a;
  for(int i=a;2<i;i++){
    int y=a;
    while(true){
      if(y%i!=0) break;
      y/=i;
      if(y==0){
        b=i,c=1;
        reakb;
      }
    }
    if(c) break;
  }
  cout<<b<<"\n";
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: 'reakb' was not declared in this scope
   16 |         reakb;
      |         ^~~~~
Language: C

#include <stdio.h>

int main(void){

	int n, k = 2;

	scan("%d", &n);

	if (n == 1) printf("1");



do{

	k =2; 
	do{
		while(1){
			n<=k ? break : k*=k;
		}

		if(n == k) {
			printf("%d", n);
			break;
		}else k++;

	}while(k < n-1);

	n--;
}while(n>0);

	return 0;

}

Compiler output:
main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'scan'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    7 |         scan("%d", &n);
      |         ^~~~
      |         scanf
main.c:18:32: error: expected expression before 'break'
   18 |                         n<=k ? break : k*=k;
      |                                ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int X, a,b;
    cin >> X;
    for(int i = 1; i < float sqrt(X) ; i++){
       a = i * i;
       b = max(a,1);
    }
    cout << b << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:24: error: expected primary-expression before 'float'
    6 |     for(int i = 1; i < float sqrt(X) ; i++){
      |                        ^~~~~
a.cc:6:23: error: expected ';' before 'float'
    6 |     for(int i = 1; i < float sqrt(X) ; i++){
      |                       ^~~~~~
      |                       ;
a.cc:6:24: error: expected primary-expression before 'float'
    6 |     for(int i = 1; i < float sqrt(X) ; i++){
      |                        ^~~~~
a.cc:6:23: error: expected ')' before 'float'
    6 |     for(int i = 1; i < float sqrt(X) ; i++){
      |        ~              ^~~~~~
      |                       )
a.cc:6:40: error: 'i' was not declared in this scope
    6 |     for(int i = 1; i < float sqrt(X) ; i++){
      |                                        ^
Language: C++

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

int main(){
    int x, a;
    int ma = 1;
    cin >> x;

    for(int i = 2; i < n; i++){
        a = i * i;
        while(1){
            if(a > x) break;
            ma = max(ma, a);
            a *= i;
        }
    }

    cout << ma << endl;

    cout << endl;
}

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

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
 
int main() {
  int x,i,ans1,ans2;
  cin>>x;
  rep(i,1000){
    if(i*i>x){
      break;
    }
    ans1=i*i;
  }
  rep(i,1000){
    if(i*i*i>x){
      break;
    }
    ans2=i*i*i;
  }
  rep(i,1000){
    if(i*i*i*i*i>x){
      break;
    }
    ans3=i*i*i*i*i;
  }
  cout<<max({ans1,ans2,ans3})<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:5: error: 'ans3' was not declared in this scope; did you mean 'ans2'?
   25 |     ans3=i*i*i*i*i;
      |     ^~~~
      |     ans2
a.cc:27:24: error: 'ans3' was not declared in this scope; did you mean 'ans2'?
   27 |   cout<<max({ans1,ans2,ans3})<<endl;
      |                        ^~~~
      |                        ans2
a.cc:27:12: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   27 |   cout<<max({ans1,ans2,ans3})<<endl;
      |         ~~~^~~~~~~~~~~~~~~~~~
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:   candidate expects 2 arguments, 1 provided
/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, 1 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:   template argument deduction/substitution failed:
/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:   candidate expects 2 arguments, 1 provided
Language: C++

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

int main(){
  int X;
  cin>>X;
  
  vector<bool> expo(X+1);
  expo[1] = true;
  
  rep(i,2,X){
    int a = b*b; 
    while(a<=X){
      expo[a] = true; 
      a *= 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:13:13: error: 'b' was not declared in this scope
   13 |     int a = b*b;
      |             ^
Language: C++

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

int main(){
  int X;
  cin>>X;
  
  vector<bool> expo(X+1);
  expo[1] = true;
  
  rep(i,2,X){
    int a = b*b; 
    while(a<=X){
      expo[a] = true; 
      a *= 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:13:13: error: 'b' was not declared in this scope
   13 |     int a = b*b;
      |             ^
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<bits/stdc++.h>
#include<cmath>
#include<bitset>
#define ll long long
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define FFOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define RREP(i,n)  FFOR(i,0,n)
#define SORT(V) sort((V).begin(),(V).end())
#define REVERSE(V) reverse((V).begin(),(V).end())
#define INF ((1LL<<62)-(1LL<<31))
#define MOD 1000000007
using namespace std;

int main(){
  int X,ans=1;
  cin>>X;
  FOR(i,2,sqrt(X)+1){
    FOR(j,2,sqrt(X)+1){
      if(X>=pow(i,j) && pow(i,j)>=ans) ans=pow(i,j);
    }
  }
  cout<<ans<<Endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:14: error: 'Endl' was not declared in this scope
   27 |   cout<<ans<<Endl;
      |              ^~~~
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<cmath>
#include<cstdlib>
#include<tuple>
#include<iomanip>
#include<map>
#include<queue>
#define int long long
using namespace std;
const int INF = 1e10;
const int ZERO = 0;

signed main() {
	int N;
	cin >> N;
	int ret = 0;
	for(int i = 1;i < N + 1;i++) {
		for(int j = 2;j < 11;j++) {
			if(pow(i,j) <= N) {
				ret = max(ret,pow(i,j));
			}
		}
	}
	cout << ret << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:42: error: no matching function for call to 'max(long long int&, __gnu_cxx::__promote<double>::__type)'
   23 |                                 ret = max(ret,pow(i,j));
      |                                       ~~~^~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:23:42: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'})
   23 |                                 ret = max(ret,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,
                 from a.cc:4:
/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:23:42: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   23 |                                 ret = max(ret,pow(i,j));
      |                                       ~~~^~~~~~~~~~~~~~
Language: C++

# util functions

# debug
$debugFlag = ( ARGV[0] != nil )
p "==== DEBUG MODE ====" if $debugFlag

def pd(str)
  p str if $debugFlag
end

def printd(str)
  print str if $debugFlag
end

# input
inputs = []
lc = 0
while l = $stdin.gets do
  if false
    inputs << l.chomp.split(" ").map(&:to_s)
  else
    inputs << l.chomp.split(" ").map(&:to_i)
  end
  lc += 1
end

# input check
if $debugFlag
  p "--- INPUT (begin) ---"
  inputs.each do |l_i|
    p l_i
  end
  p "--- INPUT (end) ---"
  print "\n"
end

nn = inputs[0][0]

# body
if $debugFlag
end

ans = 4
for i in 2..nn
  tmp = i*i
  while tmp < nn
    ans = tmp if tmp > ans    
    tmp *= i
  end
end

puts ans


Compiler output:
a.cc:1:3: error: invalid preprocessing directive #util
    1 | # util functions
      |   ^~~~
a.cc:3:3: error: invalid preprocessing directive #debug
    3 | # debug
      |   ^~~~~
a.cc:15:3: error: invalid preprocessing directive #input
   15 | # input
      |   ^~~~~
a.cc:27:3: error: invalid preprocessing directive #input
   27 | # input check
      |   ^~~~~
a.cc:39:3: error: invalid preprocessing directive #body
   39 | # body
      |   ^~~~
a.cc:44:10: error: too many decimal points in number
   44 | for i in 2..nn
      |          ^~~~~
a.cc:4:1: error: '$debugFlag' does not name a type
    4 | $debugFlag = ( ARGV[0] != nil )
      | ^~~~~~~~~~
Language: C++

#include <iostream>
using namespace std;
int main(void){
    // Your code here!
    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:7:5: error: 'vector' was not declared in this scope
    7 |     vector<bool> expo(x-1);
      |     ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:7:12: error: expected primary-expression before 'bool'
    7 |     vector<bool> expo(x-1);
      |            ^~~~
a.cc:9:5: error: 'expo' was not declared in this scope
    9 |     expo[1] = 1;
      |     ^~~~
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++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define fs first
#define sc second
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

  
int main(){
  int x;
  cin>>x;
  int ans=1;
  for (int b = 2; b <= X; b++){
        int v = b * b;
        while( v<=X ){
            ans=max(ans,v);
            v *= b;
        }
    }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:24: error: 'X' was not declared in this scope
   18 |   for (int b = 2; b <= X; b++){
      |                        ^
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++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define fs first
#define sc second
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

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

Compiler output:
a.cc: In function 'int main()':
a.cc:20:29: error: no matching function for call to 'max(int&, __gnu_cxx::__promote<double>::__type)'
   20 |       if(pow(i,j)<=x)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:20:29: note:   deduced conflicting types for parameter 'const _Tp' ('int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'})
   20 |       if(pow(i,j)<=x)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:20:29: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   20 |       if(pow(i,j)<=x)ans=max(ans,pow(i,j));
      |                          ~~~^~~~~~~~~~~~~~
Language: C++

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

int main() {
  int x; 
  cin >> x;
  
  int ans = 0;
  
  int i = 1;
  int j = 2;
  
  while(i*i <= x){
    while(pow(i,j) <=x){
      ans = max(ans, pow(i,j));
      j++;
    }
    i++;
  }
  
  cout << ans << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:16: error: no matching function for call to 'max(int&, __gnu_cxx::__promote<double>::__type)'
   15 |       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:15:16: note:   deduced conflicting types for parameter 'const _Tp' ('int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'})
   15 |       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:15:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   15 |       ans = max(ans, pow(i,j));
      |             ~~~^~~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <cstring>
#include <cstdlib>
#include <string>
#include <algorithm>
#include <vector>
#define rep(i, n) for(int i = 0; i < n; i++)
using namespace std;

int asc(const void* a, const void* b) {
	return *(int*)a- *(int*)b;
}

int main()
{
	int x, max = 0;;
	cin >> x;
	for (int i = 1; i <= x; i++) {
		for (int j = 2; j <= x; j++) {
			if (pow(i, j) > max && pow(i, j) <= x) {
				max = pow(i, j);
			}
		}
	}
	cout << max << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:29: error: 'pow' was not declared in this scope
   20 |                         if (pow(i, j) > max && pow(i, j) <= x) {
      |                             ^~~
Language: C++

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

int main() {
  int x, i, j, ans = 1;
  cin >> x;
  
  for(i = 1; i < sqrt(x) + 1; i++){
    for(j = 2; pow(i, j) <= x; j++){
      ans = max(ans, pow(i, j));
    }
  }
  
  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(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:10:16: note:   deduced conflicting types for parameter 'const _Tp' ('int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'})
   10 |       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:10:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   10 |       ans = max(ans, pow(i, j));
      |             ~~~^~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); i++)
#define repf(i,a,b) for (int i = (a); i < (b); i++)
#define repi(i,a,b) for (int i = (a); i <= (b); i++)
#define repr(i,a,b) for (int i = (a); i >= (b); i--)
#define all(x) (x).begin(),(x).end()
#define debug(x)  cout << #x << " = " << (x) << endl;
using namespace std;
using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
using vc = vector<char>;
using vvc = vector<vc>;
using vs = vector<string>;
using tiii = tuple<int, int, int>;

ll pow(ll k, ll n) {
  if (k == 0) return 0;
  if (n == 0) return 1;
  
  int i = 0;
  while (i < n) {
    k *= k;
    i++;
  }
  return k;
}

int main() {
  int X; cin >> X;

  int b, p;
  int ans = 0;
  for (b = 1; b<=X; b++) {
    for (p = 2; p<=X ;p++) {
      if (pow(b,p)<=X)
        ans = max(ans, <int>pow(b,p));
      else
        continue;
    }
  }

  cout << ans <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:24: error: expected primary-expression before '<' token
   40 |         ans = max(ans, <int>pow(b,p));
      |                        ^
a.cc:40:25: error: expected primary-expression before 'int'
   40 |         ans = max(ans, <int>pow(b,p));
      |                         ^~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); i++)
#define repf(i,a,b) for (int i = (a); i < (b); i++)
#define repi(i,a,b) for (int i = (a); i <= (b); i++)
#define repr(i,a,b) for (int i = (a); i >= (b); i--)
#define all(x) (x).begin(),(x).end()
#define debug(x)  cout << #x << " = " << (x) << endl;
using namespace std;
using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
using vc = vector<char>;
using vvc = vector<vc>;
using vs = vector<string>;
using tiii = tuple<int, int, int>;

ll pow(ll k, ll n) {
  if (k == 0) return 0;
  if (n == 0) return 1;
  
  int i = 0;
  while (i < n) {
    k *= k;
    i++;
  }
  return k;
}

int main() {
  int X; cin >> X;

  int b, p;
  int ans = 0;
  for (b = 1; b<X; b++) {
    for (p = 2; p<X ;p++) {
      if (pow(b,p)<=X)
        ans = max(ans, <int>pow(b,p));
      else
        continue;
    }
  }

  cout << ans <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:24: error: expected primary-expression before '<' token
   40 |         ans = max(ans, <int>pow(b,p));
      |                        ^
a.cc:40:25: error: expected primary-expression before 'int'
   40 |         ans = max(ans, <int>pow(b,p));
      |                         ^~~
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 ans = 0;

        for (int i = 1; i < x; i++) {
            if (Math.pow(i,2) <= x) {
                ans = Math.pow(i,2);
            }
        }
        System.out.println(ans);

        sc.close();
    }    
}


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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n; cin >> n;
  int ans = -1;
  if(i >= 4){
    for(int i = 2; i < n; i++){
      int temp_ans = i;
      while(temp_ans <= n){
        temp_ans *= i;
      }
      if(i*i <= n)ans = max(ans, temp_ans/i);
    }
    cout << ans << endl;
  }else{
    cout << 1 << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: 'i' was not declared in this scope
    6 |   if(i >= 4){
      |      ^
Language: C

#include <stdio.h>
int main(){
  double i,j,x,r=1;
  scanf("%lf",&x);
  for(i=2;i<=x;i++)for(j=2;pow(i,j)<=x;j++)if(pow(i,j)>r)r=pow(i,j);
  printf("%d",(int)r);
  return 0;

Compiler output:
main.c: In function 'main':
main.c:5:28: error: implicit declaration of function 'pow' [-Wimplicit-function-declaration]
    5 |   for(i=2;i<=x;i++)for(j=2;pow(i,j)<=x;j++)if(pow(i,j)>r)r=pow(i,j);
      |                            ^~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'pow'
    1 | #include <stdio.h>
  +++ |+#include <math.h>
    2 | int main(){
main.c:5:28: warning: incompatible implicit declaration of built-in function 'pow' [-Wbuiltin-declaration-mismatch]
    5 |   for(i=2;i<=x;i++)for(j=2;pow(i,j)<=x;j++)if(pow(i,j)>r)r=pow(i,j);
      |                            ^~~
main.c:5:28: note: include '<math.h>' or provide a declaration of 'pow'
main.c:7:3: error: expected declaration or statement at end of input
    7 |   return 0;
      |   ^~~~~~
Language: C

#include <stdio.h>
int main(){
  double i,j,x,r=1;
  for(i=1;i<=x;i++)for(j=1;j<;j++)if(pow(i,j)<x&&pow(i,j)>r)r=pow(i,j);
  printf("%d",(int)r);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:30: error: expected expression before ';' token
    4 |   for(i=1;i<=x;i++)for(j=1;j<;j++)if(pow(i,j)<x&&pow(i,j)>r)r=pow(i,j);
      |                              ^
main.c:4:38: error: implicit declaration of function 'pow' [-Wimplicit-function-declaration]
    4 |   for(i=1;i<=x;i++)for(j=1;j<;j++)if(pow(i,j)<x&&pow(i,j)>r)r=pow(i,j);
      |                                      ^~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'pow'
    1 | #include <stdio.h>
  +++ |+#include <math.h>
    2 | int main(){
main.c:4:38: warning: incompatible implicit declaration of built-in function 'pow' [-Wbuiltin-declaration-mismatch]
    4 |   for(i=1;i<=x;i++)for(j=1;j<;j++)if(pow(i,j)<x&&pow(i,j)>r)r=pow(i,j);
      |                                      ^~~
main.c:4:38: note: include '<math.h>' or provide a declaration of 'pow'
Language: C++

#include <iostream>
#include <vector>
#include <cstring>
#include <algorithm> // sort

#define REP(i, n) for (long long i = 0; i < (n); i++) 
#define ll long long

using namespace std;

int main(){
    ll X,res;
    cin >> X;

    for(ll i = 1; i < X; i++;)
    {
        if(i*i > X)break;
        res = i*i;
    }
    cout << res << endl;

    return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:29: error: expected ')' before ';' token
   15 |     for(ll i = 1; i < X; i++;)
      |        ~                    ^
      |                             )
a.cc:15:30: error: expected primary-expression before ')' token
   15 |     for(ll i = 1; i < X; i++;)
      |                              ^
Language: C++

		pp = max(pp, (int)pow(i, power));
	}
	cout << pp << endl;
	return 0;


Compiler output:
a.cc:1:17: error: 'pp' does not name a type
    1 |                 pp = max(pp, (int)pow(i, power));
      |                 ^~
a.cc:2:9: error: expected declaration before '}' token
    2 |         }
      |         ^
a.cc:3:9: error: 'cout' does not name a type
    3 |         cout << pp << endl;
      |         ^~~~
a.cc:4:9: error: expected unqualified-id before 'return'
    4 |         return 0;
      |         ^~~~~~
Language: C++

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

int main(){
  int x;
  cin >> x;
  vecter<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:7:3: error: 'vecter' was not declared in this scope
    7 |   vecter<bool> expo(x+1);
      |   ^~~~~~
a.cc:7:10: error: expected primary-expression before 'bool'
    7 |   vecter<bool> expo(x+1);
      |          ^~~~
a.cc:9:3: error: 'expo' was not declared in this scope; did you mean 'expl'?
    9 |   expo[1] = 1;
      |   ^~~~
      |   expl
Language: C++

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

int main(){
    int n, ans;
    ans = 0;
    cin >> n;
    for(int i = 2; i <= n; i++){
        int pow = i * i;
        while(pow <= n){
            ans = max(ans, power);
            power *= i;
        }
    }
    cout << ans << endl;
    return 0;
}

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

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

vector<pair< int64_t, int >> prime_factor(int64_t n) {
  map< int64_t, int > ret;
  vector<pair<int64_t, int>> r
  for(int64_t i = 2; i * i <= n; i++) {
    while(n % i == 0) {
      ret[i]++;
      n /= i;
    }
    r.push_back(make_pair(i ,ret[i]));
  }
  if(n != 1) ret[n] = 1;
  r.push_back(make_pair(n ,ret[n]));
  return r;
}

int main(){
    int n, ans;
    ans = 0;
    vector<pair<int64_t, int>> tmp;
    for(int i = 1; i <= n; i++){
        tmp = prime_factor(i);
        bool flag = 1;
        if(tmp.size() == 1 && tmp[0].second == 1) flag = 0;
        for(int j = 0, j < tmp.size()-1; j++){
            if(tmp[j].second != tmp[j+1].second) flag = 0; 
        }
        if(flag) ans = max(ans, i);
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'std::vector<std::pair<long int, int> > prime_factor(int64_t)':
a.cc:7:3: error: expected initializer before 'for'
    7 |   for(int64_t i = 2; i * i <= n; i++) {
      |   ^~~
a.cc:7:22: error: 'i' was not declared in this scope
    7 |   for(int64_t i = 2; i * i <= n; i++) {
      |                      ^
a.cc:15:3: error: 'r' was not declared in this scope
   15 |   r.push_back(make_pair(n ,ret[n]));
      |   ^
a.cc: In function 'int main()':
a.cc:27:25: error: expected ';' before '<' token
   27 |         for(int j = 0, j < tmp.size()-1; j++){
      |                         ^~
      |                         ;
a.cc:27:26: error: expected primary-expression before '<' token
   27 |         for(int j = 0, j < tmp.size()-1; j++){
      |                          ^
Language: C++

#include<iostream>
#include<vector>

using namespace std;

bool is_bekijo(int n){
  int tmp = n;
  int cnt;
  for(int i = 999; i >=2; i--){
    cnt = 0;
    while(tmp > 1){
      if(tmp % i != 0){
        return false;
      }
      cnt++;
    }
    if(cnt <= 1) return false;
  }
  return true;
}

int main(){
  int N;
  cin >> N;
  vector<bool> V(1000);
  V[0] = false;
  for(int n = 2; n <= N; n++){
    V[n - 1] = is_bekijo(n);
  }
  for(int n = N; n >= 2; n--){
    if(V[n - 1]) cout << n; , break;
  }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:29: error: expected primary-expression before ',' token
   31 |     if(V[n - 1]) cout << n; , break;
      |                             ^
a.cc:31:31: error: expected primary-expression before 'break'
   31 |     if(V[n - 1]) cout << n; , break;
      |                               ^~~~~
Language: C++

#include<iostream>
#include<vector>

using namespace std;

bool is_bekijo(int n){
  int tmp = n;
  int cnt;
  for(int i = 999; i >=2; i--){
    cnt = 0;
    while(tmp > 1){
      if(tmp % i != 0){
        return false;
      }
      cnt++;
    }
    if(cnt <= 1) return false;
  }
  return true;
}

int main(){
  int N;
  cin >> N;
  vector<bool> V(1000);
  V[0] = false;
  for(int n = 2; n <= N; n++){
    V[i - 1] = is_bekijo(i);
  }
  for(int n = N; n >= 2; n--){
    if(V[n - 1]) cout << n, break;
  }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:7: error: 'i' was not declared in this scope
   28 |     V[i - 1] = is_bekijo(i);
      |       ^
a.cc:31:29: error: expected primary-expression before 'break'
   31 |     if(V[n - 1]) cout << n, break;
      |                             ^~~~~
Language: C++

#include<iostream>
#include<vector>


bool is_bekijo(int n){
  int tmp = n;
  int cnt;
  for(int i = 999; i >=2; i--){
    cnt = 0;
    while(tmp > 1){
      if(tmp % i != 0){
        return false;
      }
      cnt++;
    }
    if(cnt <= 1) return false;
  }
  return true;
}

int main(){
  int N;
  cin >> N;
  vector<bool> V(1000);
  V[0] = false;
  for(int n = 2; n <= N; n++){
    V[i - 1] = is_bekijo(i);
  }
  for(int n = N; n >= 2; n--){
    if(V[n - 1]) cout << n, break;
  }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   23 |   cin >> N;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:24:3: error: 'vector' was not declared in this scope
   24 |   vector<bool> V(1000);
      |   ^~~~~~
a.cc:24:3: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:2:
/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:24:10: error: expected primary-expression before 'bool'
   24 |   vector<bool> V(1000);
      |          ^~~~
a.cc:25:3: error: 'V' was not declared in this scope
   25 |   V[0] = false;
      |   ^
a.cc:27:7: error: 'i' was not declared in this scope
   27 |     V[i - 1] = is_bekijo(i);
      |       ^
a.cc:30:18: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   30 |     if(V[n - 1]) cout << n, break;
      |                  ^~~~
      |                  std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:30:29: error: expected primary-expression before 'break'
   30 |     if(V[n - 1]) cout << n, break;
      |                             ^~~~~
Language: C++

#include<iostream>
using namespace std;

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

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

using namespace std;
#include <bits/stdc++.h>
#define rep(i, s) for (int i = 0; i < s; ++i)
#define repr(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define all(v) (v.begin(), v.end())
#define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)
#define VEC(a, n) vector<int>a(n)
#define PQ(a) priority_queue<int>a
#define PQmin(a) priority_queue< int, :vector<int>, greater<int> >a
#define PAIR pair<int, int>
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
#define EPS (1e-7)
#define INF (1e10)
#define PI (acos(-1))
const ll mod = 1000000007;
 
int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);
  int N;
  cin>>N;
  if(N==1||N==2||N==3){
    cout<<1<<endl;
    return 0;
  }
  int ans=1;
  
  FOR(i,2,32){
    int tmp=1;
    FOR(j,1,10){
      tmp*=i;
      if(tmp>N){
        tmp/=i;
        break;
      }
    ans=max(tmp,ans);
    }
  
  cout<<ans<<endl;
      
    
    
}
  



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

#include<iostream>
using namespace std;
int main(){
  vector<int> a = {1,4,8,16,32,64,128,256,512,9,27,81,243,729,25,125,625,36,216,49,343,100,121,144,169,196,225,256,289,324,361,400,441,484,529,576,676,784,841,900,961,1200};
  sort(a.begin(),a.end());
  int n;
  cin >> n;
  for(int i = 0;i<a.size();i++){
    if(a[i]>n){
      cout << a[i-1] << endl;
      return 0;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'vector' was not declared in this scope
    4 |   vector<int> a = {1,4,8,16,32,64,128,256,512,9,27,81,243,729,25,125,625,36,216,49,343,100,121,144,169,196,225,256,289,324,361,400,441,484,529,576,676,784,841,900,961,1200};
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:4:10: error: expected primary-expression before 'int'
    4 |   vector<int> a = {1,4,8,16,32,64,128,256,512,9,27,81,243,729,25,125,625,36,216,49,343,100,121,144,169,196,225,256,289,324,361,400,441,484,529,576,676,784,841,900,961,1200};
      |          ^~~
a.cc:5:8: error: 'a' was not declared in this scope
    5 |   sort(a.begin(),a.end());
      |        ^
a.cc:5:3: error: 'sort' was not declared in this scope; did you mean 'short'?
    5 |   sort(a.begin(),a.end());
      |   ^~~~
      |   short
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:83:21: error: expected ';' before '}' token
   83 |       ans=max(ans,a)
      |                     ^
      |                     ;
   84 |       }
      |       ~
Language: C++

#include <algorithm>
#include <iostream>
#include <numeric>
#include <string>
#include <vector>

using namespace std;

int main()
{
    int X;
    cin >> X;
    int max = 1;
    for (int b = 2; b <= X; ++b)
    {
        for (int p = 2;; ++p)
        {
            int tmp = pow(b, p);
            if (tmp > X)
            {
                break;
            }
            if (tmp > max)
            {
                max = tmp;
            }
        }
    }
    cout << max << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:23: error: 'pow' was not declared in this scope
   18 |             int tmp = pow(b, p);
      |                       ^~~
Language: C++

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

int main(){
  int N;
  cin>>N;
  
  int max=0;
  
  for(int i=1;i<=N;i++){
    
    if(i**<=N&&i**>max){
      max=i**;
    }
  }
  cout<<max<<endl;
}

    
    

Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: expected primary-expression before '<=' token
   12 |     if(i**<=N&&i**>max){
      |           ^~
a.cc:12:19: error: expected primary-expression before '>' token
   12 |     if(i**<=N&&i**>max){
      |                   ^
a.cc:13:14: error: expected primary-expression before ';' token
   13 |       max=i**;
      |              ^
Language: C++

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

void print(const std::vector<int> &v) {
    std::for_each(v.begin(), v.end(), [](int x) { std::cout << x << " "; });
    std::cout << std::endl;
}

int main() {
    int X;
    cin >> X;
    int res = 0;
    for(int i = 0; i * i <= X; i++) {
        for(int j =1; pow(i,j) <= X;j++){
          res = max(res,pow(i,j));
        }
    }
    cout << res << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:20: error: no matching function for call to 'max(int&, __gnu_cxx::__promote<double>::__type)'
   38 |           res = max(res,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:38:20: note:   deduced conflicting types for parameter 'const _Tp' ('int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'})
   38 |           res = max(res,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:38:20: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   38 |           res = max(res,pow(i,j));
      |                 ~~~^~~~~~~~~~~~~~
Language: C++

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

void print(const std::vector<int> &v) {
    std::for_each(v.begin(), v.end(), [](int x) { std::cout << x << " "; });
    std::cout << std::endl;
}

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


Compiler output:
a.cc: In function 'int main()':
a.cc:39:16: error: expected ';' before '\U0000ff0ares'
   39 |     cout << res ＊res << endl;
      |                ^~~~~~
      |                ;