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

#include <iostream>
using namespace std;

int main() {
    int x;
    cin >> x;
    int max = 0;
    int count = 0;
    int math = 1;

    for(int i = 2; i <= 10; i++) {
        for(int j = 2; j <= 10; j++) {
            count = j;
            do {
                math *= i
                if(math > x || max > math ) {
                    
                }
                else {
                    max = math;
                }
                count--
            }while(count >= 1)
        }
    }

    cout << max << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:26: error: expected ';' before 'if'
   15 |                 math *= i
      |                          ^
      |                          ;
   16 |                 if(math > x || max > math ) {
      |                 ~~        
a.cc:19:17: error: 'else' without a previous 'if'
   19 |                 else {
      |                 ^~~~
a.cc:22:24: error: expected ';' before '}' token
   22 |                 count--
      |                        ^
      |                        ;
   23 |             }while(count >= 1)
      |             ~           
a.cc:23:31: error: expected ';' before '}' token
   23 |             }while(count >= 1)
      |                               ^
      |                               ;
   24 |         }
      |         ~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:40: error: no matching function for call to 'max(long long int&, __gnu_cxx::__promote<double>::__type)'
   15 |                                 ans=max(ans,pow(i,j));
      |                                     ~~~^~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:15:40: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'})
   15 |                                 ans=max(ans,pow(i,j));
      |                                     ~~~^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:15:40: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   15 |                                 ans=max(ans,pow(i,j));
      |                                     ~~~^~~~~~~~~~~~~~
Language: C++

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

using namespace std;

