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

#include <bits/stdc++.h>

#define stirng string
#define vvi vector<vector<int>>
#define vi vector<int>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;

const int inf = 1e9 + 7;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:43: error: expected primary-expression before ';' token
   16 |                 for(int p=0;pow(i,j) <= x;;){
      |                                           ^
a.cc:16:43: error: expected ')' before ';' token
   16 |                 for(int p=0;pow(i,j) <= x;;){
      |                    ~                      ^
      |                                           )
a.cc:16:44: error: expected primary-expression before ')' token
   16 |                 for(int p=0;pow(i,j) <= x;;){
      |                                            ^
Language: C

#include <stdio.h>
#include <math.h>
int main(void) {
    int x, b, p, max=1;
    scanf("%d", &x);
    
    for(b=1; b<32; b++) {
        for(p=2; p<11; p++) {
            if(max<pow(b, p) && pow(b, p)<=x) {
                    max = pow(b, p);
                }
            }
        }
    }
    printf("%d", max);
    return 0;
}

Compiler output:
main.c:15:12: error: expected declaration specifiers or '...' before string constant
   15 |     printf("%d", max);
      |            ^~~~
main.c:15:18: error: unknown type name 'max'
   15 |     printf("%d", max);
      |                  ^~~
main.c:16:5: error: expected identifier or '(' before 'return'
   16 |     return 0;
      |     ^~~~~~
main.c:17:1: error: expected identifier or '(' before '}' token
   17 | }
      | ^
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: 'sqrt' was not declared in this scope
    9 |   for (int i=2; i<=sqrt(X); ++i){
      |                    ^~~~
a.cc:11:13: error: 'pow' was not declared in this scope
   11 |       while(pow(i, j) <= X){
      |             ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int t=0;
	int x;
	cin>>x;
	for(; ;)
	{
		if(t*t>x)
			t--;
			break;
		else
			t++;	
	}
	cout<<t*t;
	return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: 'else' without a previous 'if'
   13 |                 else
      |                 ^~~~
Language: Java

X = int(input())

a = 1
b = 2
c = 0
if X = 1:
    print(X)

else:
    while b < 10:
        while a < 32:
            d = a**b
            if d > c and d < X:
                c = d
            a += 1
        b +=1
    
    print(c)


Compiler output:
Main.java:1: error: class, interface, enum, or record expected
X = int(input())
^
1 error
Language: C++

include <bits/stdc++.h>
using namespace std;
int main()
{
int a=0,i=0,j,n,max=0,m=1;
scanf("%d",&n);
if(n<3)
{
printf("No");
return 0;
}
for(i=1;i<=n;i++)
{
m=1;
m*=i;
for(j=2;;j++)
{
 
if(m*=i<n)
{
break;
}
m*=i;
}
if(m>max&&m<n)
{
max=m;
}
}
printf("%d",max);
}

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:6:1: error: 'scanf' was not declared in this scope
    6 | scanf("%d",&n);
      | ^~~~~
a.cc:9:1: error: 'printf' was not declared in this scope
    9 | printf("No");
      | ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | include <bits/stdc++.h>
a.cc:30:1: error: 'printf' was not declared in this scope
   30 | printf("%d",max);
      | ^~~~~~
a.cc:30:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: Java


import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		int X;
		int Y;
		do{
		Scanner stdIn= new Scanner(System.in);
			X = stdIn.nextInt();
		}while(X<1||5000<X);
		for(int i =0;i*i<=X;i++){
			Y=i*i;
		}
		System.out.println(Y);

	}

}

Compiler output:
Main.java:15: error: variable Y might not have been initialized
		System.out.println(Y);
		                   ^
1 error
Language: Java


import java.util.Scanner;
public class Exponential {

	public static void main(String[] args) {
		int X;
		int Y = 0;
		do{
		Scanner stdIn= new Scanner(System.in);
			X = stdIn.nextInt();
		}while(X<1||5000<X);
		for(int i =0;i*i<=X;i++){
			Y=i*i;
		}
		System.out.println(Y);

	}

}

