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

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

int main() {
	int X; cin >> X;
	max = 1;
	for(b = 1; b <= X; b++){
		int total = b * b;
		while(max <= X){
			max = max(max, total);
			total *= b;
		}
	}
	return 0;
}n 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: overloaded function with no contextual type information
    7 |         max = 1;
      |               ^
a.cc:8:13: error: 'b' was not declared in this scope
    8 |         for(b = 1; b <= X; b++){
      |             ^
a.cc:10:27: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<='
   10 |                 while(max <= X){
      |                       ~~~~^~~~
a.cc:11:34: error: no matching function for call to 'max(<unresolved overloaded function type>, int&)'
   11 |                         max = max(max, total);
      |                               ~~~^~~~~~~~~~~~
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: '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:20: note:   no known conversion for argument 1 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
a.cc: At global scope:
a.cc:16:2: error: 'n' does not name a type
   16 | }n 0;
      |  ^
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
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(){
	int X;
	cin >> X;
	ll res = 1;
	for(int i=1;i<X;i++){
		for(int j=2;j<=10;j++){
			ll tmp = powint(i, j)
			if (tmp <= X){
				res = max(res, tmp);
			}else{
				break;
			}
		}
	}
	cout << res << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:34: error: 'powint' was not declared in this scope
   18 |                         ll tmp = powint(i, j)
      |                                  ^~~~~~
Language: C++

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

int main() {
  int X;
  cin >> X;
  int max;
  if (X == 1) cout << 1;
  else {
	for (int b=2; b<=X; b++) {
	  int y = X
	  int cnt = 0;
	  while (y%b == 0) {
		y /=b;
		cnt++;
	  }
	  if (y == 1 && b*cnt>max) max=b*cnt
	}
	cout << max;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: expected ',' or ';' before 'int'
   13 |           int cnt = 0;
      |           ^~~
a.cc:16:17: error: 'cnt' was not declared in this scope; did you mean 'int'?
   16 |                 cnt++;
      |                 ^~~
      |                 int
a.cc:18:27: error: 'cnt' was not declared in this scope; did you mean 'int'?
   18 |           if (y == 1 && b*cnt>max) max=b*cnt
      |                           ^~~
      |                           int
Language: C++

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

//nのm乗
int pow(int n,int m) {
  int p = 1;
  for (int i=0;i<m;m++) {
	p *= n;
  }
}

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

Compiler output:
a.cc: In function 'int pow(int, int)':
a.cc:11:1: warning: no return statement in function returning non-void [-Wreturn-type]
   11 | }
      | ^
a.cc: In function 'int main()':
a.cc:25:4: error: expected '}' at end of input
   25 |   }
      |    ^
a.cc:13:12: note: to match this '{'
   13 | int main() {
      |            ^
Language: C++

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

using namespace std;


int main()
{
	int X;

	cin >> X;

	int ni = 1;
	int n = 1;
	while (n <= X) {
		ni++;
		n = pow(ni, 2);
	}

	cout << pow(ni - 1, 2);


	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:20:21: error: 'pow' was not declared in this scope
   20 |                 n = pow(ni, 2);
      |                     ^~~
a.cc:23:17: error: 'pow' was not declared in this scope
   23 |         cout << pow(ni - 1, 2);
      |                 ^~~
Language: C++

#include <iostream>
#include <algorithm>
#include <math>
using namespace std;

int main(){
  int n, maxi = -100000000;
  cin >> n;
  for(int i = 1; i <= n; i++){
    for(int j = 2; j < n; j++){
      int p = pow(i,j);
      if(n < p)break;
      maxi = max(maxi, p);
    }
  }
  cout << maxi << endl;
  return 0;
}

Compiler output:
a.cc:3:10: fatal error: math: No such file or directory
    3 | #include <math>
      |          ^~~~~~
compilation terminated.
Language: C++

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

using namespace std;

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

	int ans = 0;
	bool flag = false;
	for (int b = 1; b < 1000; b++) 
	{
		for (int p = 2; p < 1000; p++)
		{
			int _x = pow(b, p);
			
			if (_x <= X && ans < _x)
			{
				ans = _x;
			}
		}
	}

	cout << ans << endl;

	return 0;
}


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

#include<iostream>
#include<math.h>
#include<algorithm>
using namespace std;
int main(){
  int x;
  cin>>x;
  int ans;
  for(int i=1;i<x;i++){
    for(int j=2;j<x;j++){
      int k=pow(i,j);
      if(k>x)break;
      else ans=max({ans,k});
    }
  }
  cout<<ans<<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:16:19: error: expected '}' at end of input
   16 |   cout<<ans<<endl;
      |                   ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

/**
 *      ABC 97 B
 *      author  : kyomukyomupurin
 *      created : 2018/08/23
**/

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

int main(){
    int X; cin >> X;
    vector<int> v;
    v.push_back(1);
    for (int i = 2; i < 10; ++i) {
        v.push_back(pow(2, i));
    }
    for (int i = 2; i < 7; ++i) {
        v.push_back(pow(3, i));
    }
    for (int i = 2; i < 5; ++i) {
        v.push_back(pow(5, i));
    }
    for (int i = 6; i < 9; ++i) {
        for (int j = 2; j < 4; ++j) {
            v.push_back(pow(i, j));
        }
    }
    for (int i = 2; i < 4; ++i) {
        v.push_back(pow(10, i));
    }
    for (int i = 11; i < 32; ++i) {
        v.push_back(pow(i, 2));    
    }
    sort(v.begin(), v.end());
    for (int i = 0; i < v.size(); ++i){
        if (X == 1000) cout << 1000; break;
        else if (X >= v.at(i) && X < v.at(i + 1)){
            cout << v.at(i); break;
        }
    }
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:37:9: error: 'else' without a previous 'if'
   37 |         else if (X >= v.at(i) && X < v.at(i + 1)){
      |         ^~~~
Language: C++

#include <cstdio>
#include <cmath>

using namespace std;

int main() {
	int X;
	scanf_s("%d", &X);
	int res = 0;
	if (X < 4) {
		printf("1");
		return 0;
	}
	for (int i = 2; i <= log2(X); i++) {
		for (int j = 1; j <= sqrt(X); j++) {
			if (res <= pow(j, i) && pow(j, i) <= X)res = pow(j, i);
		}
	}
	printf("%d", res);
	return 0;
}

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

    #include<iostream>
    #include<cmath>
    using namespace std;
     
    int main(){
      int X;
      cin>>X;
      int MAX=0;
      
      for(int i=1;i<=32;i++){
        for(int j=2;1;j++){
          if(X==pow(i,j)){
            cout<<pow(i,j)<<endl;
            return 0;
          } else if(X<pow(i,j)){
            MAX=max(MAX,static_cast<int>pow(i,j-1));
            break;
          }
        }
      }
      cout<<MAX<<endl;
      
      return 0;
     
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:16:41: error: expected '(' before 'pow'
   16 |             MAX=max(MAX,static_cast<int>pow(i,j-1));
      |                                         ^~~
      |                                         (
a.cc:16:52: error: expected ')' before ';' token
   16 |             MAX=max(MAX,static_cast<int>pow(i,j-1));
      |                    ~                               ^
      |                                                    )
Language: C++

    #include<iostream>
    #include<cmath>
    using namespace std;
     
    int main(){
      int X;
      cin>>X;
      int MAX=0;
      
      for(int i=1;i<=32;i++){
        for(int j=2;1;j++){
          if(X==pow(i,j)){
            cout<<pow(i,j)<<endl;
            return 0;
          } else if(X<pow(i,j)){
            MAX=max(MAX,pow(i,j-1));
            break;
          }
        }
      }
      cout<<MAX<<endl;
      
      return 0;
     
    }

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

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

int main(){
  int X;
  cin>>X;
  int MAX=0;
  
  for(int i=1;i<=32;i++){
    for(int j=2;1;j++){
      if(X==pow(i,j)){
        cout<<pow(i,j)<<endl;
        return 0;
      } else if(X<pow(i,j)){
        MAX=max(MAX,pow(i,j-1));
        break;
      }
    }
  }
  cout<<MAX<<endl;
  
  return 0;

}

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

#include <iostresm>
#include <cmath>

using namespace std;

int main()
{
  	int X;
  	cin >> X;
  	int ans = 1;
  	for(int b = 1; b <= sqrt(X); b++){
      	int B = b;
      	for(; B < X; ){
          	B *= b;
        }
      	if(ans < B){
          	ans = B;
        }
    }
  	cout << ans;
  	return 0;
}

Compiler output:
a.cc:1:10: fatal error: iostresm: No such file or directory
    1 | #include <iostresm>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
using namespace std;

int main() {
	int x;cin >> x;
	int ans = 0;
	for (int b = 1; b <= sqrt(x);b++) {
		for (int p = 1;p <= 9;p++) {
			int bp = 1;
			for (int i = 1;i <= p;i++)bp *= b;
			if (ans < bp && bp<x)ans = bp;
		}
	}
	cout << ans << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:30: error: 'sqrt' was not declared in this scope
    7 |         for (int b = 1; b <= sqrt(x);b++) {
      |                              ^~~~
Language: C++

#include<iostream>
#include<vector>
#include<cmath>
using namespace std;
int main(){
	int x;
	cin>>x;
	vector<bool> expo(x+1);
	expo[1]=1;
	for(int i=2;i<=int(sqrt(x));i++){
		int v=i*i;
		while(v<=x){
			expo[v]=1;
			v*=i;
		}
	}
	for(int i=x;i>=1;i--)
		if(expo[i]){
			cout<<i<<endl;
			return 0;
		}
}
Submission

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

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

using namespace std;

int main() {
	int X;	cin >> X;
	vector<int> a;
	a.push_back(1);
	for (int i = 2; i <= pow(X, 0.5); ++i) {
		for (int j = 2;; ++j) {
			if (pow(i, j) > 10) {
				break;
			}
			a.push_back(pow(i, j));
		}
	}
	cout << *max_element(a.begin(), a.end()) << endl;
	return 0;
}

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

   #include <stdio.h>
  
  
    int main(void){
      int a, b;
       scanf("%d",&x);
       int max = 1;
       
       for(a=2;a<=b;a++){
          int c = a*a;
          
          while( c <= b){
            if( max < c){
                 max = c;
            }
          }
        }
        
      printf("%d",max);
      return 0;
     }

Compiler output:
main.c: In function 'main':
main.c:6:20: error: 'x' undeclared (first use in this function)
    6 |        scanf("%d",&x);
      |                    ^
main.c:6:20: note: each undeclared identifier is reported only once for each function it appears in
Language: C

   #include <stdio.h>
  
  
    int main(void){
      int a, b;
       scanf("%d",&x);
       int max = 1;
       
       for(a=2;a<=b;a++){
          int c = a*a;
          
          while( c <= b){
            if( max < c){
                 max = c;
            }
          ]
        }
        
      printf("%d",max);
      return 0;
     }

Compiler output:
main.c: In function 'main':
main.c:6:20: error: 'x' undeclared (first use in this function)
    6 |        scanf("%d",&x);
      |                    ^
main.c:6:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:11: error: expected statement before ']' token
   16 |           ]
      |           ^
main.c:21:6: error: expected declaration or statement at end of input
   21 |      }
      |      ^
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(void){
    // Your code here!
    int A[200],N,i=0,ans;
    cin>>N;
    for (int b=1;b<=31;b++){
        for (int p=2;p<=11;p++){
            if (pow(b,p)<=1000){
                A[i]=pow(b,p);
                i+=1;
            }
        }
    }
    ans=0;
    for (int j=0;j<=200;j++){
        if (A[j]<=N && ans<A[j])
            ans=A[j];
    }
    cout<<ans<<endl;
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
    int a[50],b,c=0;
    cin>>b;
    for(int i=0;i<1000;i++){
        if(sqrt(i)%1.0==0.0){
            a[c]=i;
            c++;
        }
    }
    for(int i=0;i<50;i++){
        if(b<a[i]){
            cout<<a[i-1]<<endl;
            return 0;
        }
        if(a[i]==961){
            cout<<961<<endl;
            return 0;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: invalid operands of types '__gnu_cxx::__enable_if<true, double>::__type' {aka 'double'} and 'double' to binary 'operator%'
    7 |         if(sqrt(i)%1.0==0.0){
      |            ~~~~~~~^~~~
      |                |   |
      |                |   double
      |                __gnu_cxx::__enable_if<true, double>::__type {aka double}
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int a[50],b,c=0;
    cin>>b;
    for(int i=0;i<1000;i++){
        if(sqrt(i)%1==0){
            a[c]=i;
            c++;
        }
    }
    for(int i=0;i<50;i++){
        if(b<a[i]){
            cout<<a[i-1]<<endl;
            return 0;
        }
        if(a[i]==961){
            cout<<961<<endl;
            return 0;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: invalid operands of types '__gnu_cxx::__enable_if<true, double>::__type' {aka 'double'} and 'int' to binary 'operator%'
    7 |         if(sqrt(i)%1==0){
      |            ~~~~~~~^~
      |                |   |
      |                |   int
      |                __gnu_cxx::__enable_if<true, double>::__type {aka double}
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int a[50],b,c=0;
    cin>>b;
    for(int i=0;i<1000;i++){
        if(sqrt(i)%1==0){
            a[c]=sprt(i);
            c++;
        }
    }
    for(int i=0;i<50;i++){
        if(b<a[i]){
            cout<<a[i-1]<<endl;
            return 0;
        }
        if(a[i]==961){
            cout<<961<<endl;
            return 0;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: invalid operands of types '__gnu_cxx::__enable_if<true, double>::__type' {aka 'double'} and 'int' to binary 'operator%'
    7 |         if(sqrt(i)%1==0){
      |            ~~~~~~~^~
      |                |   |
      |                |   int
      |                __gnu_cxx::__enable_if<true, double>::__type {aka double}
a.cc:8:18: error: 'sprt' was not declared in this scope; did you mean 'sqrt'?
    8 |             a[c]=sprt(i);
      |                  ^~~~
      |                  sqrt
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int a[50],b,c=0;
    cin>>b;
    for(int i=0;i<1000;i++){
        if(sprt(i)%1==0){
            a[c]=sprt(i);
            c++;
        }
    }
    for(int i=0;i<50;i++){
        if(b<a[i]){
            cout<<a[i-1]<<endl;
            return 0;
        }
        if(a[i]==961){
            cout<<961<<endl;
            return 0;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: 'sprt' was not declared in this scope; did you mean 'sqrt'?
    7 |         if(sprt(i)%1==0){
      |            ^~~~
      |            sqrt
Language: C++

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

using namespace std;

int main() {
	int x;
	cin >> x;
	int a[500];
	int ans,k=0;
	for (int i = 1; i <= 31; i++) {
		for (int j=2; j < 11; j++) {
			ans = pow((double)i,(double)j);
			if (x >= ans) {
				a[k] = ans;
				k++;
			}
		}
	}
	int maxv = -1;
	for (int i = 0; i < k; i++) {
		maxv = max(maxv, a[i]);
	}
	cout << maxv << endl;
}

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

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

using namespace std;

int main() {
	int x;
	vector<int> v;
	cin >> x;
	int ans,k=0;
	for (int i = 1; i < 32; i++) {
		for (int j = 2; j < 11; i++) {
			ans = pow((double)i, (double)j);
			if (x >= ans) {
				v.push_back(ans);
			}
		}
	}

	int maxv = -1;
	for (int i = 0; i < v.size(); i++) {
		maxv = max(maxv, v[i]);
	}
	cout << maxv << endl;
}

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

#include<iostram>
#include<cmath>
using namespace std;
int main(void){
  int x;
  cin>>x;
  x=sqrt(x);
  cout<<(int)pow(x,2)<<endl;
  return 0;
}

Compiler output:
a.cc:1:9: fatal error: iostram: No such file or directory
    1 | #include<iostram>
      |         ^~~~~~~~~
compilation terminated.
Language: C++

#include<stdio.h>
#include<math.h>
int main(void)
{
    int a, b, i=1, j, X;
    scanf("%d", &X);

    if(X >= 2){
    while(i <= X){
         i++;
         a = i;
         while(a < X){
           b = a;
           a = a * i;

         }
    }
      printf("%d\n", b);
    }
    else if(X == 1)
      printf("%d\n", X);

    return 0;


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

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cctype>
#include <functional>
#include <map>

using namespace std;
typedef long long ll;

#define reps(i,s,n) for(int (i) = (s); (i) < (n); (i)++)
#define rep(i,n) reps(i,0,n)

int main(){
    int x,y = 0;
    int ans = 2;
    cin >> x;
    int sqrtX = sqrt(x);
    if(x != 1){
        reps(j,2, sqrtX+1){
            y = j;
            while(y*y <= x){
                y *= j;
            }
            if(y > ans) ans = y;
        }
    }else{
        ans = 1;
    }
        cout << ans << endl;
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:17: error: 'sqrt' was not declared in this scope; did you mean 'sqrtX'?
   19 |     int sqrtX = sqrt(x);
      |                 ^~~~
      |                 sqrtX
Language: C++

#include<stdio.h>
#include<math.h>
int main(void)
{
    int a, b, i=1, j, X;
    scanf("%d", &X);
    
    if(X >= 2){
    while(i <= X){
         i++;
         a = i;
         while(a < X){  
           b = a;
           a = a * i;

         }
    }     
      printf("%d\n", b);
    }
    else if(X == 1)
      printf("%d\n", X);

    return 0;


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


#include<iostream>
#include<algorithm>
#include<string>
#include<math.h>
#include<vector>
//#include <bits/stdc++.h>
#include<cstring>
#include<iostream>
using namespace std;
int main() {
	int X;
	cin >> X;
	int mx = 0;
	if (X == 1) {
		cout << X << endl;
		return 0;
		//cin >> X;
	}
		
	for (int i = 1; i <= X; i++) 
		for (int j = 2; j <= X; j++) {
			//cout << i << " " << j << " " << pow(i, j) << endl;
			if (pow(i, j) == X) {
				//cout << "i j " << i << " " << j << " " << X << endl;
				mx = X;
				break;
			}
			else if (pow(i, j) > X && j == 2) {
				//mx = max(mx, (int)pow(i, j - 1));
				//cout << "i j " << i << " " << j - 1 << " " << (int)pow(i, j - 1) << " max " << mx << endl;
				break;
			}
			else if (pow(i,j) > X && j >=3) {
				mx = max(mx, (int)pow(i, j - 1));				
				//cout << "i j " << i << " " << j-1 << " " << (int)pow(i, j - 1) << " max " << mx << endl;
				break;
			}
		}
	cout << mx << endl;
	//cin >> X;
	return 0;

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

#include <bits/stdc++.h>
#include <boost/range/irange.hpp>
 
using namespace std;
using namespace boost;
 
using ll = long long;
 
int main(){
    ll X;
    cin >> X;
  	if (X == 1) cout << 1;
  	else {
    ll ret = 1;
    for (auto && b: irange(2LL, 100LL)){
        b *= b;
        while (b <= X){
            ret = max(ret, b);
            b *= b;
        }
    }
    }
    cout << ret;
 
  return 0;
}

Compiler output:
a.cc:2:10: fatal error: boost/range/irange.hpp: No such file or directory
    2 | #include <boost/range/irange.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:28: error: expected primary-expression before ')' token
   15 | for ( int i =X;i >=1; i - -) if ( expo [i ]){
      |                            ^
Language: C++

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

Compiler output:
a.cc:1:11: fatal error:  bits / stdc ++. h : No such file or directory
    1 | # include < bits / stdc ++. h >
      |           ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int X = sc.nextInt();
		int ans = 0;
		int i = 0;

		while (true) {
			i++;
			if (!(int)Math.pow(i, 2) > X) {
				break;
			} else {
				ans = (int)Math.pow(i, 2);
			}
		}
		System.out.println(ans);
	}
}


Compiler output:
Main.java:12: error: bad operand type int for unary operator '!'
			if (!(int)Math.pow(i, 2) > X) {
			    ^
1 error
Language: C++

#include <iostream>
#include <string>

using namespace std;

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

	int i = 0;

	while (true)
	{
		int j = i + 1;

		if (j * j > a)
		{
			break;
		}
		i++;
	}

	for (auto it = scores.begin(); it != scores.end(); ++it)
	{
		cout << i << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:24: error: 'scores' was not declared in this scope
   24 |         for (auto it = scores.begin(); it != scores.end(); ++it)
      |                        ^~~~~~
Language: C++

#include <iostream>
#include <math.h>
using namespace std

int main(){
  int X;
  cin >> X;
  //X以下のべき乗数を探す.
  //調べる整数の最大値.
  int threthold = floor(sqrt(X));
  int ans = 0;
  for(int i=2; i<threthold; ++i){
    for(int j=2; j<11; ++j){
        int power = pow(i,j);
      	//越えてたら次の数にする.
      	if(power > X){
           break;
        }
      	//答え更新.
    	if(X-ans > X-power){
          ans = power;
        }
    }
  }
  cout << ans << endl;
  return 0;
}



Compiler output:
a.cc:3:20: error: expected ';' before 'int'
    3 | using namespace std
      |                    ^
      |                    ;
    4 | 
    5 | int main(){
      | ~~~
Language: C++

#include <iostream>
#include <math.h>
using namespace std::

void main(){
  int X;
  cin >> X;
  //X以下のべき乗数を探す.
  //調べる整数の最大値.
  int threthold = floor(sqrt(X));
  int ans = 0;
  for(int i=2; i<threthold; ++i){
    for(int j=2; j<11; ++j){
        int power = pow(i,j);
      	//越えてたら次の数にする.
      	if(power > X){
           break;
        }
      	//答え更新.
    	if(X-ans > X-power){
          ans = power;
        }
    }
  }
  cout << ans << endl;
}



Compiler output:
a.cc:5:1: error: expected identifier before 'void'
    5 | void main(){
      | ^~~~
a.cc:3:22: error: expected ';' before 'void'
    3 | using namespace std::
      |                      ^
      |                      ;
    4 | 
    5 | void main(){
      | ~~~~                  
a.cc:5:1: error: '::main' must return 'int'
    5 | void main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >> X;
      |   ^~~
      |   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:25:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   25 |   cout << ans << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:25:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   25 |   cout << ans << endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>
#include <math.h>

void main(){
  int X;
  cin >> X;
  //X以下のべき乗数を探す.
  //調べる整数の最大値.
  int threthold = floor(sqrt(X));
  int ans = 0;
  for(int i=2; i<threthold; ++i){
    for(int j=2; j<11; ++j){
        int power = pow(i,j);
      	//越えてたら次の数にする.
      	if(power > X){
           break;
        }
      	//答え更新.
    	if(X-ans > X-power){
          ans = power;
        }
    }
  }
  cout << ans << endl;
}



Compiler output:
a.cc:4:1: error: '::main' must return 'int'
    4 | void main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> X;
      |   ^~~
      |   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: 'cout' was not declared in this scope; did you mean 'std::cout'?
   24 |   cout << ans << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:24:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   24 |   cout << ans << endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: Java

mport java.util.*;

public class Main{
    public static void main(String[] args) {
         Scanner scn=new Scanner(System.in);
         int n=scn.nextInt();
         while(n!=0){
             double a=Math.sqrt((double)n);
             if(n%a==0){
                 System.out.println(n);
                 break;
             }else{n--;}
         }
    }
}


Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.*;
^
1 error
Language: C

#include <stdio.h>
int main(){
int X, b, count;
int max = 1;
scanf("%d",&X);
for(b=1;b<=31 && b <= X;b++){xs
  count = b;
  while(b != 1 && count*b<=X){
    count = count * b;
    if(max < count) max = count;
  }
}
printf("%d", max);
}

Compiler output:
main.c: In function 'main':
main.c:6:30: error: unknown type name 'xs'
    6 | for(b=1;b<=31 && b <= X;b++){xs
      |                              ^~
Language: C++

#include<iostream>

using namespace std;

int powI(int b, int p) {
	int r = 1;
	for (int i = 0; i < p; i++) {
		r *= b;
	}
	return r;
}

int main() {
	
	int X, max = 0;
	cin >> X;
	for (int i = 2; i < sqrt(double(X)); i++) {
		for (int j = 1;; j++) {
			int tmp = powI(i, j);
			if (tmp > X) {
				break;
			}
			if (tmp >= max) {
				max = tmp;
			}
		}
	}
	clock_t end = clock();
	cout << max << endl;

	return 0;
}

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

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <cmath>

using namespace std;

#define rep(i,n) for(int i = 0; i != n; ++i)

const double EPS = 1e-10;
const int INF = 1e7;

vector <int> a;

int main(){
  int a;
  scanf("%d", &a);
  int root_a = sqrt(a);
  int max_val = 0
  for (int i=2; i<root_a; i++) {
    int val = log(a) / log(i);
    if (max_val < pow(i, val)) {
      max_val = pow(i, val);
    }
  }
  std::cout << max_val << '\n';
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:3: error: expected ',' or ';' before 'for'
   28 |   for (int i=2; i<root_a; i++) {
      |   ^~~
a.cc:28:17: error: 'i' was not declared in this scope
   28 |   for (int i=2; i<root_a; i++) {
      |                 ^
Language: C++

#include<iostream>
using namespace std;
 
int main() {
	int n, m, max = 0;
	cin >> n;
	for (int i = 1; i <= n; i++) {
		b = i * i;
		for (int j = 1; j <= n; j++) {
			if (m > x) {
				break;
			}
			else if (y <= n && y > max) {
				max = m;
			}
			m *= i;
		}
	}
	cout << max << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: 'b' was not declared in this scope
    8 |                 b = i * i;
      |                 ^
a.cc:10:33: error: 'x' was not declared in this scope
   10 |                         if (m > x) {
      |                                 ^
a.cc:13:34: error: 'y' was not declared in this scope
   13 |                         else if (y <= n && y > max) {
      |                                  ^
Language: C++

#include<iostream>
using namespace std;
int main() {
	int n;
	int ans = 1;
	cin >> n;
	for (int i = 0; i < n; i++) {
		for (int j = 2; j < n; j++) {
			if (pow(i, j) <= n && pow(i, j) > ans) {
				ans = pow(i, j);
			}
		}
	}
	cout << ans;
}

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

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

int main(void){
  int x, m, t;
  cin >> x;
  
  m=0;
  for (int b=1; b*b<=p; b++){
    t = b;
    do{
      t *= b;
      m = max(m,t);
    } while (t <= x);
  }
  cout << m << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:22: error: 'p' was not declared in this scope
   11 |   for (int b=1; b*b<=p; b++){
      |                      ^
Language: C++

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

int main(void){
  int x, m, t;
  cin >> x;
  
  m=0;
  for (int b=1; b*b<=p; b++){
    for (int p=2; (t=pow(b,p))<=x; p++){
      m = max(m,t);
    }
  }
  cout << m << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:22: error: 'p' was not declared in this scope
   11 |   for (int b=1; b*b<=p; b++){
      |                      ^
Language: C++

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


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

#include <iostream>
#include <cmath>
#include <algorithm>

using namespace std;

int main(){
  int a;

  int b = 1;
  int c = 1;
  int d = 1;
  int e = 1;
  cin >> a;

  while(b < a){
    b *= 2;
  }
  while(c < a){
    c *= 3;
  }
  while(d < a){
    d *= 5;
  }
  while(e < a){
    e *= 7;
  }

  int max = max({b/2, c/3, d/5, e/7});

  cout << max <<endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:16: error: 'max' cannot be used as a function
   29 |   int max = max({b/2, c/3, d/5, e/7});
      |             ~~~^~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
 2 #include <algorithm>
 3 using namespace std;
 4  
 5  
 6 const int N=200000+10;
 7 int Father[N];
 8  
 9 int find(int x){
10     return Father[x]==x ? x:Father[x]=find(Father[x]);
11 }
12  
13 void Union(int x,int y){
14     int fx=find(x),fy=find(y);
15     if(fx!=fy){
16         Father[fx]=fy;
17     }    
18 }
19  
20 struct TnT{
21     int x;
22     int y;
23     int id;
24 }T[N];
25  
26 struct side{
27     int u;
28     int v;
29     int d;
30 }S[N];
31  
32 bool cmpx(TnT a,TnT b){
33     return a.x<b.x;    
34 }
35  
36 bool cmpy(TnT a,TnT b){
37     return a.y<b.y;    
38 }
39  
40 bool cmpd(side a,side b){
41     return a.d<b.d;    
42 }
43  
44 int main(){
45     int n,m=0;
46     cin>>n;
47     for(int i=1;i<=n;i++){
48         cin>>T[i].x>>T[i].y;
49         T[i].id=i;
50         Father[i]=i;
51     }
52     
53     sort(T+1,T+1+n,cmpx);
54     for(int i=1;i<n;i++){
55         S[m].u=T[i].id;
56         S[m].v=T[i+1].id;
57         S[m].d=T[i+1].x-T[i].x;
58         m++;
59     }
60     
61     sort(T+1,T+1+n,cmpy);
62     for(int i=1;i<n;i++){
63         S[m].u=T[i].id;
64         S[m].v=T[i+1].id;
65         S[m].d=T[i+1].y-T[i].y;
66         m++;
67     }
68     
69     long long ans=0;
70     sort(S,S+m,cmpd);
71     for(int i=0;i<m;i++){
72         if(find(S[i].u)!=find(S[i].v)){
73             ans+=S[i].d;
74             Union(S[i].u,S[i].v);
75         }
76     }
77     
78     cout<<ans<<endl;
79     return 0;
80 } 

Compiler output:
a.cc:2:4: error: stray '#' in program
    2 |  2 #include <algorithm>
      |    ^
a.cc:2:2: error: expected unqualified-id before numeric constant
    2 |  2 #include <algorithm>
      |  ^
a.cc:4:2: error: expected unqualified-id before numeric constant
    4 |  4
      |  ^
a.cc:7:2: error: expected unqualified-id before numeric constant
    7 |  7 int Father[N];
      |  ^
a.cc:8:2: error: expected unqualified-id before numeric constant
    8 |  8
      |  ^
a.cc:12:1: error: expected unqualified-id before numeric constant
   12 | 12
      | ^~
a.cc:19:1: error: expected unqualified-id before numeric constant
   19 | 19
      | ^~
a.cc:24:5: error: 'T' does not name a type
   24 | 24 }T[N];
      |     ^
a.cc:25:1: error: expected unqualified-id before numeric constant
   25 | 25
      | ^~
a.cc:30:5: error: 'S' does not name a type
   30 | 30 }S[N];
      |     ^
a.cc:31:1: error: expected unqualified-id before numeric constant
   31 | 31
      | ^~
a.cc:35:1: error: expected unqualified-id before numeric constant
   35 | 35
      | ^~
a.cc:39:1: error: expected unqualified-id before numeric constant
   39 | 39
      | ^~
a.cc:43:1: error: expected unqualified-id before numeric constant
   43 | 43
      | ^~
Language: C++

#include<iostream>
#include<cmath>
#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,i=1,x=2,g=1;
	cin>>n;
	int a[n];
	a[0]=1;
	for(int i=1;i<=n;i++)
	while(i<=9)
	{
      while(pow(x,i)<=n)
      {
	   	a[g]=pow(x,i);
	    x++;
	   	g++;
      }
      i++;
      x=2;
    }
    sort(a[0];a[g-1])
    cout<<a[g-1];
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:14: error: expected ')' before ';' token
   23 |     sort(a[0];a[g-1])
      |         ~    ^
      |              )
a.cc:23:21: error: expected ';' before ')' token
   23 |     sort(a[0];a[g-1])
      |                     ^
      |                     ;
Language: C++

#include<iostream>
#include<cmath>
#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,i=1,x=2,g=1;
	cin>>n;
	int a[n];
	a[0]=1;
	for(int i=1;i<=n;i++)
	while(i<=9)
	{
      while(pow(x,i)<=n)
      {
	   	a[g]=pow(x,i);
	    x++;
	   	g++;
      }
      i++;
      x=2;
    }
    sort(a[0];a[g-1];;);
    cout<<a[g-1];
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:14: error: expected ')' before ';' token
   23 |     sort(a[0];a[g-1];;);
      |         ~    ^
      |              )
a.cc:23:23: error: expected primary-expression before ')' token
   23 |     sort(a[0];a[g-1];;);
      |                       ^
Language: C++

int main()
{
	int n,i=1,x=2,g=1;
	cin>>n;
	int a[n];
	a[0]=1;
	for(int i=1;i<=n)
	while(i<=9)
	{
      while(pow(x,i)<=n)
      {
	   	a[g]=pow(x,i);
	    x++;
	   	g++;
      }
      i++;
      x=2;
    }
    sort(a[0],a[g-1], ,);
    cout<<a[g-1];
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin>>n;
      |         ^~~
a.cc:7:25: error: expected ';' before ')' token
    7 |         for(int i=1;i<=n)
      |                         ^
      |                         ;
a.cc:10:13: error: 'pow' was not declared in this scope
   10 |       while(pow(x,i)<=n)
      |             ^~~
a.cc:19:23: error: expected primary-expression before ',' token
   19 |     sort(a[0],a[g-1], ,);
      |                       ^
a.cc:19:24: error: expected primary-expression before ')' token
   19 |     sort(a[0],a[g-1], ,);
      |                        ^
a.cc:19:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   19 |     sort(a[0],a[g-1], ,);
      |     ^~~~
      |     short
a.cc:20:5: error: 'cout' was not declared in this scope
   20 |     cout<<a[g-1];
      |     ^~~~
Language: C++

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

int main()
{
    int n;
    cin>>n;
    vector<bool>e(n+1);
    e.at(1)=true;
    for(int b=2;b<=n;b++){
      for(int p=2;pow(b,p)<=n;p++){
        e.at(pow(b,p))=true;
        }
      }
      for(int i=n;n>0;n--){
       if(e.at(i)){
       cout<<x<<endl;
       break;
       }
       }
return 0;
}


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

#include<iostream>
#include<stdio.h>
#include <cstdlib>  // abs() for integer
#include <cmath>    // abs() for float, and fabs()

int main(void){
    int x; //input
    int temp;
    int b; //roop counter
    int p;
    int max;

    std::cin >> x;

    if(x%2 == 0){
        for(b=2; b<=x; b+=2){
            p = 0;
            temp = x;
            while(temp%b == 0){
                temp = x/b;
                p++;
            }
            if(p > 1) max = x;
        }
    }
    
    else if(x%2 == 1)|{
        for(b=1; b<=x; b+=2){
            p = 0;
            temp = x;
            while(temp%b == 0){
                temp = x/b;
                p++;
            }
            if(p > 1) max = x;
        }
    }

    std::cout << max;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:22: error: expected primary-expression before '|' token
   27 |     else if(x%2 == 1)|{
      |                      ^
a.cc:27:23: error: expected primary-expression before '{' token
   27 |     else if(x%2 == 1)|{
      |                       ^
Language: C++

#include<iostream>
#include<stdio.h>
#include <cstdlib>  // abs() for integer
#include <cmath>    // abs() for float, and fabs()

int main(){
    int x; //input
    double temp;
    int b; //roop counter
    int p;
    int max;

    std::cin >> x;

    for(b=1; b<=x; b++){
        temp = x;
        temp
        while(temp%b == 0){
            temp = x/b;
            p++;
        }
        if(p > 1) max = x;
    }

    cout << x;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:13: error: expected ';' before 'while'
   17 |         temp
      |             ^
      |             ;
   18 |         while(temp%b == 0){
      |         ~~~~~
a.cc:25:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   25 |     cout << x;
      |     ^~~~
      |     std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include<cmath>
#define MAX_X 1000

using namespace std;

int main()
{
       int X;
       
       int temp;
	   int b;
	
	   cin>>X;
		int min=X;
 

		if(X==1)
		{
			cout<<1;
			return 0;
		}

	   if(X>2)
	   {
		   for(b=2;b*b<X;b++)
		   {
			  temp=b;
			  while(temp<=X)
			  {
				   temp=temp*b;
			  }
			
			  temp=X-temp/b;
			  if(temp<min)    
					min=temp;
			}
	   }

          cout<<X-min;
          return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: 'cin' was not declared in this scope
   13 |            cin>>X;
      |            ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<cmath>
  +++ |+#include <iostream>
    2 | #define MAX_X 1000
a.cc:19:25: error: 'cout' was not declared in this scope
   19 |                         cout<<1;
      |                         ^~~~
a.cc:19:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:39:11: error: 'cout' was not declared in this scope
   39 |           cout<<X-min;
      |           ^~~~
a.cc:39:11: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

include<iostream>
using namespace std;

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

	for (int i = 1; i < x; i++) {
		for (int j = 2; j < x; j++) {
			box = 1;
			for (int k = 0; k < j; k++)
				box *= i;
			if (max < box&& box <=x)
				max = box;
		}
	}

	cout << max << endl;

	return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin >> x;
      |         ^~~
a.cc:19:9: error: 'cout' was not declared in this scope
   19 |         cout << max << endl;
      |         ^~~~
a.cc:19:24: error: 'endl' was not declared in this scope
   19 |         cout << max << endl;
      |                        ^~~~
Language: C

#include<iostream>
using namespace std;

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

	for (int i = 1; i < x; i++) {
		for (int j = 2; j < x; j++) {
			box = 1;
			for (int k = 0; k < j; k++)
				box *= i;
			if (max < box)
				max = box;
		}
	}

	cout << max << endl;

	return 0;
}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.