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

#include<iostream>
using namespace std;
int main(){
  int n;cin>>n;
  cout<<(n%111)?(n/111+1)*111:(n/111)*111<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:42: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    5 |   cout<<(n%111)?(n/111+1)*111:(n/111)*111<<endl;
      |                               ~~~~~~~~~~~^~~~~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
#define repi(i, a, b) for (long long i = (long long)(a); i < (long long)(b); i++)
#define pb push_back
#define all(x) (x).begin(), (x).end()

using namespace std;

int main()
{
    string s;
    int a, b, c;
    cin >> s;
    a = atoi(s[0]);
    b = atoi(s[1]);
    c = atoi(s[2]);
    if (a >= b)
    {
        if (b >= c)
        {
            cout << a * 100 + a * 10 + a << endl;
            return 0;
        }
        else
        {
            cout << (a + 1) * 100 + (a + 1) * 10 + a + 1 << endl;
            return 0;
        }
    }
    else
    {
        cout << (a + 1) * 100 + (a + 1) * 10 + a + 1 << endl;
        return 0;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:13: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
   17 |     a = atoi(s[0]);
      |         ~~~~^~~~~~
      |             |
      |             __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 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/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:18:13: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
   18 |     b = atoi(s[1]);
      |         ~~~~^~~~~~
      |             |
      |             __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:19:13: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
   19 |     c = atoi(s[2]);
      |         ~~~~^~~~~~
      |             |
      |             __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
Language: C++

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

int main(){
  int N;
  cin >> N;
  int dig[3];
  dig[0]=N%10;
  N/=10;
  dig[1]=N%10;
  N/=10;
  dig[2]=N;
  
  int max=max(max(dig[0],dig[1]),dig[2]);
  cout << 111 * max << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:18: error: 'max' cannot be used as a function
   15 |   int max=max(max(dig[0],dig[1]),dig[2]);
      |               ~~~^~~~~~~~~~~~~~~
a.cc:15:14: error: 'max' cannot be used as a function
   15 |   int max=max(max(dig[0],dig[1]),dig[2]);
      |           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
  int N;
  cin >> N;
  int dig[3];
  dig[0]=N%10;
  N/=10;
  dig[1]=N%10;
  N/=10;
  dig[2]=N;
  
  int max=max(max(dig[0],dig[1]),dig[2]);
  cout << 111 * max << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:18: error: 'max' cannot be used as a function
   14 |   int max=max(max(dig[0],dig[1]),dig[2]);
      |               ~~~^~~~~~~~~~~~~~~
a.cc:14:14: error: 'max' cannot be used as a function
   14 |   int max=max(max(dig[0],dig[1]),dig[2]);
      |           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
  int N;
  cin >> N;
  
  int n = 1;
  
  while(n=0){
    if(N=111 || N=222 || N=333 || N=444 || N=555 || N=666 || N=777 || N=888 || N=999){
      n=0;
    }
    else{N++;}
  }
  
  cout << N;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:77: error: lvalue required as left operand of assignment
   11 |     if(N=111 || N=222 || N=333 || N=444 || N=555 || N=666 || N=777 || N=888 || N=999){
      |                                                                         ~~~~^~~~
Language: C++

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

int main(){
int n;
  cin >> n;
  int ans=0;
  for(int i=1;i<=9;i++){
    if(n<=111*(10-i)){
      ans=111*(10-i);
    }}
  cout <<　ans << endl;
}
      

Compiler output:
a.cc:13:10: error: extended character 　 is not valid in an identifier
   13 |   cout <<　ans << endl;
      |          ^
a.cc: In function 'int main()':
a.cc:13:10: error: '\U00003000ans' was not declared in this scope
   13 |   cout <<　ans << endl;
      |          ^~~~~
Language: C++

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

int main(){
int n;
  cin >> n;
  int ans;
  for(int i=1;i<=9;i++){
    if(n<=111*(10-i)){
      ans=111*(10-i);
    }}
  cout <<　ans << endl;
}
      

Compiler output:
a.cc:13:10: error: extended character 　 is not valid in an identifier
   13 |   cout <<　ans << endl;
      |          ^
a.cc: In function 'int main()':
a.cc:13:10: error: '\U00003000ans' was not declared in this scope
   13 |   cout <<　ans << endl;
      |          ^~~~~
Language: C++

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

int main(){
int n;
  cin >> n;
  int ans;
  for(int i=1;i<=9;i++){
    if(n<=111*(10-i)){
      ans=n;
    }}
  cout <<　ans << endl;
}
      

Compiler output:
a.cc:13:10: error: extended character 　 is not valid in an identifier
   13 |   cout <<　ans << endl;
      |          ^
a.cc: In function 'int main()':
a.cc:13:10: error: '\U00003000ans' was not declared in this scope
   13 |   cout <<　ans << endl;
      |          ^~~~~
Language: C

#include <stdio.h>
 
int intcat(int, int, int);
 
int main(){
  int n, m, l;
  char a[3];
  scanf("%d", &n);
  m=n/100;
  l=intcat(m, m, m);
  if(l<n)
    l=intcat(m+1, m+1, m+1);
  printf("%d\n", l);
 
  return 0;
}

Compiler output:
/usr/bin/ld: /tmp/ccAGPLGf.o: in function `main':
main.c:(.text+0x4f): undefined reference to `intcat'
/usr/bin/ld: main.c:(.text+0x75): undefined reference to `intcat'
collect2: error: ld returned 1 exit status
Language: C++

#include <stdio.h>

int main(){
  int val;
  int result;
  scanf("%d",&val);
  if(val =< 999){
    result = 999;
    if(val =< 888){
      result = 888;
      if(val =< 777){
	result = 777;
	if(val <= 666){
	  result = 666;
	  if(val =< 555){
	    result = 555;
	    if(val =< 444){
	      result = 444;
	      if(val =< 333){
		result = 333;
		if(val =< 222){
		  result = 222;
		  if(val =< 111){
		    result = 111;
		  }
		}
	      }
	    }
	  }
	}
      }
    }
  }
  printf("%d",result);
  return 0;
}
	
	          
		 


Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: expected primary-expression before '<' token
    7 |   if(val =< 999){
      |           ^
a.cc:9:13: error: expected primary-expression before '<' token
    9 |     if(val =< 888){
      |             ^
a.cc:11:15: error: expected primary-expression before '<' token
   11 |       if(val =< 777){
      |               ^
a.cc:15:19: error: expected primary-expression before '<' token
   15 |           if(val =< 555){
      |                   ^
a.cc:17:21: error: expected primary-expression before '<' token
   17 |             if(val =< 444){
      |                     ^
a.cc:19:23: error: expected primary-expression before '<' token
   19 |               if(val =< 333){
      |                       ^
a.cc:21:25: error: expected primary-expression before '<' token
   21 |                 if(val =< 222){
      |                         ^
a.cc:23:27: error: expected primary-expression before '<' token
   23 |                   if(val =< 111){
      |                           ^
Language: C++

#include <stdio.h>

int main(){
  int val;
  int result;
  scanf("%d",&val);
  if(val =< 999){
    result = 999
    if(val =< 888){
      result = 888
      if(val =< 777){
	result = 777
	if(val <= 666){
	  result = 666
	  if(val =< 555){
	    result = 555
	    if(val =< 444){
	      result = 444
	      if(val =< 333){
		result = 333
		if(val =< 222){
		  result = 222
		  if(val =< 111){
		    result = 111;
		  }
		}
	      }
	    }
	  }
	}
      }
    }
  }
  printf("%d",result);
  return 0;
}
	
	          
		 


Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: expected primary-expression before '<' token
    7 |   if(val =< 999){
      |           ^
a.cc:8:17: error: expected ';' before 'if'
    8 |     result = 999
      |                 ^
      |                 ;
    9 |     if(val =< 888){
      |     ~~
Language: C

#include<stdio.h>
int main(void) {
  int N,ans=0;
  scanf("%d",&N);
  do{
    ans += 111;
  }while(ans<N)
  printf("%d",ans);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:16: error: expected ';' before 'printf'
    7 |   }while(ans<N)
      |                ^
      |                ;
    8 |   printf("%d",ans);
      |   ~~~~~~
Language: C++

#include<iostream>
#include<vecter>
#include<string>
#include<algorithm>
#include<cmath>

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

for(int i = 1;i < 10;i++)
if(n <= 111*i){
cout << 111*i << endl;
break;
}
return 0;
}


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

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

int main() {
  int N;
  cin >> N;
  if (N % 111 == 0;)
      cout << N << endl;
  else
    cout << N / 111 * 111 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: expected primary-expression before ')' token
    7 |   if (N % 111 == 0;)
      |                    ^
Language: C++

#include <iostream>
#include <vector>
#include <set>
#include <algorithm>
#include <string>
#include <cmath>
#include <iomanip>
#include <map>
#include <set>
using namespace std;
#define loop(i,N) for(ll (i)=0; (i)<(N);++(i))
struct _OMAZINAI_ { _OMAZINAI_() { std::ios::sync_with_stdio(false); std::cin.tie(0); } } __omazinai_instance__;
#define INF ((1LL<<61) + (1<<29))
#define YesNo(x) {std::cout << ((x)?"Yes":"No") << std::endl;}
#define YESNO(x) {std::cout << ((x)?"YES":"NO") << std::endl;}
#define OddEven(x) {std::cout << ((x)%2?"Odd":"Even") << std::endl;}
#define ODDEVEN(x) {std::cout << ((x)%2?"ODD":"EVEN") << std::endl;}
typedef long long int ll;
ll my_gcd(ll a, ll b) { return b ? my_gcd(b, a%b) : a; };
void _INPUT_IMPL_() {};
template <class T, class... Args> void _INPUT_IMPL_(T& dest, Args&... args) { cin >> dest; _INPUT_IMPL_(args...); }
void _OUTPUT_IMPL_() {};
template <class T, class... Args> void _OUTPUT_IMPL_(T dest, Args... args) { cout << dest << (sizeof...(Args) ? " " : ""); _OUTPUT_IMPL_(args...); }
#define in(type, ...) type __VA_ARGS__; _INPUT_IMPL_(__VA_ARGS__)
#define in_v(type, name, cnt) vector<type> name(cnt); loop(i, cnt) cin >> name[i];
#define sort_v(v) std::sort(v.begin(), v.end())
#define out(...) (_OUTPUT_IMPL_(__VA_ARGS__), std::cout<<std::endl)
#define set_fix(x) ((std::cerr<<std::fixed<<std::setprecision(x)),(std::cout<<std::fixed<<std::setprecision(x)))
//小さい方に寄る
#define space_op(x, y, a, b, c) ([](auto x_, auto y_, auto a_, auto b_, auto c_){if(x_<y_)return a_;if(x_>y_)return c_;return b_;}(x,y,a,b,c))
#define space_out(x, y, a, b, c) out(space_op(x, y, a, b, c))

int main() {
	in(int, N);
    N = (N/111) + !!(N%111)
    out(111*N);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:18: error: expression cannot be used as a function
   27 | #define out(...) (_OUTPUT_IMPL_(__VA_ARGS__), std::cout<<std::endl)
      |                  ^
a.cc:36:5: note: in expansion of macro 'out'
   36 |     out(111*N);
      |     ^~~
Language: C++

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

int main() 
{
  vector<int> vec();
  for(int i=0;i<3;i++)
  {
    cin>>vec.at(i);
  }
    if(vec.at(0)==vec.at(1)==vec.at(2)
       {
         cout<<vec<<endl;
       }
    if(vec.at(0)<vec.at(1))
       {
        vec.at(1)=vec.at(0)+1;
        vec.at(2)=vec.at(0)+1;
         cout<<vec<<endl;
       }
    if(vec.at(0)>vec.at(1))
       {
        vec.at(1)=vec.at(0);
        vec.at(2)=vec.at(0);
         cout<<vec<<endl;
       }
       if(vec.at(0)=vec.at(1))
       {
          if(vec.at(0)<vec.at(2))
       		{
        		vec.at(1)=vec.at(0)+1;
        		vec.at(2)=vec.at(0)+1;
        		 cout<<vec<<endl;
       		}
   		   if(vec.at(0)>vec.at(2))
      	    {
       			 vec.at(1)=vec.at(0);
        		 vec.at(2)=vec.at(0);
          		 cout<<vec<<endl;
            }
       }
  }
 

Compiler output:
a.cc: In function 'int main()':
a.cc:6:18: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    6 |   vector<int> vec();
      |                  ^~
a.cc:6:18: note: remove parentheses to default-initialize a variable
    6 |   vector<int> vec();
      |                  ^~
      |                  --
a.cc:9:14: error: request for member 'at' in 'vec', which is of non-class type 'std::vector<int>()'
    9 |     cin>>vec.at(i);
      |              ^~
a.cc:11:12: error: request for member 'at' in 'vec', which is of non-class type 'std::vector<int>()'
   11 |     if(vec.at(0)==vec.at(1)==vec.at(2)
      |            ^~
a.cc:11:23: error: request for member 'at' in 'vec', which is of non-class type 'std::vector<int>()'
   11 |     if(vec.at(0)==vec.at(1)==vec.at(2)
      |                       ^~
a.cc:11:34: error: request for member 'at' in 'vec', which is of non-class type 'std::vector<int>()'
   11 |     if(vec.at(0)==vec.at(1)==vec.at(2)
      |                                  ^~
a.cc:11:39: error: expected ')' before '{' token
   11 |     if(vec.at(0)==vec.at(1)==vec.at(2)
      |       ~                               ^
      |                                       )
   12 |        {
      |        ~                               
a.cc:42:3: error: expected primary-expression before '}' token
   42 |   }
      |   ^
Language: Java

import java.util.*;
import static java.lang.Math.*;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		System.out.println(111 * (n + 110 / 111))
	}
}

Compiler output:
Main.java:8: error: ';' expected
		System.out.println(111 * (n + 110 / 111))
		                                         ^
1 error
Language: C++

#include<iostream> 
int main()
{
  int ret[9] = [111,222,333,444,555,666,777,888,999];
  int i = 0;
  int buf;
  std::cin >> i;
  for(int j = 0; j < 9; j ++)
  {
    if(i <= ret[j]){
      buf = ret[j];
      break;
    }
  }
  std::cout << buf << std::endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:17: error: expected identifier before numeric constant
    4 |   int ret[9] = [111,222,333,444,555,666,777,888,999];
      |                 ^~~
a.cc:4:20: error: expected ']' before ',' token
    4 |   int ret[9] = [111,222,333,444,555,666,777,888,999];
      |                    ^
      |                    ]
a.cc: In lambda function:
a.cc:4:20: error: expected '{' before ',' token
a.cc: In function 'int main()':
a.cc:4:16: error: array must be initialized with a brace-enclosed initializer
    4 |   int ret[9] = [111,222,333,444,555,666,777,888,999];
      |                ^~~~
a.cc:4:21: error: expected unqualified-id before numeric constant
    4 |   int ret[9] = [111,222,333,444,555,666,777,888,999];
      |                     ^~~
Language: C++


#include <iostream>
#include <math.h>
#include <string>
#include <algorithm>
#include <set>
#include <queue>
#include <stack>
#include <utility>
#include <tuple>
using namespace std;

const double pi = acos(-1);

#define nyan cout<<"(=^•ω•^=)"<<endl;
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)

bool solve(string i){
    if(i[0]==i[1]&&i[1]==i[2])return true;
    return false;
}

signed main(){
    int n;cin>>n;
    for(int i=n;i<=999;i++){
        if(solve(to_string(i)){
            cout<<i<<endl;
            return 0;
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:31: error: expected ')' before '{' token
   27 |         if(solve(to_string(i)){
      |           ~                   ^
      |                               )
a.cc:31:5: error: expected primary-expression before '}' token
   31 |     }
      |     ^
Language: C++


#include <iostream>
#include <math.h>
#include <string>
#include <algorithm>
#include <set>
#include <queue>
#include <stack>
#include <utility>
#include <tuple>
using namespace std;

const double pi = acos(-1);

#define nyan cout<<"(=^•ω•^=)"<<endl;
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)

bool solve(string i){
    if(i[0]==i[1]&&i[1]==i[2])return true;
    return false;
}

signed main(){
    int n;cin>>n;
    for(int i=n;i<=999;i++){
        if(solve(i)){
            cout<<i<<endl;
            return 0;
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:18: error: could not convert 'i' from 'long long int' to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   27 |         if(solve(i)){
      |                  ^
      |                  |
      |                  long long int
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
    String str = String.valueOf(a);
    int[] manieth = new int[3];
    int answer = 0;

    for (int i = 0; i < str.length(); i++) {
      String num = String.valueOf(str.charAt(i));
      manieth[i] = Integer.parseInt(num);
    }
    if (manieth[0] =< manieth[1]) {
      answer = manieth[0] + 1;
    } else {
      answer = manieth[0];
    }
    System.out.print(answer);
    System.out.print(answer);
    System.out.print(answer);
	}
}


Compiler output:
Main.java:14: error: ']' expected
    if (manieth[0] =< manieth[1]) {
                              ^
Main.java:14: error: ';' expected
    if (manieth[0] =< manieth[1]) {
                               ^
Main.java:16: error: 'else' without 'if'
    } else {
      ^
3 errors
Language: C++

#include<iostream>

using namespace std;

int main(){
    string N;
    cin >> N;
 
    double n;
     n= N/111;
  
    int d = n; 

    cout <<d*111;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: no match for 'operator/' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
   10 |      n= N/111;
      |         ~^~~~
      |         | |
      |         | int
      |         std::string {aka std::__cxx11::basic_string<char>}
Language: C++

#include<iostream>

using namespace std;

int main(){
    string N;
    cin >> N;
    
    int n = N/111;
    cout <<n*111;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: no match for 'operator/' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
    9 |     int n = N/111;
      |             ~^~~~
      |             | |
      |             | int
      |             std::string {aka std::__cxx11::basic_string<char>}
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n; cin >> n;
  int a = n % 111;
  cout << n += a << endl;
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n; cin >> n;
  a = n / 100;
  b = (n - a*100) / 10;
  c = n - a*100 - b*10;
  for(int i = n; i > 1000; ++i){
    if(i == 100*a + 10*a + a || i == 100*b + 10*b + b || i == 100*c + 10*c + c){
      cout << i << endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'a' was not declared in this scope
    5 |   a = n / 100;
      |   ^
a.cc:6:3: error: 'b' was not declared in this scope
    6 |   b = (n - a*100) / 10;
      |   ^
a.cc:7:3: error: 'c' was not declared in this scope
    7 |   c = n - a*100 - b*10;
      |   ^
Language: C++

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

int main(){
        int n;
        cin>>n;
        int m,r;
        m=n/111;
        r=n%111;
        if(r==0){cout<<n<<endl;}
        else{cout<<111*(m+1)<<endl}
return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:12:35: error: expected ';' before '}' token
   12 |         else{cout<<111*(m+1)<<endl}
      |                                   ^
      |                                   ;
Language: C++

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

template <typename T> T gcd(T x, T y) {
  if (y == 0)
    return x;
  return gcd(y, x % y);
}

template <typename T> T lcm(T x, T y) {
  if (x == 0 || y == 0)
    return 0;
  return x / gcd(x, y) * y;
}

int ctoi(char c) {
  if (c >= '0' && c <= '9') {
    return c - '0';
  }
  return 0;
}

vector<int> p;
vector<int> r;

void init(int n) {
  p.reserve(n);
  r.reserve(n);
  for (int i = 0; i < n; i++) {
    p[i] = i;
    r[i] = 0;
  }
}

int root(int x) { return p[x] == x ? x : p[x] = root(p[x]); }

bool same(int x, int y) { return root(x) == root(y); }

void unite(int x, int y) {
  x = root(x);
  y = root(y);
  if (x == y)
    return;

  if (r[x] < r[y])
    p[x] = y;
  else {
    p[y] = x;
    if (r[x] == r[y])
      r[x]++;
  }
}

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

  N = ((N / 111) + 1) * 111;
  if (N == 1110)
    N++;

  cout << N << endl;
}
}

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

package main

import ("fmt"
				"bufio"
				"os"
				"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func nextLine() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	mn := 1000
	ans := 0
	N, _ := strconv.Atoi(nextLine())
	for i := 1; i <= 9; i++ {
		d := i * 111 - N
		if d > 0 {
			if d < mn {
				mn = d
				ans = i * 111
			}
		}
	}
	fmt.Println(ans)
}

Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
a.cc:16:1: error: 'func' does not name a type
   16 | func main() {
      | ^~~~
Language: Java

mport java.util.*;

class Main{
	public static void main (String[] args) {
		Scanner sc=new Scanner(System.in); 
		String s=sc.next();
		int i=0;
		int a=Math.max(s.charAt(i)-'0',s.charAt(i+1)-'0');
		int b=Math.max(a,s.charAt(i+2)-'0');
		System.out.print(b*111);
		
	}
}

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

#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <numeric>
#include <functional>
#include <cmath>
#include <queue>
#include <stack>
#include <string>

#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
typedef long long ll;

using namespace std;

int main(int argc, const char * argv[]) {
  int a;
  int b;
  cin >> a;
  b = (((int)((a-1)/111)) + 1)*111
  cout << b << endl;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:22:35: error: expected ';' before 'cout'
   22 |   b = (((int)((a-1)/111)) + 1)*111
      |                                   ^
      |                                   ;
   23 |   cout << b << endl;
      |   ~~~~
Language: C++

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

int main() {
  int N;
  cin>>N;
  
  int ans=0;
  for(int i=N; ;++i){
  	if(i%111==0){
      ans=i;
      break;
  }
  
  cout<<ans<<endl;
  
}


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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  int ans;
  for(i=0;i*111<N){
    ans = (i+1)*111;
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'i' was not declared in this scope
    8 |   for(i=0;i*111<N){
      |       ^
a.cc:8:18: error: expected ';' before ')' token
    8 |   for(i=0;i*111<N){
      |                  ^
      |                  ;
Language: C

#include<stdio.h>

int main()
{
  int N, r;
  scanf("%d", N);
  
  r = (N-N%111) / 111+1;
 
  if (N%111 == 0)
  {
    printf ("%d", N);

  else
  {   
    printf("%d%d%d",r,r,r);
  }
    
  return 0;
}
  


Compiler output:
main.c: In function 'main':
main.c:14:3: error: expected '}' before 'else'
   14 |   else
      |   ^~~~
Language: C++

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

int main()
{
	int n, ans;
	cin >> n;
	for (int i = n; i <= n + 100; i++)
		if(i % 111 == 0)
		{
			ans = i;
			break;
		}
	cout << ans << endl; 
	return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
int main () [
  int N;
  cin >> N;
  if (N < 112) cout << 111 << endl;
  if (112 <= N < 223) cout << 222 << endl;
  if (223 <= N < 334) cout << 333 << endl;
  if (334 <= N < 445) cout << 444 << endl;
  if (445 <= N < 556) cout << 555 << endl;
  if (556 <= N < 667) cout << 666 << endl;
  if (667 <= N < 778) cout << 777 << endl;
  if (778 <= N < 889) cout << 888 << endl;
  if (889 <= N < 1000) cout << 999 << endl;
}

Compiler output:
a.cc:4:3: error: expected primary-expression before 'int'
    4 |   int N;
      |   ^~~
a.cc:3:14: error: expected ']' before 'int'
    3 | int main () [
      |              ^
      |              ]
    4 |   int N;
      |   ~~~         
a.cc:5:3: error: 'cin' does not name a type
    5 |   cin >> N;
      |   ^~~
a.cc:6:3: error: expected unqualified-id before 'if'
    6 |   if (N < 112) cout << 111 << endl;
      |   ^~
a.cc:7:3: error: expected unqualified-id before 'if'
    7 |   if (112 <= N < 223) cout << 222 << endl;
      |   ^~
a.cc:8:3: error: expected unqualified-id before 'if'
    8 |   if (223 <= N < 334) cout << 333 << endl;
      |   ^~
a.cc:9:3: error: expected unqualified-id before 'if'
    9 |   if (334 <= N < 445) cout << 444 << endl;
      |   ^~
a.cc:10:3: error: expected unqualified-id before 'if'
   10 |   if (445 <= N < 556) cout << 555 << endl;
      |   ^~
a.cc:11:3: error: expected unqualified-id before 'if'
   11 |   if (556 <= N < 667) cout << 666 << endl;
      |   ^~
a.cc:12:3: error: expected unqualified-id before 'if'
   12 |   if (667 <= N < 778) cout << 777 << endl;
      |   ^~
a.cc:13:3: error: expected unqualified-id before 'if'
   13 |   if (778 <= N < 889) cout << 888 << endl;
      |   ^~
a.cc:14:3: error: expected unqualified-id before 'if'
   14 |   if (889 <= N < 1000) cout << 999 << endl;
      |   ^~
a.cc:15:1: error: expected declaration before '}' token
   15 | }
      | ^
Language: C

#include<stdio.h>
int main()
{
  int a,b,c,n;
  scanf("%d",&n);
  a=n/100;
  b=(n-a*100)/10;
  c=n%10;
  if(a!=c||a!=b){
    if(a<b&&b<c){
      a=c;
      b=c;
    }else if(a<b&&c<b){
      a=b;
      c=b;
    }else if(b<a&&c<a){
      b=a;
      c=a;
    }
  n=a*100+b*10+c;
  printf("%d",n);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:23:1: error: expected declaration or statement at end of input
   23 | }
      | ^
Language: C++

#include<iostream>
using namespace std;

int main()
{
	string str;
	cin>>str;
	for(int i=0;i<str.length();i++)
	{
		cout<<str[str.length-1];
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:31: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   10 |                 cout<<str[str.length-1];
      |                           ~~~~^~~~~~
      |                                     ()
Language: C++

750#include<iostream>
using namespace std;
int num[10]={111,222,333,444,555,666,777,888,999,1111};
int main()
{
	int n;
    cin>>n;
    for(int i=0; i<10 ; i++)
    {
    	if(num[i]>=n) {
    	cout<<num[i];return 0;
        }
    }
     return 0;
}

Compiler output:
a.cc:1:4: error: stray '#' in program
    1 | 750#include<iostream>
      |    ^
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 750#include<iostream>
      | ^~~
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin>>n;
      |     ^~~
a.cc:11:9: error: 'cout' was not declared in this scope
   11 |         cout<<num[i];return 0;
      |         ^~~~
Language: C++

n = int(input())

a = int(n / 100)

zoro = (100 * a) + (10 * a) + a

if(n <= zoro):
    print(zoro)
else:
    a = a + 1
    zoro = (100 * a) + (10 * a) + a
    print(zoro)


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

#include <bits/stdc++.h>
using namespace std;
 
int main() {int n;cin>>n;
            if(100=<n<112)cout<<111;
            else if(112=<n<223)cout<<222;
            else if(223=<n<334)cout<<333;
            else if(334=<n<445)cout<<444;
            else if(445=<n<556)cout<<555;
            else if(556=<n<667)cout<<666;
            else if(667=<n<778)cout<<777;
            else if(778=<n<889)cout<<888;
            else{cout<<999;}
            cout<<endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:20: error: expected primary-expression before '<' token
    5 |             if(100=<n<112)cout<<111;
      |                    ^
a.cc:6:25: error: expected primary-expression before '<' token
    6 |             else if(112=<n<223)cout<<222;
      |                         ^
a.cc:7:25: error: expected primary-expression before '<' token
    7 |             else if(223=<n<334)cout<<333;
      |                         ^
a.cc:8:25: error: expected primary-expression before '<' token
    8 |             else if(334=<n<445)cout<<444;
      |                         ^
a.cc:9:25: error: expected primary-expression before '<' token
    9 |             else if(445=<n<556)cout<<555;
      |                         ^
a.cc:10:25: error: expected primary-expression before '<' token
   10 |             else if(556=<n<667)cout<<666;
      |                         ^
a.cc:11:25: error: expected primary-expression before '<' token
   11 |             else if(667=<n<778)cout<<777;
      |                         ^
a.cc:12:25: error: expected primary-expression before '<' token
   12 |             else if(778=<n<889)cout<<888;
      |                         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {int n;cin>>n;
            if(99=<n<112)cout<<111;
            else if(112=<n<223)cout<<222;
            else if(223=<n<334)cout<<333;
            else if(334=<n<445)cout<<444;
            else if(445=<n<556)cout<<555;
            else if(556=<n<667)cout<<666;
            else if(667=<n<778)cout<<777;
            else if(778=<n<889)cout<<888;
            else{cout<<999;}
            cout<<endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:19: error: expected primary-expression before '<' token
    5 |             if(99=<n<112)cout<<111;
      |                   ^
a.cc:6:25: error: expected primary-expression before '<' token
    6 |             else if(112=<n<223)cout<<222;
      |                         ^
a.cc:7:25: error: expected primary-expression before '<' token
    7 |             else if(223=<n<334)cout<<333;
      |                         ^
a.cc:8:25: error: expected primary-expression before '<' token
    8 |             else if(334=<n<445)cout<<444;
      |                         ^
a.cc:9:25: error: expected primary-expression before '<' token
    9 |             else if(445=<n<556)cout<<555;
      |                         ^
a.cc:10:25: error: expected primary-expression before '<' token
   10 |             else if(556=<n<667)cout<<666;
      |                         ^
a.cc:11:25: error: expected primary-expression before '<' token
   11 |             else if(667=<n<778)cout<<777;
      |                         ^
a.cc:12:25: error: expected primary-expression before '<' token
   12 |             else if(778=<n<889)cout<<888;
      |                         ^
Language: C++

#include <iostream>
using namsespace std;

int main(){
    int N;
    cin >> N;
    int i = N / 111;
    if(N%111 != 0)i++;
    cout << i * 111 << endl;

    return 0;
}


Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namsespace'
    2 | using namsespace std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |     cin >> N;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     cout << i * 111 << 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:9:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |     cout << i * 111 << 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 <stdio.h>;

int main(){
  int n;
  scanf("%d",%n);
  if(0<=n<=111){
    n=111;
  }else if (112<=n<=222){
    n=222;
  }else if (223<=n<=333){
    n=333;
  }else if (334<=n<=444){
    n=444;
  }else if(445<=n<=555){
    n=555;
  }else if(556<=n<=666){
    n=666;
  }else if(667<=n<=777){
    n=777;
  }else if(778<=n<=888){
    n=888;
  }else if(889<=n<=999){
    n=999;
  }else{
    n=0;
  }
  printf("%d",n);
  return 0;
  
}


Compiler output:
main.c:1:19: warning: extra tokens at end of #include directive
    1 | #include <stdio.h>;
      |                   ^
main.c: In function 'main':
main.c:5:14: error: expected expression before '%' token
    5 |   scanf("%d",%n);
      |              ^
Language: Java

public class Main{
    public static void main(String[] args) {
        java.util.Scanner sc = new java.util.Scanner(System.in);
        int N = sc.nextInt();
        int[] n = new int[3];
        int minN = 0;
        n[0] = N / 100;
        n[1] = (N - n[0] * 100) / 10;
        n[2] = (N - n[0] * 100 - medN * 10) % 10;
        minN = Math.min(n[0],n[1]);
        minN = Math.min(minN,n[2]);
        System.out.print(minN);
        System.out.print(minN);
        System.out.println(minN);
    }
}

Compiler output:
Main.java:9: error: cannot find symbol
        n[2] = (N - n[0] * 100 - medN * 10) % 10;
                                 ^
  symbol:   variable medN
  location: class Main
1 error
Language: Java

public class Main{
    public static void main(String[] args) {
        java.util.Scanner sc = new java.util.Scanner(System.in);
        int N = sc.nextInt();
        int[] n = new int[3];
        int minN = 0;
        n[0] = N / 100;
        n[1] = (N - n[0] * 100) / 10;
        n[2] = (N - n[0] * 100 - medN * 10) % 10;
        minN = Math.min(n[0],n[1]);
        minN = Math.min(minN,n[2]);
        System.out.print(n[0]);
        System.out.print(n[1]);
        System.out.println(n[2]);
    }
}

Compiler output:
Main.java:9: error: cannot find symbol
        n[2] = (N - n[0] * 100 - medN * 10) % 10;
                                 ^
  symbol:   variable medN
  location: class Main
1 error
Language: C++

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
#define int ll

#define REP(i,n) for(int i=0;i<n;++i)
#define SORT(name) sort(name.begin(), name.end())
#define ZERO(p) memset(p, 0, sizeof(p))
#define MINUS(p) memset(p, -1, sizeof(p))
#if 1
#  define DBG(fmt, ...) printf(fmt, ##__VA_ARGS__)
#else
#  define DBG(fmt, ...)
#endif

const ll LLINF = (1LL<<60);
const int INF = (1LL<<30);
const double DINF = std::numeric_limits<double>::infinity();
const int MOD = 1000000007;
#define MAX_N 100010

static inline bool IsAns(string s) {
    char base = s[0];
    REP(i, s.length()) { if(base != s[i]) { return false; } }
    return true;
}

signed main()
{
    int N;
    cin >> N;
    for(int i = N; i < 10000; ++i) {
        if(IsAns(i)) {
            printf("%lld\n", i);
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:18: error: could not convert 'i' from 'll' {aka 'long long int'} to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   34 |         if(IsAns(i)) {
      |                  ^
      |                  |
      |                  ll {aka long long int}
Language: C++

/*
I just got lost in thought. It was unfamiliar territory.
- Steven Wright
*/

#include <algorithm>
#include <bitset>
#include <complex>
#include <cstring>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <vector>
//#include <boost/math/common_factor.hpp>
using namespace std;

#define FOR(i, a, b) for(int i = (a); i < (b); ++i)
#define RFOR(i, b, a) for(int i = (b) - 1; i >= (a); --i)
#define REP(i, N) FOR(i, 0, N)
#define RREP(i, N) RFOR(i, N, 0)
#define FILL(A,value) memset(A,value,sizeof(A))

#define ALL(V) V.begin(), V.end()
#define SZ(V) (int)V.size()
#define pb push_back
#define mp make_pair
#define Pi 3.14159265358979
#define A first
#define B second

typedef long long ll;
typedef vector <int> vi;
typedef vector<ll> vl;
typedef pair <int, int> pi;
typedef pair <ll, int> pl;
typedef pair <double, double> pd;

//change these according to prob constraints
const int INF = 1000000000;
const int MAX = 100005;
const int MAX1 = 2007;
const int MAX2 = 4007;
const int LEN = 21;
const int BASE = 1000000000;
const double EPS = 1e-7;
const int MOD = 1234567891;
//g++ -std=c++11 your_file.cpp -o your_program

int main(void){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	ifstream in("");
	ofstream out("");
	int n;
  cin >> n;
  REP(i, 9){
    string tmp = "";
    REP(j, 3){
      tmp += stoi(i + 1);
    }
    if (stoi(tmp) > n){
      cout << "tmp" << endl;
      return 0;
    }
  }
    cout << 1111 << endl;
	return 0;	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:81:18: error: no matching function for call to 'stoi(int)'
   81 |       tmp += stoi(i + 1);
      |              ~~~~^~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from a.cc:7:
/usr/include/c++/14/bits/basic_string.h:4164:3: note: candidate: 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)'
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4164:22: note:   no known conversion for argument 1 from 'int' to 'const std::string&' {aka 'const std::__cxx11::basic_string<char>&'}
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:4432:3: note: candidate: 'int std::__cxx11::stoi(const std::wstring&, std::size_t*, int)'
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4432:23: note:   no known conversion for argument 1 from 'int' to 'const std::wstring&' {aka 'const std::__cxx11::basic_string<wchar_t>&'}
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~~^~~~~
Language: C++

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

int main()
{
    int nb;
    if((nb % 111) = 0)
    {
        cout << nb;
    }
    else
    {
        nb = nb / 100;
        nb = nb * 111;
        cout << nb;
    }
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namspace'
    2 | using namspace std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:7:12: error: lvalue required as left operand of assignment
    7 |     if((nb % 111) = 0)
      |        ~~~~^~~~~~
a.cc:9:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |         cout << nb;
      |         ^~~~
      |         std::cout
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:15:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 |         cout << nb;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: Java

import java.util.Scanner;

public class　Main	{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		
		if(n <= 111) {
			System.out.println(111);
		}else if(111 < n && n <= 222) {
			System.out.println(222);
		}else if(222 < n && n <= 333) {
			System.out.println(333);
		}else if(333 < n && n <= 444) {
			System.out.println(444);
		}else if(444 < n && n <= 555) {
			System.out.println(555);
		}else if(555 < n && n <= 666) {
			System.out.println(666);
		}else if(666 < n && n <= 777) {
			System.out.println(777);
		}else if(777 < n && n <= 888) {
			System.out.println(222);
		}else {
			System.out.println(999);
		}

	}

}


Compiler output:
Main.java:3: error: illegal character: '\u3000'
public class?Main	{
            ^
1 error
Language: C++

// ConsoleApplication69.cpp : アプリケーションのエントリ ポイントを定義します。
//

#include "stdafx.h"
#include<algorithm>
#include<iostream>
#include<vector>
#include<string>
#include<cstring>
#include<utility>
using namespace std;
#define REP(i, a,b) for(i=a;i<b;i++) 
#define output(x) cout<<x<<endl;
typedef long long int ll;



int main()
{
	ll  i, j, k, l, m, sum, flag,ans,W,H;
	sum = 0;
	flag = 0;
	int N[3];
	cin >> N[0] >> N[1] >> N[2];
	sum = 100 * N[0] + 10 * N[1] + N[2];
	int sum1 = 111 * N[0];
	if (sum <= sum1) {
		ans = sum1;
	}
	else
		ans = sum1 + 111;
	output(ans);

	//ソートしてある配列aの各要素の数を前から数え上げることで新しい配列lenに入れている
	return 0;
}



Compiler output:
a.cc:4:10: fatal error: stdafx.h: No such file or directory
    4 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

// ConsoleApplication69.cpp : アプリケーションのエントリ ポイントを定義します。
//

#include "stdafx.h"
#include<algorithm>
#include<iostream>
#include<vector>
#include<string>
#include<cstring>
#include<utility>
using namespace std;
#define REP(i, a,b) for(i=a;i<b;i++) 
#define output(x) cout<<x<<endl;
typedef long long int ll;



int main()
{
	ll  i, j, k, l, m, sum, flag,ans,W,H;
	sum = 0;
	flag = 0;
	int N[3];
	cin >> N[0] >> N[1] >> N[2];
	sum = 100 * N[0] + 10 * N[1] + N[2];
	int sum1 = 111 * N[0];
	if (sum <= sum1) {
		ans = sum1;
	}
	else
		ans = sum1 + 111;
	output(sum);

	//ソートしてある配列aの各要素の数を前から数え上げることで新しい配列lenに入れている
	return 0;
}



Compiler output:
a.cc:4:10: fatal error: stdafx.h: No such file or directory
    4 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

int main()
{
  
  char k[2];
  scanf("%s",k);
  if(k[0]>k[1] && k[0]>k[2])
  {
      printf("%c%c%c",k[0],k[0],k[0]);
  }else{
      if(k[1]>k[2] && k[1]>k[0])
      {
         printf("%c%c%c",k[1],k[1],k[1]); 
      }else{
          printf("%c%c%c",k[2],k[2],k[2]); 
      }
  }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'scanf' was not declared in this scope
    5 |   scanf("%s",k);
      |   ^~~~~
a.cc:8:7: error: 'printf' was not declared in this scope
    8 |       printf("%c%c%c",k[0],k[0],k[0]);
      |       ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main()
a.cc:12:10: error: 'printf' was not declared in this scope
   12 |          printf("%c%c%c",k[1],k[1],k[1]);
      |          ^~~~~~
a.cc:12:10: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:14:11: error: 'printf' was not declared in this scope
   14 |           printf("%c%c%c",k[2],k[2],k[2]);
      |           ^~~~~~
a.cc:14:11: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include <iostream>
#include <cstdlib>
#include <algorithm>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <utility>
using namespace std;


int main(){
    int n;
    int a, b, c;
    int p[9] = {111,222,333,444,555,666,777,888,999}
    cin >> n;
    a = n / 100;
    b = (n - 100 * (n / 100)) / 10;
    c = n % 10;
    for(int i=0;i<9;i++){
        if(n <= p[i]) cout << p[i] << endl;
        return 0;
    }

    
	
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:5: error: expected ',' or ';' before 'cin'
   16 |     cin >> n;
      |     ^~~
Language: C++

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

int main(){
  int b,a[9]={111,222,333,444,555,666,777,888,999}
  cin>>b;
  cout<<a[b/111]<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected ',' or ';' before 'cin'
    6 |   cin>>b;
      |   ^~~
Language: C++

int main()
{
	int  a;
	int i = 0;
	cin >> a;
	int max = 0;
	if (a > 999 || a < 100)
		return 0;
	while (a > 0)
	{
		int index = a % 10;
		if (index > max)
			max = index;
		a = a / 10;
	}
	cout << max*100+max*10+max;
	//system("pause");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
    5 |         cin >> a;
      |         ^~~
a.cc:16:9: error: 'cout' was not declared in this scope
   16 |         cout << max*100+max*10+max;
      |         ^~~~
Language: C++

#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
#define INF (1<<30)
#define INFLL (1ll<<60)
typedef pair<int, int> P;
typedef pair<int, P> E;
#define MOD (1000000007ll)
#define l_ength size

void mul_mod(ll& a, ll b){
	a *= b;
	a %= MOD;
}

void add_mod(ll& a, ll b){
	b += MOD;
	a += b;
	a %= MOD;
}

int main(void){
	cin >> n;
	cout << (111*((n-1)/111)) << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:16: error: 'n' was not declared in this scope; did you mean 'yn'?
   23 |         cin >> n;
      |                ^
      |                yn
Language: C++

#include<iostream>
using namespace std;int n;main(){cin>>n;cout<<(n+110)/111*111);}

Compiler output:
a.cc:2:27: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | using namespace std;int n;main(){cin>>n;cout<<(n+110)/111*111);}
      |                           ^~~~
a.cc: In function 'int main()':
a.cc:2:62: error: expected ';' before ')' token
    2 | using namespace std;int n;main(){cin>>n;cout<<(n+110)/111*111);}
      |                                                              ^
      |                                                              ;