int main() {
    int N;
    long long res = 1;
    cin >> N;
    for (int i = 1; i <= N; i++) {
        for (int j = 2; j <= 5 ++j) {
            if (pow(i, j) < N && res < pow(i, j)) {
                res = pow(i, j);
            }
        }
    }
    cout << res << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:30: error: lvalue required as increment operand
   11 |         for (int j = 2; j <= 5 ++j) {
      |                              ^
a.cc:11:34: error: expected ';' before 'j'
   11 |         for (int j = 2; j <= 5 ++j) {
      |                                  ^
      |                                  ;
Language: C++

#include <string>
#include <queue>
#include <stack>
#include <vector>
#include <sstream>
#include <algorithm>
#include <deque>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <list>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <climits>
#include <bitset>
#include <functional>
#include <numeric>
#include <ctime>
#include <cassert>
#include <cstring>
#include <fstream>
 
using namespace std;
int main(){
int b,p,x;
cin>>b>>p>>x;
for int(i=0;i<N;i++) {


Compiler output:
a.cc: In function 'int main()':
a.cc:29:5: error: expected '(' before 'int'
   29 | for int(i=0;i<N;i++) {
      |     ^~~
      |     (
a.cc:29:9: error: 'i' was not declared in this scope
   29 | for int(i=0;i<N;i++) {
      |         ^
a.cc:29:15: error: 'N' was not declared in this scope
   29 | for int(i=0;i<N;i++) {
      |               ^
a.cc:29:23: error: expected '}' at end of input
   29 | for int(i=0;i<N;i++) {
      |                      ~^
a.cc:29:23: error: expected '}' at end of input
a.cc:26:11: note: to match this '{'
   26 | int main(){
      |           ^
Language: C

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


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

	scanf("%d", &X);

	if (X == 1) {
		printf("1\n");
		//system("pause");
		return 0;
	}
	else {
	for (b = 2; b < 10000; 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));
	//system("pause");

	return 0;
}
  return 0;
}



Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
main.c: In function 'main':
main.c:11:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   11 |         scanf("%d", &X);
      |         ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    2 | #include <math.h>
  +++ |+#include <stdio.h>
    3 | //#include <iostream>
main.c:11:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   11 |         scanf("%d", &X);
      |         ^~~~~
main.c:11:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:14:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   14 |                 printf("1\n");
      |                 ^~~~~~
main.c:14:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:14:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:14:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:21:25: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   21 |                         printf("%d %d %d \n", b, p, (int)pow((double)b, (double)p));
      |                         ^~~~~~
main.c:21:25: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:28:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   28 |         printf("%d\n", max);
      |         ^~~~~~
main.c:28:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

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

double power( double a, int n )
{
  double r;
  int abs_n;

  r = 1; abs_n = n < 0 ? -n : n;
  while ( abs_n > 0 ) {
    if ( abs_n % 2 == 1 ) { r *= a; }
    a *= a;
    abs_n /= 2;
  }

  return n >= 0 ? r : 1/r;
}

double nthroot( double a, int n )
{
  double x, y;

  if ( a <= 0 || n < 0 ) { return 0; }
  if ( n == 0 ) { return 1; }

  /* a > 0 かつ n > 0 の場合 */
  y = (a > 1) ? a : 1;
  do {
    x = y;
    y = ((n-1)*x + a/power(x, n-1)) / n;
  } while ( y < x );

  return y;
}

int is_power( int a )
{
  int i; 

  if ( a == 1 ) { return 1; }

  for ( i = 2; i <= floor(log2(a)); i++ ) {
    if ( power(floor(nthroot(a, i)), i) == a ) { 
      return 1;
    }
  }

  return 0;
}

int main()
{
  int a,i;
　scanf("%d",&a);
  for ( i=a; i>=0; i-- ) {
    if ( is_power(i) ) {
      printf("%d\n", i);
      break;
    }
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:54:1: error: stray '\343' in program
   54 | <U+3000>scanf("%d",&a);
      | ^~~~~~~~
Language: Java

import java.util.Scanner;

public class atcoder_20180512_b {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int input = sc.nextInt();
		int nums[] = { 8, 27, 64, 125, 216, 343, 512, 729, 32, 243, 128, 512 };
		for (int i = 1; i <= 32; i++) {

			if (input == i * i) {
				System.out.println(i * i);
				break;
			}

			if ((input > i * i) && input < (i + 1) * (i + 1)) {
				int binary = i * i;
				for (int s : nums) {
					if (s <= input && s > binary) {
						System.out.println(s);
						break;
					}
				}
				System.out.println(binary);
				break;
			}
		}
	}
}


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

#include<iostream>
#include<vector>
using namespace std;
int main()
{
int a;
cin>>a;
vector<int> v;
int x=0;
for(int i=0;i<=1000;i++);
{
v,push_back  (i);
v,push_back  (i*i);
v,push_back  (i*i*i);
v,push_back  (i*i*i*i);
v,push_back  (i*i*i*i*i);
v,push_back  (i*i*i*i*i*i);
v,push_back  (i*i*i*i*i*i*i);
v,push_back  (i*i*i*i*i*i*i*i);
v,push_back  (i*i*i*i*i*i*i*i*i);
v,push_back  (i*i*i*i*i*i*i*i*i*i);
}
for(int i=0;i<1000;i++)
if(a==v[i])
x++;
cout<<x;
system ("pause");
return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: 'i' was not declared in this scope
   12 | v,push_back  (i);
      |               ^
a.cc:12:3: error: 'push_back' was not declared in this scope
   12 | v,push_back  (i);
      |   ^~~~~~~~~
Language: C++

#include <stdio.h>
#include <cmath>
#include <vector>

using namespace std;

#define REP(i, n) for (int i = 0; i < n; ++i)
#define REP1(i, n) for (int i = 1; i <= n; ++i)
#define REP2(i, n) for (int i = 2; i <= n; ++i)

vector<int> v;

void solve(int n) {
    REP2(base, n) REP2(exp, n) {
        int temp = pow(base, exp);
        // printf("base = %d, exp = %d, pow = %d\n", base, exp, temp);
        if (n >= temp) {
            v.push_back(temp);
        } else {
            break;
        }
    }
}

int main() {
    int X; // 1000
    scanf("%d", &X);

    if (X == 1) {
        printf("1\n");
        return 0;
    }

    solve(X);

    sort(v.begin(), v.end());

    printf("%d\n", v.back());

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:36:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   36 |     sort(v.begin(), v.end());
      |     ^~~~
      |     sqrt
Language: Java

package rensyu;

import java.util.Scanner;

public class HeihouRoot {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int heiho = (int) Math.floor(Math.sqrt(a));
        System.out.println(heiho * heiho);
        sc.close();
	}
}


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

package rensyu;

import java.util.Scanner;

public class HeihouRoot {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
        double k;
        int a = sc.nextInt();
        int heiho = (int) Math.floor(Math.sqrt(a));
        System.out.println(heiho * heiho);
	}

}

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


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

int main(){
    int X, result;
    cin >> X;
    int Y = X/2;
    for (int i = 0;i<Y;++i){
        for (int j = 0;j<Y;++j){
            int ccc=pow(i,j);
            if(ccc =< X && ccc >= result){}
            result = ccc;

        }
    }
    cout << result << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: expected primary-expression before '<' token
   13 |             if(ccc =< X && ccc >= result){}
      |                     ^
Language: C++

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

int main(){
    int X, result;
    cin >> X;
    int Y = X/2;
    for (int i = 0;i<Y;++i){
        for (int j = 0;j<Y;++j){
            int ccc=pow(i,j);
            if(ccc =< X && ccc >= result){}
            result = ccc;
            
        }
    }
    cout << result << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: expected primary-expression before '<' token
   12 |             if(ccc =< X && ccc >= result){}
      |                     ^
Language: C++

#include <set>
using namespace std;
int main(void)
{
    int N;
    cin >> N;
    int temp;
    int ans = 1;
    int kaisu = 0;
    for(int i=2;i<=32;i++){
        temp = i;
        kaisu = 0;
        while(temp <=1000){
            if(kaisu == 1 && temp <= N && temp > ans){
                ans = temp;
            }
            temp = temp * i;
            kaisu = 1;
        }
    }
    cout << ans;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin >> N;
      |     ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <set>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:21:5: error: 'cout' was not declared in this scope
   21 |     cout << ans;
      |     ^~~~
a.cc:21:5: 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,d,MAX=0;
    cin >> X;
    for(int i = 1;i < X;i++){
        for(int j = 2;j < X;j++){
         d = mypow(i,j);
        if(MAX < d){MAX = d;}
        if(MAX >= X){break;}
    }
    }
    cout << MAX << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: expected unqualified-id before '=' token
    5 |     int = X,d,MAX=0;
      |         ^
a.cc:6:12: error: 'X' was not declared in this scope
    6 |     cin >> X;
      |            ^
a.cc:9:10: error: 'd' was not declared in this scope
    9 |          d = mypow(i,j);
      |          ^
a.cc:9:14: error: 'mypow' was not declared in this scope
    9 |          d = mypow(i,j);
      |              ^~~~~
a.cc:10:12: error: 'MAX' was not declared in this scope
   10 |         if(MAX < d){MAX = d;}
      |            ^~~
a.cc:11:12: error: 'MAX' was not declared in this scope
   11 |         if(MAX >= X){break;}
      |            ^~~
a.cc:14:13: error: 'MAX' was not declared in this scope
   14 |     cout << MAX << endl;
      |             ^~~
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int X = sc.nextInt();

		List<Integer> expList = new ArrayList<>();

		for (int i=1; i<=Math.sqrt(X); i++) {
			for (int j=2; j<10; j++) {
				if (Math.pow(i, j)<=X) {
					expList.add(Math.pow(i, j));
				}
			}
		}

		Collections.sort(expList);
		System.out.println(expList.get(expList.size()-1));
	}
}



Compiler output:
Main.java:12: error: incompatible types: double cannot be converted to Integer
					expList.add(Math.pow(i, j));
					                    ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	long x,a=0,b=0,c=0;
	int m=0,n=0,h=0;
	cin>>x;
	m=sqrt(x);
	n=pow(x,0.3333333333333);
	h=pow(x,0.2)
	a=m*m;
	b=n*n*n;
	c=pow(x,5);
	if (abs(x-a)<=abs(x-b)&&abs(x-a)<=abs(x-c)) cout<<a;
	else if (abs(x-b)<=abs(x-c)) cout<<b;
	else cout<<c;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: expected ';' before 'a'
   10 |         h=pow(x,0.2)
      |                     ^
      |                     ;
   11 |         a=m*m;
      |         ~
Language: C

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

double power( double a, int n )
{
  double r;
  int abs_n;

  r = 1; abs_n = n < 0 ? -n : n;
  while ( abs_n > 0 ) {
    if ( abs_n % 2 == 1 ) { r *= a; }
    a *= a;
    abs_n /= 2;
  }

  return n >= 0 ? r : 1/r;
}

double nthroot( double a, int n )
{
  double x, y;

  if ( a <= 0 || n < 0 ) { return 0; }
  if ( n == 0 ) { return 1; }

  /* a > 0 かつ n > 0 の場合 */
  y = (a > 1) ? a : 1;
  do {
    x = y;
    y = ((n-1)*x + a/power(x, n-1)) / n;
  } while ( y < x );

  return y;
}

int is_power( int a )
{
  int i; 

  if ( a == 1 ) { return 1; }

  for ( i = 2; i <= floor(log2(a)); i++ ) {
    if ( power(floor(nthroot(a, i)), i) == a ) { 
      return 1;
    }
  }

  return 0;
}

int main()
{
  int i;
　scanf("%d",&i);
  for ( i ; i>=0; i-- ) {
    if ( is_power(i) ) {
      printf("%d\n", i);
      break;
    }
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:54:1: error: stray '\343' in program
   54 | <U+3000>scanf("%d",&i);
      | ^~~~~~~~
Language: C

#include <stdio.h>
#include <stdlib.h>
int main()
{
	int a, b, c, b;
	double ex,f,g;
	scanf("%d", &ex);
	
	
	while (1) {
		f = sqrt(ex);
		ex = f;

		int e = ex;
		g = ex - e;
		if (g == 0)
		{
			printf("%d", ex);
			return 0;
		}
		ex--;
	}






}

Compiler output:
main.c: In function 'main':
main.c:5:22: error: redeclaration of 'b' with no linkage
    5 |         int a, b, c, b;
      |                      ^
main.c:5:16: note: previous declaration of 'b' with type 'int'
    5 |         int a, b, c, b;
      |                ^
main.c:11:21: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   11 |                 f = sqrt(ex);
      |                     ^~~~
main.c:3:1: note: include '<math.h>' or provide a declaration of 'sqrt'
    2 | #include <stdlib.h>
  +++ |+#include <math.h>
    3 | int main()
main.c:11:21: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   11 |                 f = sqrt(ex);
      |                     ^~~~
main.c:11:21: note: include '<math.h>' or provide a declaration of 'sqrt'
Language: C++

#include <iostream>
using namespace std;

int main() {

	int X = 0;

	cin >> X;

	for (int i = X; i >= 1; i--){
		if (std::pow(i,2) <= X){
			std::cout << i*i << std::endl;
			break;
			
		}
		else if (X > 1000 || X < 1){
			return 0;
		}
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:26: error: 'pow' is not a member of 'std'
   11 |                 if (std::pow(i,2) <= X){
      |                          ^~~
Language: C++

#include <stdio.h>
#include <math.h>
#include <stdlib.h>
int main()
{
    int a;
    while(scanf("%d",&a)!=EOF)
    {
        if(a<=3)
            printf("%d\n",a);
        else
        {
            int f=0,maxn;
            for(int i=a;i>=1;i--)
            {
                for(int j=2;j<=sqrt(i+1);j++)
                {
                    int b=i;
                    while(b)
                    {
                        if(b%j==0)
                            b=b/j;
                        else
                        {
                            f=0;
                            break;
                        }
                        if(b==1)
                        {
                            f=1;
                            maxn=i;
                            break;
                        }
                    }
                    if(f==1)
                        break;
                }
                if(f==1)
                    break;
            }
            printf("%d\n",maxn);
        }

    }
    return 0;

}

}


Compiler output:
a.cc:49:1: error: expected declaration before '}' token
   49 | }
      | ^
Language: C

#include <stdio.h>

int main() {
  int a;
  scanf("%d",&a);
  if(a <=3) {
    printf("1\n");
    return 0;
  }
  int ans = 1;
  for( i = 2; i <= a; i++) {
    int tmp = i;
    while(tmp < a) {
      tmp *= i;
    }
    ans = ans > tmp/i ? ans : tmp/i;
  }
  printf("%d\n", ans);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:8: error: 'i' undeclared (first use in this function)
   11 |   for( i = 2; i <= a; i++) {
      |        ^
main.c:11:8: note: each undeclared identifier is reported only once for each function it appears in
Language: C

# define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int main(){
    int X = 0;
    int b = 0;
    int p = 2;
    int max_b = 0;
    int temp = 0;
    int ans = 0;
    int loop = 0;

    scanf("%d", &X);

    max_b = sqrt(X, 2);

    for (b = 2; b <= max_b; b++){
        while (2 <= p){
            temp = pow(b, p);
            if (X < temp){
                p--;
                break;
            }
            p++;
        }
        if (ans < pow(b, p)){
            ans = pow(b, p);
        }
        p = 2;
    }
    if (1 == X){
        ans = 1;
    }

    printf("%d", ans);
    

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:13: error: too many arguments to function 'sqrt'
   17 |     max_b = sqrt(X, 2);
      |             ^~~~
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:2:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:176:1: note: declared here
  176 | __MATHCALL (sqrt,, (_Mdouble_ __x));
      | ^~~~~~~~~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
using namespace std;

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

	int x;
	cin >> x;
	int ans;
	if (x == 1) {
		ans = 1;
	}
	else {
		for (int i = 2; i < x; i++) {
			for (int j = 2; j < x; j++) {
				if (pow(i, j) < x) {
					ans = pow(i, j);
				}
			}
		}
	}
	cout << ans << "\n";

	return 0;
}

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

#include <string>
#include <vector>
#include <algorithm>
#include <functional>
using namespace std;

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

	int x;
	cin >> x;
	int ans;
	if (x == 1) {
		ans = 1;
	}
	else {
		for (int i = 2; i < x; i++) {
			for (int j = 2; j < x; j++) {
				if (pow(i, j) < x) {
					ans = pow(i, j);
				}
			}
		}
	}
	cout << ans << "\n";

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope
    8 |         cin.tie(0);
      |         ^~~
a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    4 | #include <functional>
  +++ |+#include <iostream>
    5 | using namespace std;
a.cc:9:14: error: incomplete type 'std::ios' {aka 'std::basic_ios<char>'} used in nested name specifier
    9 |         ios::sync_with_stdio(false);
      |              ^~~~~~~~~~~~~~~
a.cc:20:37: error: 'pow' was not declared in this scope
   20 |                                 if (pow(i, j) < x) {
      |                                     ^~~
a.cc:26:9: error: 'cout' was not declared in this scope
   26 |         cout << ans << "\n";
      |         ^~~~
a.cc:26:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

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

using namespace std;

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

    int n=0;

    for(int i=1;i<=x;x++){
        if(x-pow(i,2)==0);{
            n=pow(i,2);
            break;
        }else {if((x-pow(i,2))<0){
            n=pow(i-1,2);
            break;
        }
    }
    }
    cout<<n;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:10: error: 'else' without a previous 'if'
   16 |         }else {if((x-pow(i,2))<0){
      |          ^~~~
Language: C++

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

using namespace std;

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

    int n=0;

    for(int i=1;i<=x;x++){
        if(x-pow(i,2)==0);{
            n=pow(i,2);
            break;
        }else if((x-pow(i,2))<0){
            n=pow(i-1,2);
            break;
        }
    }
    cout<<n;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:10: error: 'else' without a previous 'if'
   16 |         }else if((x-pow(i,2))<0){
      |          ^~~~
Language: Java

import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int X = scanner.nextInt();
        int max = 1;
        for (int x = X / 2; x > 1; x--) {
            for (int y = X / 2; y > 1; y--) {
                double pow = Math.pow((double) x, (double) (y));
                if (pow > max && pow =< X) {
                    max = ((int) pow);
                }
            }
        }
        System.out.print(max);
    }
}


Compiler output:
Main.java:11: error: > or ',' expected
                if (pow > max && pow =< X) {
                                         ^
1 error
Language: C++

999

#include <stdio.h>
int x;
int myexp(int b, int p){
    int ans = 1;
    for(int i = 0; i < p; i++) ans *= b;
    return ans;
}
int main(void){
    // Your code here!
    scanf("%d",&x);
    if(x == 1){ puts("1"); return 0;}
    
    int max = 0;
    for(int b = 2; b < x; b++){
        for(int p = 2; myexp(b,p) <= x; p++){
            if(max < myexp(b,p)) max = myexp(b,p);
        }
    }
    printf("%d",max);
}


Compiler output:
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 999
      | ^~~
a.cc: In function 'int main()':
a.cc:12:5: error: 'scanf' was not declared in this scope
   12 |     scanf("%d",&x);
      |     ^~~~~
a.cc:13:17: error: 'puts' was not declared in this scope
   13 |     if(x == 1){ puts("1"); return 0;}
      |                 ^~~~
a.cc:21:5: error: 'printf' was not declared in this scope
   21 |     printf("%d",max);
      |     ^~~~~~
a.cc:4:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    3 | #include <stdio.h>
  +++ |+#include <cstdio>
    4 | int x;
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
    int x;
    cin>>x;
    int ans=0,tmp=1;
        for(int i=1;i<=x;i++){
            tmp=1;
            for(int j=1;j<=x;j++){
                tmp*=i;
                if(tmp<=x && j>1)ans=max(ans,tmp);
            }
        }
        if(x==1)ans=1;
       cout<<ans<<endl;

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

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

int main() {
  int x;
  cin >> x;
  
  if(x = 1000) {
    cout< 1000 << endl;
    return 0;
  }
  
  for(double i = x; i > 0; i--) {
      for (double j = 2; j <= 12; j++) {
        
        if (pow(i, 1/j) == floor( pow(i, 1/j) ) ) {
          cout << i << endl;
          return 0;
          
        }
      }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    9 |     cout< 1000 << endl;
      |           ~~~~~^~~~~~~
Language: C++

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

using namespace std;

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

    int n=0;

    for(int i=1;i<=x;x++){
        if(x-pow(i,2)==0);{
            n=pow(i,2);
            break;
        }else 
        {if((x-pow(i,2))<0){
            n=pow(i-1,2);
            break;
        }
    }
    cout<<n;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:10: error: 'else' without a previous 'if'
   16 |         }else
      |          ^~~~
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main() {
    int X;

    cin >> X;

    int c = X;
    while (true) {
        if (pow(c, 2) <= X) {
            break;
        } else {
            c--;
        }
    }

    cout << pow(c, 2) << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: 'pow' was not declared in this scope
   13 |         if (pow(c, 2) <= X) {
      |             ^~~
a.cc:20:13: error: 'pow' was not declared in this scope
   20 |     cout << pow(c, 2) << endl;
      |             ^~~
Language: C++



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

using namespace std;

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

    int n=0;

    for(int i=1;i<=x;x++){
        if(x-pow(i,2)==0);{
            n=pow(i,2);
            break;
        }else 
        if((x-pow(i,2))<0){
            n=pow(i-1,2);
            break;
        }
    }
    cout<<n;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:10: error: 'else' without a previous 'if'
   18 |         }else
      |          ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#define LL long long

int main(){

	int x, seed,x_sqrt,currentVal, maxVal = 0, i;
	std::cin >> x;
	x_sqrt = (int)std::sqrt(x);

	if(x<=3){
		std::cout << x << std::endl;
		return 0;
	}

    for(seed=2;seed<=x_sqrt;seed++){
		currentVal = seed;
        for(i=0;i<x;i++){
			currentVal *= seed;
			if(currentVal>x)break;
			if(currentVal>=maxVal){
				maxVal = currentVal;
				if(maxVal==x){
					std::cout << maxVal << std::endl;
					return 0;
				}
			}
        }
    }

	std::cout << maxVal << std::endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:28: error: 'sqrt' is not a member of 'std'; did you mean 'sort'?
   10 |         x_sqrt = (int)std::sqrt(x);
      |                            ^~~~
      |                            sort
Language: C++

#include<iostream>
#include<algorithm>

int main() {
	int x,max,n;
	std::cin >> x;

	for (int i = 1;; i++) {
		n = std::pow(i, 2);
		if (n == x) {
			max = n;
		}
		if (n >x) {
			max = std::pow(i-1,2);
			break;
		}
	}

	std::cout << max << std::endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: 'pow' is not a member of 'std'
    9 |                 n = std::pow(i, 2);
      |                          ^~~
a.cc:14:36: error: 'pow' is not a member of 'std'
   14 |                         max = std::pow(i-1,2);
      |                                    ^~~
Language: C++


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


using namespace std;

bool ans[1005];
int x;


void pd()
{
    for(int i = 1; i < 100; i++)
    {
        for(int j = 2; j < 100; j++)
        {
            int f = pow(i,j);
            if(f <= 1000)
            {
                ans[f]=1;
            }
            else 
                break
        }
    }
}


int main()
{
    pd();
    cin >> x;
    for(int i = x; i >= 1; i--)
    {
        if(ans[i] == 1)
        {
            cout << i << endl;
            return 0;
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'void pd()':
a.cc:36:22: error: expected ';' before '}' token
   36 |                 break
      |                      ^
      |                      ;
   37 |         }
      |         ~
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int x,v;
	cin >> x;
	double q;
	for (int i = x; i > 0; i--){
		for (int j = 2; j <= 10; j++){
			q = pow(i, 1.0 / j);
			v = q;
			if (v == q){
				cout << i;
				return 0;
			}
		}
	}
}

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

#include <bits/stdc++.h>
#include <string>
#include <algorithm>
#include <string.h>
using namespace std;
 
int main(){
    
    int X,max=1,tmp;
    cin >> X;

    for(int i=1;i<=100;i++){
        tmp=i;
        for(j=1;j<=i;j++){
            tmp=tmp*i;
            if(tmp>X)break;
        }
        tmp=tmp/i;
        
        if(tmp>max){
            max=tmp;
        }
    }

    cout << max <<endl;

    return 0;
}

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

#include <iostream>
#include <vector>

using namespace std;
const int maxn = 1000 + 5;

bool exist[maxn];
int X;

int quick_exp(int x, int y) {
	int ori = x, res = 1;
	while (y) {
		if (y & 1)
			res *= ori;
		ori *= ori;
		y >>= 1;
	}
	return res;
}

void work(int p) {
	int x = 1, res = 1;
	while (res < maxn) {
		exist[res] = true;
		x++;
		res = quick_exp(x, p);
	}
}

void init()
{
	for (int i = 2; i <= 10; i++) {
		work(i);
	}
}

int main()
{
	
	cin >> X;
	memset(exist, false, sizeof(exist));
	init();
	int res = -1;
	for (int i = X; i >= 0; i--) {
		if (exist[i]) {
			res = i;
			break;
		}
	}
	cout << res << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:9: error: 'memset' was not declared in this scope
   41 |         memset(exist, false, sizeof(exist));
      |         ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <vector>
  +++ |+#include <cstring>
    3 |
Language: Java

import java.io.PrintWriter;
import java.util.Scanner;


public class TestClass {

  private static final Scanner in = new Scanner(System.in);
  private static final PrintWriter out = new PrintWriter(System.out);

  private static int[] nextArray(int n) {
    int[] arr = new int[n];
    for (int i = 0; i < n; i++) {
      arr[i] = in.nextInt();
    }
    return arr;
  }

  public static void main(String[] args) {
    int a = in.nextInt();
    solve(a);
    out.flush();
    out.close();
  }

  private static void solve(int a) {
    for (int i = a; i > -1; i--) {
      for (int j = 1; j < 50; j++) {
        if (isPower(i, j)) {
          out.println(i);
          return;
        }
      }
    }
  }

  private static boolean isPower(double a, double b) {
    return (int) (Math.log(a) / Math.log(b)) == (Math.log(a) / Math.log(b));
  }

}


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

#include <cstdio>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); ++i)
#define outl(x) cout<< (x) << '\n'
#define fi first
#define se second
using pii = pair<int,int>;
using ll = long long;

int main()
{
   ll N;
   cin >> N;

   ll maxv = 0;
   for (int i=1; i <= N; ++i) {
      for (int j=2; j <= N; ++j) {
         ll tmp = (ll)pow(i,j);
         if (tmp > N) break;
         else 
            maxv = max(maxv, tmp);
      }
   }
   outl(maxv);
}



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

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;

#define Abs(x)((x) < 0 ? (x) * -1 : (x))
#define rep(x, y) for ((x) = 0; (x) < (y); (x)++)
#define repin(x, y) for ((x) = 0; (x) <= (y); (x)++)
#define nep(x, y) for ((x) = (y) - 1; 0 <= (x); (x)--)
#define nepi(x, y, z) for ((x) = (y) - 1; (z) <= (x); (x)--)
#define repi(x, y, z) for ((x) = (z); (x) < (y); (x)++)
#define repiin(x, y, z) for ((x) = (z); (x) <= (y); (x)++)
#define reps(x, y, z) for ((x) = 0; (x) < (y); (x) += (z))
#define repit(x) for (__typeof((x).begin()) it = (x).begin(); it != (x).end(); it++)
#define All(x) (x).begin(),(x).end()
#define Mem0(x) memset(x, 0, sizeof(x))
#define Mem1(x) memset(x, -1, sizeof(x))
#define End '\n'
#define Out(x) cout<<(x)<<End
template<typename T> inline bool Max(T &x, const T &y) { return x < y ? x = y, 1 : 0; }
template<typename T> inline bool Min(T &x, const T &y) { return x > y ? x = y, 1 : 0; }
template<typename T> using V = vector<T>;
template<typename T> using VV = V<V<T> >;

#define pb push_back
#define mp make_pair
#define X first
#define Y second

static const ll MOD = 1e9 + 7;
static const double PI = 3.141592653589793;

#define LOCAL 0

int main()
{
#if LOCAL
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
    freopen("debug.txt", "w", stderr);
#endif

    cin.tie(0);
    ios::sync_with_stdio(false);

    int x;

    cin >> x;

    V<int> ans;

    ans.pb(1);

    int i;

    repi(i, x, 2) {
        y = z = i;

        if (x < y * y) break;

        while (y < x) y *= z;

        y /= z;

        ans.pb(y);
    }

    sort(All(ans));

    Out(ans.back());

    return 0;
}


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

#include <bits/stdc++.h>
using namespace std;
#define repr(i,k,n) for(int i = (k); i < (n); i++)
#define rep(i,n) repr(i,0,n)
#define ALL(a) begin(a),end(a)
const int INF = 114514810;
const int MOD = 1000000007;
typedef vector<int> vi;
typedef vector<string> vs;
typedef long long ll;
int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int X,max=0,ex;
	cin >> X;
	repr(i,2,sqrt(X)+10){
		ex=i
		while(ex<X){
			ex*=i;
		}
		ex = ex/i;
		if (max<ex){
			max=ex;
		}
	}
	cout << max << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:21: error: expected ';' before 'while'
   17 |                 ex=i
      |                     ^
      |                     ;
   18 |                 while(ex<X){
      |                 ~~~~~
Language: C++

#include <iostream>

using namespace std;

int main()
{
	int x;

	cin >> x;

	int max = sqrt(x);

	int a = 1;

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

		if (a < n)a = n;
	}

	cout << a;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: 'sqrt' was not declared in this scope
   11 |         int max = sqrt(x);
      |                   ^~~~
Language: C++

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

using namespace std;

int main(void) {

	int x;
	cin >> x;

	int max = 1;
	for (int i = 2; i < x; i++) {
		for (int j = 2; j < x; j++) {
			int value = pow(i, j);
			if (value > x)
				break;
			if (value > max)
				max = value;
		}
	}
	cout << max;
}

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

#jnclude<stdio.h>
int main(){
int n,i,j,ans;
scanf("%d",&n);
for(i=1;i<40;i++){
j=i;
while(j<=n){
j=j*i;
if(j<=n)
ans=j;
}
}
printf("%d\n",ans);
return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #jnclude; did you mean #include?
    1 | #jnclude<stdio.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:4:1: error: 'scanf' was not declared in this scope
    4 | scanf("%d",&n);
      | ^~~~~
a.cc:13:1: error: 'printf' was not declared in this scope
   13 | printf("%d\n",ans);
      | ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #jnclude<stdio.h>
Language: C++

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

#define REP(i,n) for(int i = 0; i < (n); i++)
#define REPC(x,c) for(auto x:(c))
#define FOR(i, b, e) for(int i = (b); i < (e); i++)
#define VS vector<string>
#define VI vector<int>
#define VVI vector<vector<int>>

using namespace std;

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

	if (x == 1) { cout << 1 << endl; return 0; }
	int max = 0;
	FOR(i,2,33){
		FOR(j, 2, 10) {
			int tmp = pow(i, j);
			if (tmp > x) {
				tmp = pow(i, j - 1);
				if (tmp > max) { max = tmp; }
				break;
			}
		}
	}
	cout << max << endl;
}

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

#include <bits/stdc++.h>
#include <string>
#include <algorithm>
#include <string.h>
using namespace std;
 
int main(){
    
    int X,max,tmp;

    cin >> X;

    for(int i=1;i<=100;i++){{
        tmp=i
        for(int j=1;j<=5;j++){
            tmp=tmp*i;
            if(tmp<=X){
            max=tmp;
            }
        }
    }
        
        

    cout << max <<endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:14: error: expected ';' before 'for'
   14 |         tmp=i
      |              ^
      |              ;
   15 |         for(int j=1;j<=5;j++){
      |         ~~~   
a.cc:15:21: error: 'j' was not declared in this scope
   15 |         for(int j=1;j<=5;j++){
      |                     ^
a.cc:28:2: error: expected '}' at end of input
   28 | }
      |  ^
a.cc:7:11: note: to match this '{'
    7 | int main(){
      |           ^
Language: C++

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

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

	int a;
	double b;

	for (int i = X; i > 0; i--) {
		a = sqrt(i);
		b = sqrt((double)i);
		if (a == b) {
			cout << i << endl;
			break;
		}
	}
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:21: error: 'sqrt' was not declared in this scope
   14 |                 a = sqrt(i);
      |                     ^~~~
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.math.*;

public class Main {
	public static void main(String[] args)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();

		int n = Integer.parseInt(br.readLine());
		int max = 0;
		for(int i = 0; i < 31; i++){
			int m = i;
			if(max<=m && m<=n)
				max = m;
			for(int j = 0; j < 9; j++){
				int m = m * i;
				if(max<=m && m<=n)
					max = m;
				if(m>n)
					break;
			}
		}
		System.out.println(max);
	}
}

Compiler output:
Main.java:19: error: variable m is already defined in method main(String[])
				int m = m * i;
				    ^
1 error
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
using namespace std;
#define REP(i, a, n) for(int i=a; i<n; i++)
typedef long long ll;

int x;
int ans = 0;
int main()
{
	cin >> x;

	REP(i, 1, 40) {
		REP(j, 2, 20) {
			if (pow(i, j) <= x) ans = pow(i, j);
			else break;
		}
	}
	cout << ans << endl;
	return 0;
}

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

#include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
#include <cmath>

using namespace std;

int main() {
    //ifstream in("C:\\Users\\yossw\\Desktop\\<name>.txt");
    //cin.rdbuf(in.rdbuf());
    int X, max = 1;
    cin >> X;
    for(int i=1;i<=sqrt(X);i++){
        for(int j=2;pow(i,j)<=X;j++)
            if(pow(i,j)>max)max = pow(i,j);
    }
    cout << max << endl;
    return 0;
}

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

#include "iostream"

using namespace std;

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


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

#include <stdio.h>

char s[5001], t[6];
int sl, tl;
int k, i, iM, j;
char c[6];
inline int strin() {
  i = 0;
  iM = sl - tl;
  while (i <= iM) {
    for (j = 0; j < tl; ++j) {
      if (s[i + j] != t[j]) goto continue_while;
    }
    return 1;
  continue_while:
    ++i;
  }
  return 0;
}
void solve() {
  if (!strin()) return;
  if (k == 0) {
    printf("%s\n", t);
    k = -1;
    return;
  }
  --k;
  ++tl;
  for (c[tl] = 'a'; c[tl] <= 'z'; ++c[tl]) {
    t[tl - 1] = c[tl];
    solve();
    if (k < 0) return;
  }
  --tl;
  t[tl] = 0;
}
int main() {
  scanf("%s", s);
  sl = 5000;
  while (sl - i > 1) {
    j = (sl + i) >> 1;
    (s[j] ? i : sl) = j;
  }
  scanf("%d", &k);
  solve();
}


Compiler output:
main.c: In function 'main':
main.c:42:21: error: lvalue required as left operand of assignment
   42 |     (s[j] ? i : sl) = j;
      |                     ^
Language: C

#include <stdio.h>

char s[5001], t[6];
int sl, tl;
int k, i, iM, j;
char c[6];
inline bool strin() {
  i = 0;
  iM = sl - tl;
  while (i <= iM) {
    for (j = 0; j < tl; ++j) {
      if (s[i + j] != t[j]) goto continue_while;
    }
    return true;
  continue_while:
    ++i;
  }
  return false;
}
void solve() {
  if (!strin()) return;
  if (k == 0) {
    printf("%s\n", t);
    k = -1;
    return;
  }
  --k;
  ++tl;
  for (c[tl] = 'a'; c[tl] <= 'z'; ++c[tl]) {
    t[tl - 1] = c[tl];
    solve();
    if (k < 0) return;
  }
  --tl;
  t[tl] = 0;
}
int main() {
  scanf("%s", s);
  sl = 5000;
  while (sl - i > 1) {
    j = (sl + i) >> 1;
    (s[j] ? i : sl) = j;
  }
  scanf("%d", &k);
  solve();
}


Compiler output:
main.c:7:8: error: unknown type name 'bool'
    7 | inline bool strin() {
      |        ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c: In function 'strin':
main.c:14:12: error: 'true' undeclared (first use in this function)
   14 |     return true;
      |            ^~~~
main.c:14:12: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:14:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:10: error: 'false' undeclared (first use in this function)
   18 |   return false;
      |          ^~~~~
main.c:18:10: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c: In function 'main':
main.c:42:21: error: lvalue required as left operand of assignment
   42 |     (s[j] ? i : sl) = j;
      |                     ^