Compiler output:
Main.java:3: error: class Exponential is public, should be declared in a file named Exponential.java
public class Exponential {
       ^
1 error
Language: C++

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

int main() {
  int X, Y;
  Y*Y <= X; 
  cin >> X;
  cout << max(Y) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: no matching function for call to 'max(int&)'
    8 |   cout << max(Y) << 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:
a.cc:8:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
    8 |   cout << max(Y) << endl;
      |           ~~~^~~
/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>
using namespace std;

int main() {
  int X, Y;
  Y*Y < X; 
  cin >> X;
  
  
  cout << max(Y) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: no matching function for call to 'max(int&)'
   10 |   cout << max(Y) << 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:
a.cc:10:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   10 |   cout << max(Y) << endl;
      |           ~~~^~~
/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>
using namespace std;

int main() {
  int X, Y;
  cin >> X;
  
  Y** < X;
  cout << max(Y) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: expected primary-expression before '<' token
    8 |   Y** < X;
      |       ^
a.cc:9:14: error: no matching function for call to 'max(int&)'
    9 |   cout << max(Y) << 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:
a.cc:9:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
    9 |   cout << max(Y) << endl;
      |           ~~~^~~
/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>
using namespace std;

int main() {
  int X Y;
  cin >> X;
  
  Y** < X;
  cout << max(Y) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: expected initializer before 'Y'
    5 |   int X Y;
      |         ^
a.cc:6:10: error: 'X' was not declared in this scope
    6 |   cin >> X;
      |          ^
a.cc:8:3: error: 'Y' was not declared in this scope
    8 |   Y** < X;
      |   ^
a.cc:8:7: error: expected primary-expression before '<' token
    8 |   Y** < X;
      |       ^
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int main() {
	int X;
	vector <int> v;
	cin >> X;



	for (int i = 1;i <= 40; i++) {
		for (int j = 2; j <= 10; j++) {
			if (pow(i, j) <= X) v.push_back((int)pow(i, j));
			else break;
		}
	}

	int& x = v.back();

	cout << x << endl;

	return 0;
}

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

#include<bits/stdc++.h>
int main()
{
  int x,ans = 1;
  scanf("%d",&x);
  for(int i = 2; i <= x; i++)
  {
    int now = i * i;
    while(now <= x)
    {
      ans = max(ans,now);
      now *= i;
    }
  }
  printf("%d\n",ans);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: 'max' was not declared in this scope; did you mean 'std::max'?
   11 |       ans = max(ans,now);
      |             ^~~
      |             std::max
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
Language: C

#include<stdio.h>
#include<math.h>//pow使いたいからinclude
int main() {
	int X;
	double i, j = 0;//ループ用
	double y = 1;
	scanf("%d", &X);//とりあえずXを代入

	for (i = 1; i <= X; i++) {
		for(j = 2;j <= X;j++){
			if (y < pow(i, j) && X > pow(i,j)) {
				y = pow(i, j);
			}
		}
	}
	X = int(y);
	printf("%d\n",X);

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:13: error: expected expression before 'int'
   16 |         X = int(y);
      |             ^~~
Language: C

#include<stdio.h>
#include<math.h>//pow使いたいからinclude
int main() {
	int X;
	double i, j = 0;//ループ用
	double y = 1;
	scanf("%d", &X);//とりあえずXを代入

	for (i = 1; i <= X; i++) {
		for(j = 2;j <= X;j++){
			if (y < pow(i, j) && X > pow(i,j)) {
				y = pow(i, j);
			}
		}
	}
	printf("%d\n",int(y));
}

Compiler output:
main.c: In function 'main':
main.c:16:23: error: expected expression before 'int'
   16 |         printf("%d\n",int(y));
      |                       ^~~
Language: C

#include<stdio.h>
#include<math.h>//pow使いたいからinclude
int main() {
	int X;
	int i, j = 0;//ループ用
	double y = 1;
	scanf("%d", &X);//とりあえずXを代入

	for (i = 1; i <= X; i++) {
		for(j = 2;j <= X;j++){
			if (y < pow(double(i), j) && X > pow(double(i),j)) {
				y = pow(double(i), j);
			}
		}
	}
	printf("%d\n",int(y));
}

Compiler output:
main.c: In function 'main':
main.c:11:37: error: expected expression before 'double'
   11 |                         if (y < pow(double(i), j) && X > pow(double(i),j)) {
      |                                     ^~~~~~
main.c:11:33: error: too few arguments to function 'pow'
   11 |                         if (y < pow(double(i), j) && X > pow(double(i),j)) {
      |                                 ^~~
In file included from /usr/include/features.h:523,
                 from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:28,
                 from main.c:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:173:1: note: declared here
  173 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      | ^~~~~~~~~~~~~~
main.c:11:62: error: expected expression before 'double'
   11 |                         if (y < pow(double(i), j) && X > pow(double(i),j)) {
      |                                                              ^~~~~~
main.c:11:58: error: too few arguments to function 'pow'
   11 |                         if (y < pow(double(i), j) && X > pow(double(i),j)) {
      |                                                          ^~~
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:173:1: note: declared here
  173 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      | ^~~~~~~~~~~~~~
main.c:12:41: error: expected expression before 'double'
   12 |                                 y = pow(double(i), j);
      |                                         ^~~~~~
main.c:12:37: error: too few arguments to function 'pow'
   12 |                                 y = pow(double(i), j);
      |                                     ^~~
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:173:1: note: declared here
  173 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      | ^~~~~~~~~~~~~~
main.c:16:23: error: expected expression before 'int'
   16 |         printf("%d\n",int(y));
      |                       ^~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

#ifdef DEBUG_MODE
	#define DBG(n) n;
#else
	#define DBG(n) ;
#endif
#define REP(i,n) for(ll (i) = (0);(i) < (n);++i)
#define rep(i,s,g) for(ll (i) = (s);(i) < (g);++i)
#define rrep(i,s,g) for(ll (i) = (s);i >= (g);--(i))
#define PB push_back
#define MP make_pair
#define FI first
#define SE second
#define SHOW1d(v,n) {for(int W = 0;W < (n);W++)cerr << v[W] << ' ';cerr << endl << endl;}
#define SHOW2d(v,i,j) {for(int aaa = 0;aaa < i;aaa++){for(int bbb = 0;bbb < j;bbb++)cerr << v[aaa][bbb] << ' ';cerr << endl;}cerr << endl;}
#define ALL(v) v.begin(),v.end()
#define Decimal fixed<<setprecision(20)
#define INF 1000000000
#define MOD 1000000007


typedef long long ll;
typedef pair<ll,ll> P;

int main()
{
	int x;cin >> x;
	int ans = 1;
	for(int i = 2;i <= x;i++){
		REP(int j = 2;j <i;j++){
			if(j % i == 0){
				int tmp = i;
				while(tmp % j == 0)tmp /= j;
				if(tmp == 1)ans = tmp;
				else break;
			}
		}
	}
	
	cout << ans << endl;
		
	
	return 0;
}

Compiler output:
a.cc:33:39: error: macro "REP" requires 2 arguments, but only 1 given
   33 |                 REP(int j = 2;j <i;j++){
      |                                       ^
a.cc:10:9: note: macro "REP" defined here
   10 | #define REP(i,n) for(ll (i) = (0);(i) < (n);++i)
      |         ^~~
a.cc: In function 'int main()':
a.cc:33:17: error: 'REP' was not declared in this scope
   33 |                 REP(int j = 2;j <i;j++){
      |                 ^~~
Language: C++

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

int main(){
  int X;
  int MAX = 1;
  cin >> X;
  fflush(stdout);
  int max_b = int(sqrt(double(X)));
  for(int b=2; b<=max_b; ++b){
    int p = int(log(double(X)) / log(double(b)));
    m = 1;
    for(int i=0; i<p; ++i){
      m *= b;
    }
    if(MAX < m){
      MAX = m;
    }
  }
  
  cout << MAX << endl;

  return 0;
}


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

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

int main(){
  int X;
  int MAX = 1;
  cin >> X;
  fflush(stdout);
  max_b = int(log(double(X)));
  for(int b=2; b<=max_b; ++b){
    p = int(log(double(X)) / log(double(b)));
    int m = pow(b, p);
    if(MAX < m){
      MAX = m;
    }
  }
  
  cout << MAX << endl;

  return0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'max_b' was not declared in this scope
   10 |   max_b = int(log(double(X)));
      |   ^~~~~
a.cc:12:5: error: 'p' was not declared in this scope
   12 |     p = int(log(double(X)) / log(double(b)));
      |     ^
a.cc:21:3: error: 'return0' was not declared in this scope
   21 |   return0;
      |   ^~~~~~~
Language: C++

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

int main(){
	int n,m=0;
  	cin>>n;
	range(i,1,35)rep(j,2,10){
     	if(pow(i,j)>1000) break;
      	m=max(m,(int)pow(i,j));
    }  
    cout<<m<<endl;
	return 0;
}


Compiler output:
a.cc:9:32: error: macro "rep" passed 3 arguments, but takes just 2
    9 |         range(i,1,35)rep(j,2,10){
      |                                ^
a.cc:2:9: note: macro "rep" defined here
    2 | #define rep(i,n) range(i,0,n)
      |         ^~~
a.cc: In function 'int main()':
a.cc:9:22: error: 'rep' was not declared in this scope
    9 |         range(i,1,35)rep(j,2,10){
      |                      ^~~
Language: C++

#include <iostream>
#include<iomanip>
#include<string>
#include<vector>
#include<algorithm>
#include<memory.h>
using namespace std;
int val[505] = {};

bool Get(int n)
{
	for (int i = 2; i < 10; i++)
	{
		int k = pow(n*1.0,1.0/i);
		k = pow(k,i);
		if (k == n)
			return true;
	}
	return false;
}
int main()
{
	//Get(900);
	int n;
	while (cin>>n)
	{
		n++;
		while (!Get(--n));
		cout << n << endl;
	}
	
	
	return 0;
}

Compiler output:
a.cc: In function 'bool Get(int)':
a.cc:14:25: error: 'pow' was not declared in this scope
   14 |                 int k = pow(n*1.0,1.0/i);
      |                         ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
1
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:3:1: error: expected unqualified-id before numeric constant
    3 | 1
      | ^
Language: C++

#include <iostream>
#include<iomanip>
#include<string>
#include<vector>
#include<algorithm>
#include<memory.h>
using namespace std;
int val[505] = {};

bool Get(int n)
{
	for (int i = 2; i < 10; i++)
	{
		int k = pow(n*1.0,1.0/i);
		k = pow(k,i);
		if (k == n)
			return true;
	}
	return false;
}
int main()
{
	int n;
	cin >> n;
	n++;
	while (!Get(--n));
	cout << n;
	return 0;
}

Compiler output:
a.cc: In function 'bool Get(int)':
a.cc:14:25: error: 'pow' was not declared in this scope
   14 |                 int k = pow(n*1.0,1.0/i);
      |                         ^~~
Language: C++

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

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

Compiler output:
a.cc:4:1: error: '::main' must return 'int'
    4 | void main() {
      | ^~~~
Language: C++

X=int(input())
ans = 0
for b in range(1,X):
  for p in range(2,1000):
    if b ** p > X:
      break
    ans = max(ans, b **p)
print(ans)

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

import java.math.BigInteger;
import java.util.Scanner;

public class Atcoder97B {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int x = input.nextInt();

        TH:
        for (int i = x; i > 0; i--) {
            for (int j = 2; j <= i  ; j++) {
                double  nthRoot =  Math.round(Math.pow(i, 10.0/ j * 10));
                int intNthRoot = (int) nthRoot;
                if (intNthRoot == nthRoot){
                    System.out.println(i);
                    break TH;
                }
            }
            if (i == 1 ){
                System.out.println(1);
                break;
            }
        }
    }
}


Compiler output:
Main.java:4: error: class Atcoder97B is public, should be declared in a file named Atcoder97B.java
public class Atcoder97B {
       ^
1 error
Language: Java

import java.util.Scanner;

public class Atcoder97B {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int x = input.nextInt();

        TH:
        for (int i = x; i > 0; i--) {
            for (int j = 2; j < x  ; j++) {
                double  nthRoot =  Math.pow(i, 1.0/ j);
                int intNthRoot = (int) nthRoot;
                if (intNthRoot == nthRoot){
                    System.out.println(i);
                    break TH;
                }
            }
            if (i == 1 ){
                System.out.println(1);
                break;
            }
        }
    }
}


Compiler output:
Main.java:3: error: class Atcoder97B is public, should be declared in a file named Atcoder97B.java
public class Atcoder97B {
       ^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
	int x;
	cin>>x;
	int ans=1;
	for(int j=2;j<=x;j++){
		int ret=j;
		while(ret<=x){
			ret*=j;
			if(ret<=x){
				ans=max(ans,ret);
			}
		}
	}
	cout<<ans<<endl;
	return 0;
}
fuck you!

Compiler output:
a.cc:19:1: error: 'fuck' does not name a type
   19 | fuck you!
      | ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int a;
	cin>>a;
	for(int i;i*i<=a;i++){
		if(((i+1)*(i+1))>a){
			break;
		}
	}
	cout<<i*i;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: 'i' was not declared in this scope
   12 |         cout<<i*i;
      |               ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main (){
	int x,j,ans,s=9999;
	cin>>x;
	if(x==1){cout<<x;return 0;}
	for(int i=2;i*i<=x;i++){
		for(j=i;j*i<=x;j=j*i){}
		if(x-j<s) x-j=s;
	}
	ans=x-s;
	cout<<ans;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:28: error: lvalue required as left operand of assignment
    9 |                 if(x-j<s) x-j=s;
      |                           ~^~
Language: C++

#include <bits/stdc++.h>
//#define int long long
#define r(i,n) for(int i=0;i<n;i++)
#define all(v) v.begin,v.end()
using namespace std;
typedef pair<int,int>P;
int main(){
  int a;
  cin>>a;
  int ans=0;
  for(int i=1;i<=100;i++){
    for(int j=2;j<100;j++){
      int b=i;
      while(b<=a){
        ans=max(b);
        b*=j;
      }
    }
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:16: error: no matching function for call to 'max(int&)'
   15 |         ans=max(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:   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:
a.cc:15:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   15 |         ans=max(b);
      |             ~~~^~~
/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>
using namespace std;
typedef long long int ll ;

long long gcd(long long aaa,long long bbb) {
    if(bbb==0) {
        return aaa;
    }
    return gcd(bbb,aaa%bbb);
}

int main (){

    int X,ans=0,tmp;
    cin >> X;
    for(int i = 1; i <= X; i++) {
        for(int j = 2; j <= 1000; j++) {
            tmp = pow(i,j);
          	if(tmp <= X) {
              	ans = max(ans,tmp);
            }else {
                break;
            }
          	if(ans == X) {
              	cout << ans << endl;
              	return 0;
        }
    }

    cout << ans << endl;

    return 0;
}


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

#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#include <cstdio>
#include <bits/stdc++.h>
#include <set>
#include <map>
#include <stdio.h>
using namespace std;
using ll =int long long;
map <int ,int> mpa,mpb;

int main (void){
  int X;
  cin >> X;
  int ans=1;
  int b;
  for(int b=50;b>1;b--){
    int c=b;
    do{
      int c=c*b;
    }while(X>c);
    c=c/b
    ans=max(ans,c);
  }
  cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:10: error: expected ';' before 'ans'
   25 |     c=c/b
      |          ^
      |          ;
   26 |     ans=max(ans,c);
      |     ~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#include <cstdio>
#include <bits/stdc++.h>
#include <set>
#include <map>
#include <stdio.h>
using namespace std;
using ll =int long long;
map <int ,int> mpa,mpb;

int main (void){
  int X;
  cin >> X;
  int ans=1;
  int b;
  for(int b=50;b>1;b--){
    int c=b;
    do{
      c=c*b;
      ans=max(ans,c);
    }while(X>c)
  }
  cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:16: error: expected ';' before '}' token
   25 |     }while(X>c)
      |                ^
      |                ;
   26 |   }
      |   ~
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#include <cstdio>
#include <bits/stdc++.h>
#include <set>
#include <map>
#include <stdio.h>
using namespace std;
using ll =int long long;
map <int ,int> mpa,mpb;

int main (void){
  int X;
  cin >> X;
  int ans=1;
  for (int i=1;i<=50;i++){
    int num=i;
    for(int j=0;j<21;j++){
      num*=i
      if(num>X) break;
      ans=max(ans,num);
    }
  }
  cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:13: error: expected ';' before 'if'
   22 |       num*=i
      |             ^
      |             ;
   23 |       if(num>X) break;
      |       ~~
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#include <cstdio>
#include <bits/stdc++.h>
#include <set>
#include <map>
#include <stdio.h>
using namespace std;
using ll =int long long;
map <int ,int> mpa,mpb;

int main (void){
  int X;
  cin >> X;
  int ans=1;
  for (int i=2;i<=X;i++){
    int num=i;
    for(int j=2;j<12;j++){
      num=num*num;
      if(num>X) break;
      ans=max(ans,num)
    }
  }
  cout << ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:23: error: expected ';' before '}' token
   24 |       ans=max(ans,num)
      |                       ^
      |                       ;
   25 |     }
      |     ~
Language: Java

import java.io.*;
import java.math.*;
import java.text.*;
import java.util.*;
import java.util.regex.*;

public class Main {
 private static final Scanner scan = new Scanner(System.in);

    public static void main(String[] args) {

       int x=Integer.parseInt(scan.nextLine());
       float f=Math.sqrt(x);
       int d= Math.floor(f);
       System.out.println(d*d);


    }
}

Compiler output:
Main.java:13: error: incompatible types: possible lossy conversion from double to float
       float f=Math.sqrt(x);
                        ^
Main.java:14: error: incompatible types: possible lossy conversion from double to int
       int d= Math.floor(f);
                        ^
2 errors
Language: C++

#include <iostream>
#include <cmath>
#include <vector>

using namespace std;

int main()
{
  int x;
  int temp;
  vector<int> ans;

  cin >> x;

  for (int j = 2; j < 11; j++) {
    int i = 1;
    while(1) {
      if(pow(i,j) > x) {
        break;
      }
      temp = pow(i, j);
      i++;
    }
    ans.push_back(temp);
    temp = 0;
  }
  cout << *max_element(ans.begin(), ans.end()) << endl;
}

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

import math
n=int(input())
l=math.log(n,2)
#print (int(l))
while(0==0):
  b=0
  if n==1000:
    print(n)
    break
  for j in range (2,int(l)+1):
    if n**(1/j)==int(n**(1/j)):
      print (n)
      b=1

  n=n-1
  if b==1:
    break


Compiler output:
a.cc:4:2: error: invalid preprocessing directive #print
    4 | #print (int(l))
      |  ^~~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import math
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

import math
n=int(input())
l=math.log(n,2)
#print (int(l))
while(0==0):
  b=0
  if n==1000:
    print(n)
    break
  for j in range (2,int(l)+1):
    print(n," = ",n**(1/j)," pangkat ",j)
    if n**(1/j)==int(n**(1/j)):#kalau n bilangan pangkat j
      print (n)
      b=1

  n=n-1
  if b==1:
    break

Compiler output:
a.cc:4:2: error: invalid preprocessing directive #print
    4 | #print (int(l))
      |  ^~~~~
a.cc:12:32: error: stray '#' in program
   12 |     if n**(1/j)==int(n**(1/j)):#kalau n bilangan pangkat j
      |                                ^
a.cc:1:1: error: 'import' does not name a type
    1 | import math
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

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

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;
const ull mod = 1e9 + 7;
#define REP(i,n) for(int i=0;i<(int)n;++i)

int main(){
    ll X;
    cin >> X;
    ll res = 1;
    for(i=2;i<40;i++){
        ll tmp = 1;
        while(tmp*i <= X){
            tmp *= i;
        }
        res = max(res, tmp);
    }
    cout << res << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: 'i' was not declared in this scope
   16 |     for(i=2;i<40;i++){
      |         ^
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 = 2;
		int ans = 0;
		if(X == 1){
			System.out.println("1");
		}else{
			while(i*i <= X){
				int tmp = i*i;
				while(tmp <= X){
					tmp*=i;
				}
				tmp /= i;
				if(tmp > ans)
				ans = tmp;
				i++;
			}
			System.out.println(ans);
		}
	}
 
}
int X = sc.nextInt();
		int i = 2;
		int ans = 0;
		if(X == 1){
			System.out.println("1");
		}else{
			while(i*i <= X){
				int tmp = i*i;
				while(tmp <= X){
					tmp*=i;
				}
				tmp /= i;
				if(tmp > ans)
				ans = tmp;
				i++;
			}
			System.out.println(ans);
		}
	}
 
}

Compiler output:
Main.java:27: error: unnamed classes are a preview feature and are disabled by default.
int X = sc.nextInt();
^
  (use --enable-preview to enable unnamed classes)
Main.java:30: error: class, interface, enum, or record expected
		if(X == 1){
		^
Main.java:32: error: class, interface, enum, or record expected
		}else{
		^
Main.java:35: error: class, interface, enum, or record expected
				while(tmp <= X){
				^
Main.java:37: error: class, interface, enum, or record expected
				}
				^
Main.java:39: error: class, interface, enum, or record expected
				if(tmp > ans)
				^
Main.java:41: error: class, interface, enum, or record expected
				i++;
				^
Main.java:42: error: class, interface, enum, or record expected
			}
			^
Main.java:44: error: class, interface, enum, or record expected
		}
		^
9 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,s=0,i,j;
    sum=0;
    scanf("%d",&n);
    for(i=2;i<=n;i++)
        for(j=2;j<=n;j++)
            if(pow(i,j)>=s)
                s=pow(i,j);
    printf("%d",s);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'sum' was not declared in this scope
    6 |     sum=0;
      |     ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define FOR(i,n,m) for(ll i=(n);i<(m);i++)
#define REP(i,n) FOR(i,0,n)
#define REPR(i,n) for(ll i=(n);i>=0;i--)
#define all(vec) vec.begin(),vec.end()
using vi=vector<int>;
using vvi=vector<vi>;
using vl=vector<ll>;
using vvl=vector<vl>;
using P=pair<ll,ll>;
using PP=pair<ll,P>;
using vp=vector<P>;
using vpp=vector<PP>;
using vs=vector<string>;
#define fi first
#define se second
#define pb push_back
template<class T>bool chmax(T &a,const T &b){if(a<b){a=b;return true;}return false;}
template<class T>bool chmin(T &a,const T &b){if(a>b){a=b;return true;}return false;}
const ll MOD=1000000007LL;
const int INF=1<<30;
const ll LINF=1LL<<60;
int main(){
    int n;
    cin>>n;
    int ans=1;
    FOR(i,2,n+1){
        int  p=1;
        FOR(j,2,n+1){
            while(p<i){
                p*=j;
            }
        }
        if(p==j){
            ans++;
        }
    }
    cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:15: error: 'j' was not declared in this scope
   36 |         if(p==j){
      |               ^
Language: C++

#include<cstdio>
#include<cmath>
#include<iostream>
bool d[10000];
int main(){
  int x; scanf("%d", &x);

  for(int i = 1; i <= sqrt(x); i++){
    for(int j=1; j < 10; j++){
      d[pow(i, j)]=true;
    }
  }
  
  for(int i=x; i>0;i--) {
    if(d[i]){
      printf("%d", i);
      break;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: invalid types 'bool [10000][double]' for array subscript
   10 |       d[pow(i, j)]=true;
      |        ^
Language: C++

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

int main() {
  int a;
  cin >> a;
  for (int i = 2; i < sqrt(a); i++) {
    for (int j = 2; j < 9; j++) {
    double pow(double i, double j);
    }
    if(a>=max(pow)
       cout << max(pow) << endl;
  }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: no matching function for call to 'max(<unresolved overloaded function type>)'
   11 |     if(a>=max(pow)
      |           ~~~^~~~~
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:
a.cc:11:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'float (*)(float, float)'
   11 |     if(a>=max(pow)
      |           ~~~^~~~~
a.cc:11:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'long double (*)(long double, long double)'
a.cc:11:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'double (*)(double, double) noexcept'
a.cc:11:14: note:   couldn't deduce template parameter '_Tp'
/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
a.cc:13:3: error: expected primary-expression before '}' token
   13 |   }
      |   ^
a.cc:12:33: error: expected ')' before '}' token
   12 |        cout << max(pow) << endl;
      |                                 ^
      |                                 )
   13 |   }
      |   ~                              
a.cc:11:7: note: to match this '('
   11 |     if(a>=max(pow)
      |       ^
a.cc:13:3: error: expected primary-expression before '}' token
   13 |   }
      |   ^
Language: C++

#include <iostream>
using namespace std;

int main() {
    int x;
    cin >> x;
    int max = 1;
    int temp = 1;

    for(int i = 2; i <= 31; i++) {
        for(int j = 2; j <= 10; j++) {
            count = j;
            do {
                temp *= i;
                if(temp > max && x >= temp) {
                    max = temp;
                }
                count--;
            }while(count >= 1);
        }
    }
    cout << max << endl;
}   

Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: 'count' was not declared in this scope
   12 |             count = j;
      |             ^~~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
    int x;
    cin >> x;
    int max = 1;
    int temp = 1;

    for(int i = 2; i <= 31; i++) {
        for(int j = 2; j <= 10; j++) {
            count = j;
            do {
                temp *= i;
                if(temp > max && x >= temp) {
                    max = temp;
                }
                count--;
            }while(count >= 1)
        }
    }
    cout << max << endl;
}   

Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: 'count' was not declared in this scope
   12 |             count = j;
      |             ^~~~~
a.cc:19:31: error: expected ';' before '}' token
   19 |             }while(count >= 1)
      |                               ^
      |                               ;
   20 |         }
      |         ~
Language: C

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

int main(void){
    int x, a, b, n;
    scanf("%d", &x);
    if(x<5){
        printf("1");
        return 0;
    }
    while(true){
        for(a=2; a*a<=x; ++a){
            n = a;
            for(b=2; n<=x; ++b){
                n = n*a;
                if(n == x){
                    printf("%d", n);
                    return 0;
                }
            }

        }
    }
}

Compiler output:
main.c: In function 'main':
main.c:11:11: error: 'true' undeclared (first use in this function)
   11 |     while(true){
      |           ^~~~
main.c:3:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    2 | #include <stdlib.h>
  +++ |+#include <stdbool.h>
    3 | 
main.c:11:11: note: each undeclared identifier is reported only once for each function it appears in
   11 |     while(true){
      |           ^~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
    int x;
    cin >> x;
    int max = 1;
    int temp = 1;

    for(int i = 2; i <= 31; i++) {
        for(int j = 2; j <= 10; j++) {
            count = j;
            do {
                temp *= i;
                if(temp > max && x >= temp) {
                    max = temp
                }
                count--
            }while(count >= 1)
        }
    }
    cout << max << endl;
}  

Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: 'count' was not declared in this scope
   12 |             count = j;
      |             ^~~~~
a.cc:16:31: error: expected ';' before '}' token
   16 |                     max = temp
      |                               ^
      |                               ;
   17 |                 }
      |                 ~              
a.cc:19:31: error: expected ';' before '}' token
   19 |             }while(count >= 1)
      |                               ^
      |                               ;
   20 |         }
      |         ~
Language: C++

#include<iostream>
#include<sstream>
#include<vector>
#include<iterator>
using namespace std;

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

	int ret = 1;
	for(int i=1; i<X; i++){
		for(int j=2; j<X; j++){
			int n = pow(i, j);
			if(n<=X)
				ret = max(ret, n);
		}
	}

	cout << ret << endl;

	return 0;
}


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

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

int x;
bool val[1005];
int main()
{
	memset(val,0,sizeof(val));
	val[1]=1;
	for(int i=2;i*i<=1000;i++)
	{
		int now=i;
		while(now<=1000)
		{
			val[now]=1;
			now*=i;
		}
	}
	scanf("%d",&x);
	for(int i=x;i>=1;i--)
	{
		if(val[i]) printf("%d\n",i),break;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:45: error: expected primary-expression before 'break'
   22 |                 if(val[i]) printf("%d\n",i),break;
      |                                             ^~~~~
Language: C++

#include<algorithm>
#include <iostream>
#include <math.h>
#include <cstdio>
#include <string.h>
using namespace std;
int main(void){
	int X,ANS[10000],c=0;
	cin >> X;
	if(X<=3){cout << "1" << endl;exit(0);}
	for (int i=X; i >= 1; i--) {
		for (int j=X; j >=2 ; j--) {
			int temp=pow(i,j);
			if(temp<=X){
				ANS[c]=temp;
				++c;
			}
		}
	}
	sort(ANS,ANS+c);
	cout << ANS[C-1] << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:21: error: 'C' was not declared in this scope
   21 |         cout << ANS[C-1] << endl;
      |                     ^
Language: C

include<stdio.h>
include<math.h>
int main()
{
   int X,a,b,c,i;
   int s[];
   a>1;
   b>2;
   scanf("%d",&X);
   if(pow(a,b)<X)
   {
      s[]=X;
   }
   if(s[i]<s[i+1])
   {
       s[i]=s[i+1];
   }
   printf(‘%d",s[i+1]);
   return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
main.c:18:11: error: stray '\342' in program
   18 |    printf(<U+2018>%d",s[i+1]);
      |           ^~~~~~~~
main.c:18:14: warning: missing terminating " character
   18 |    printf(‘%d",s[i+1]);
      |              ^
main.c:18:14: error: missing terminating " character
   18 |    printf(‘%d",s[i+1]);
      |              ^~~~~~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:16: error: no matching function for call to 'max(int&, <unresolved overloaded function type>)'
   15 |         res=max(res,max);
      |             ~~~^~~~~~~~~
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: 'constexpr const _Tp& std::max(const _Tp&, const _Tp&) [with _Tp = int]'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:36: note:   no known conversion for argument 2 from '<unresolved overloaded function type>' to 'const int&'
  257 |     max(const _Tp& __a, const _Tp& __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:15:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   15 |         res=max(res,max);
      |             ~~~^~~~~~~~~
Language: C

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

int main(void)
{
	int X;
	int  b, p, max = 0;

	scanf("%d", &X);

	if (X == 1) {
		printf("1\n");
		return 0;
	}
	else {
		for (b = 2; b < X; b++) {
			for (p = 2; pow((double)b, (double)p) < (double)X; p++) {
				//printf("%d %d %d \n", b, p, (int)pow((double)b, (double)p));
				if ((int)pow((double)b, (double)p) < X && (int)pow(b, p) > max)
					max = (int)pow(b, p);
			}
		}

		//printf("%d %d %d \n", b, p, (int)pow((double)b, (double)p));
		printf("%d\n", max);
		//printf("%d %d %d", abs(a - b), abs(b - c), abs(a - c));

		return 0;
	}
}		
}

Compiler output:
main.c:31:1: error: expected identifier or '(' before '}' token
   31 | }
      | ^