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

#include<bits/stdc++.h>
main(){
  string s;
  cin>>s;
  cout<<(s[0]=='9')?'1':'9';
  cout<<(s[1]=='9')?'1':'9';
  cout<<(s[2]=='9')?'1':'9';
}

Compiler output:
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:3:3: error: 'string' was not declared in this scope
    3 |   string s;
      |   ^~~~~~
a.cc:3:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin>>s;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:4:8: error: 's' was not declared in this scope
    4 |   cin>>s;
      |        ^
a.cc:5:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |   cout<<(s[0]=='9')?'1':'9';
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

/*
	Created by : imay_10
	" It won't be EASY, but I'll make it "
*/

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

typedef long long int ll;
const int mod = 1e9+7;
const ll inf = 1e18;
const double pi = 3.1415926535897932384626;

// Utility for fast exponentiation
ll mpow(ll a,ll b,ll m){
    ll res=1;
    //a%=m;
    while(b){
    	if(b%2) res=res*a%m;
		a=a*a%m;
		b/=2;
	}
	return res;
}

// Utility for modular inverse
ll inv(ll a,ll m){
	return mpow(a,m-2,m);
}

// Utility for GCD Calculation
ll gcd(ll a,ll b){
	if(b==0) return a;
	return gcd(b,a%b);
}

// Utility for binomial coefficient
ll ncr(ll n,ll k)
{
    if(n<k)
        return 0;
    ll C[n + 1][k + 1];
    ll i,j;
    for(i=0;i<=n;i++){
        for(j=0;j<=min(i,k);j++){
            if (j==0 || j==i)
                C[i][j]=1;
            else
                C[i][j]=(C[i-1][j-1]+C[i-1][j])%mod;
        }
    }
    return C[n][k];
}

void solve(){
	//code
	int n,m=0;
	cin>>n;
	while(n){
		m=max(m,n%10);
		c++;
		n/=10;
	}
	for(int i=0;i<c;i++)
		cout<<m;
}

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	
	solve();
 	return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:61:17: error: 'c' was not declared in this scope
   61 |                 c++;
      |                 ^
a.cc:64:23: error: 'c' was not declared in this scope
   64 |         for(int i=0;i<c;i++)
      |                       ^
Language: C++

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

int main(){
  int N;cin>>N;
  cout<<(N%==0?N:(N+110)/111)<<endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: expected primary-expression before '=' token
    6 |   cout<<(N%==0?N:(N+110)/111)<<endl;
      |             ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:27: error: expected primary-expression before '<' token
    9 |   cout << 111 + A / 111 <<< endl;
      |                           ^
Language: C++

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

int main() {
  int N;
  cin >> N;
  for (int i = 1; i < 10; i++) {
    if (111 * i >= N) {
      cout << 111 * i << endl;
      break;
    }
}


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

#include <algorithm>
#include <bitset>
#include <tuple>
#include <cstdint>
#include <cstdio>
#include <cctype>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <limits>
#include <map>
#include <memory>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;
using ll=long long;
using ld=long double;
//#define int long long
//#define _CRT_SECURE_NO_WARNINGS
#define rep(i, n) for (int i = 0; i < n; i++)
#define _GLIBCXX_DEBUG
#define ALL(x) (x).begin(), (x).end()
const int MOD = 1e9 + 7;
const int INF = 1e18 + 9;
constexpr long double pi = 3.141592653589793238462643383279;
int fact(int i) {
    if (i == 0) return 1;
    return (fact(i - 1)) * i;
}
int gcd(int a, int b) {
    if (b == 0) return a;
    return gcd(b, a % b);
}
int lcm(int a, int b) {
    return a * b / gcd(a, b);
}
int keta(int n) {
    if (n == 0) return 1;
    int count = 0;
    while (n != 0) {
        n /= 10;
        count++;
    }
    return count;
}
int ketasum(int n) {
    int sum = 0;
    while (n != 0) {
        sum += n % 10;
        n /= 10;
    }
    return sum;
}
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
char toSmall(char c) { // 大文字を小文字へ
    return (c + 0x20);
}
char toLarge(char c) { // 小文字を大文字へ
    return (c - 0x20);
}
float myPower(int a, int n) { // aのn乗の計算
    float x = 1;
    while (n > 0) { // 全てのbitが捨てられるまで
        if (n & 1) { // 一番右のbitが１のとき
            x *= a;
        }
        a *= a;
        n >>= 1; // bit全体を右に1つシフトして一番右を捨てる
    }
    return x;
}
int n;
int main(void) {
    cin >> n;
    int ans = n / 111;
    if (n % 111 = 0) ++ans;
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc:44:22: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow]
   44 | const int INF = 1e18 + 9;
      |                 ~~~~~^~~
a.cc: In function 'int main()':
a.cc:109:11: error: lvalue required as left operand of assignment
  109 |     if (n % 111 = 0) ++ans;
      |         ~~^~~~~
Language: C++

#include <stdio.h>
#include <string>
using std;
int main(){
	long long int n;
  cin>>n;
  for(int i=n; i<=999; i++){
     string s=to_string(i);
    if(s[0]==s[1]&&s[1]==s[2]){
        cout<<s<<endl;
    }
  }
}


Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'std'
    3 | using std;
      |       ^~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>n;
      |   ^~~
a.cc:8:6: error: 'string' was not declared in this scope
    8 |      string s=to_string(i);
      |      ^~~~~~
a.cc:8:6: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from a.cc:2:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:9:8: error: 's' was not declared in this scope
    9 |     if(s[0]==s[1]&&s[1]==s[2]){
      |        ^
a.cc:10:9: error: 'cout' was not declared in this scope
   10 |         cout<<s<<endl;
      |         ^~~~
a.cc:10:18: error: 'endl' was not declared in this scope
   10 |         cout<<s<<endl;
      |                  ^~~~
Language: C++

#include <stdio.h>
int main(){
	long long int n;
  cin>>n;
  for(int i=n; i<=999; i++){
     string s=to_string(i);
    if(s[0]==s[1]&&s[1]==s[2]){
        cout<<s<<endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin>>n;
      |   ^~~
a.cc:6:6: error: 'string' was not declared in this scope; did you mean 'stdin'?
    6 |      string s=to_string(i);
      |      ^~~~~~
      |      stdin
a.cc:7:8: error: 's' was not declared in this scope
    7 |     if(s[0]==s[1]&&s[1]==s[2]){
      |        ^
a.cc:8:9: error: 'cout' was not declared in this scope
    8 |         cout<<s<<endl;
      |         ^~~~
a.cc:8:18: error: 'endl' was not declared in this scope
    8 |         cout<<s<<endl;
      |                  ^~~~
Language: C

#include <stdio.h>
 
int main()
{
	int N;
	scanf("%d", &N);
 
	int i = N / 111;
	if (N % 111 != 0) ++i;
 
	printf("%d\n", i * 111);
	return 0;
}
#include <cstdio>


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

#include <cstdio>
 
int main()
{
	int N;
	scanf("%d", &N);
 
	int i = N / 111;
	if (N % 111 != 0) ++i;
 
	printf("%d\n", i * 111);
	return 0;
}
#include <cstdio>

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

#include <bits/stdc++.h>

using namespace std;

int main() {
  int n;
  cin >> n;
  
  auto chk = [](int n) {
    string ns = to_string(n);
    bool ans = true;
    for (int i = 0; i < ns.size(); i++) {
      if (s[i] != s[0]) {
        ans = false;
        break;
      }
    }
    
    return ans;
  };
  
  while (!chk(n)) {
    n++;
  }
  
  cout << n << '\n';
}

Compiler output:
a.cc: In lambda function:
a.cc:13:11: error: 's' was not declared in this scope
   13 |       if (s[i] != s[0]) {
      |           ^
Language: C++

#include <iostream>

using namespace std;

int main() {
    string n;
    cin >> n;
    char big_digit = ' ';
    for (int i = 0; i < n.length(); i++) {
        if (n[i] > big_digit) {
            big_digit = n[i];
        }
    }
    int largest_digit = big_digit - '0';
    cout << (n.length == 3 ? largest_digit * 111 : (n.length == 2 ? largest_digit * 11 : largest_digit));
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:16: 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 '()' ?)
   15 |     cout << (n.length == 3 ? largest_digit * 111 : (n.length == 2 ? largest_digit * 11 : largest_digit));
      |              ~~^~~~~~
      |                      ()
a.cc:15:55: 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 '()' ?)
   15 |     cout << (n.length == 3 ? largest_digit * 111 : (n.length == 2 ? largest_digit * 11 : largest_digit));
      |                                                     ~~^~~~~~
      |                                                             ()
Language: C++

/**
*    created: 23.06.2020 23:28:27
**/
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define int long long
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
#define pcnt(bit) __builtin_popcount(bit)
#define mod 1000000007
#define pi acos(-1.0)
using namespace std;

signed main() {

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

    int n;
    cin >> n;
    if (100 <= n && n <= 111) cout << 111 << endl;
    if (111 < n && n <= 222) cout << 222 << endl;
    if (222 < n && n <= 333) cout << 333 << endl;
    if (333 < n && n <= 444) cout << 444 << endl;
    if (444 < n && n <= 555) cout << 555 << endl;
    if (555 < n && n <= 666) cout << 666 << endl;
    if (666 < n && n <= 777) cout << 777 << endl;
    if (777 < n && n <= 888) cout << 888 << endl;
    if (888 < n && n <= 999) cout << 999 << endl;
    return 0;

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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin>>n;
  rep(i,9){
    if(111*i>=n){
      cout<<111*i<<endl;
      return 0;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: 'i' was not declared in this scope
    6 |   rep(i,9){
      |       ^
a.cc:6:3: error: 'rep' was not declared in this scope
    6 |   rep(i,9){
      |   ^~~
Language: C++

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


Compiler output:
a.cc:2:20: error: expected ';' before 'int'
    2 | using namespace std
      |                    ^
      |                    ;
    3 | int main(){int N;cin>>N;N+=110;cout<<(N/111)*111<<endl;}
      | ~~~
Language: C++

#include<iostream>
int main(){std::int N;cin>>N;N+=110;cout<<(N/111)*111<<endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:17: error: expected unqualified-id before 'int'
    2 | int main(){std::int N;cin>>N;N+=110;cout<<(N/111)*111<<endl;}
      |                 ^~~
a.cc:2:23: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    2 | int main(){std::int N;cin>>N;N+=110;cout<<(N/111)*111<<endl;}
      |                       ^~~
      |                       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:2:28: error: 'N' was not declared in this scope
    2 | int main(){std::int N;cin>>N;N+=110;cout<<(N/111)*111<<endl;}
      |                            ^
a.cc:2:37: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    2 | int main(){std::int N;cin>>N;N+=110;cout<<(N/111)*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:2:56: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    2 | int main(){std::int N;cin>>N;N+=110;cout<<(N/111)*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 <bits/stdc++.h>
using namespace std;
//型に気を付けよう

#define rep(i,n) for(int i=0;i<n;i++)
typedef long long  ll;
typedef long double  ld;
typedef pair<int,int> pairii;
const double pi=3.1415926535;
const ll  mod=1000000007;
//桁数指定　cout << fixed << setprecision(2)
int main() {
  int x;
  cin>>x;
  for(int i=1;i<=9;i++){
    if(i*111>=x){
      int ans=i*111;
      break;
    }
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   21 |   cout<<ans<<endl;
      |         ^~~
      |         abs
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int a;
  cin >> a;
  for(int i=a;i<1000;i++){
    if(i%111=0){
      cout << i;
      return 0;
    }
    i++;
  }
  /*
  char s[200];
  cin >> s;
  int a,b,c,d;
  cin >> a >> b >> c >> d;
  for(int i=0;i<a;i++){
    cout << s[i];
  }
  cout << "\"";
  for(int i=a;i<b;i++){
    cout << s[i];
  }
  cout << "\"";
  for(int i=b;i<c;i++){
    cout << s[i];
  }
  cout << "\"";
  for(int i=c;i<d;i++){
    cout << s[i];
  }
  cout << "\"";
  for(int i=d;i<strlen(s);i++){
    cout << s[i];
  }*/
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: lvalue required as left operand of assignment
    7 |     if(i%111=0){
      |        ~^~~~
Language: C++

n = int(input())

if n <= 111:
  print(111)
elif n <= 222:
  print(222)
elif n <= 333:
  print(333)
elif n <= 444:
  print(444)
elif n <= 555:
  print(555)
elif n <= 666:
  print(666)
elif n <= 777:
  print(777)
elif n <= 888:
  print(888)
elif n <= 999:
  print(999)

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;
  int i=1;
  while(1){
    ans=i*100+i*10+i;
    if(ans-n>=0){
      cout << ans;
      break;
    }
    i++;
  }
}
    
  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
    8 |     ans=i*100+i*10+i;
      |     ^~~
      |     abs
Language: C++

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

int main(){
    int c;
    cin >> c;
    int a[3];
    
    int i= N/111;
    if(N%111!=0) i++;

    cout << i*111 << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: 'N' was not declared in this scope
    9 |     int i= N/111;
      |            ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int digit(int n)
{
  set<int> s;
  while(n!=0)
  {
    s.isnert(n%10);
    n/=10;
  }
  
  if(s.size()==1)
      return 1;
  
  else
     return 0;
}
int main()
{
   int n;
   cin>>n;
  
   for(i=n;;++i)
   {
       if(digit(i))
           break;
     
   }
  
  cout<<i;
}

Compiler output:
a.cc: In function 'int digit(int)':
a.cc:10:7: error: 'class std::set<int>' has no member named 'isnert'; did you mean 'insert'?
   10 |     s.isnert(n%10);
      |       ^~~~~~
      |       insert
a.cc: In function 'int main()':
a.cc:25:8: error: 'i' was not declared in this scope
   25 |    for(i=n;;++i)
      |        ^
a.cc:32:9: error: 'i' was not declared in this scope
   32 |   cout<<i;
      |         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
int n;
  cin>>n;
  for (int i = 111; i <=999; i+=111) {
 if(i>=n){
   cout<<i<<endl;
   return 0;
}



}

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

#include<stdio.h>
int main(void){
  int i,t,kaisai[9]={111,222,333,444,555,666,777,888,999};
  scanf("%d",&t);
  for(i=0;t>kasai[i];i++){
  }
  printf("%d",kasai[i]);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:13: error: 'kasai' undeclared (first use in this function); did you mean 'kaisai'?
    5 |   for(i=0;t>kasai[i];i++){
      |             ^~~~~
      |             kaisai
main.c:5:13: note: each undeclared identifier is reported only once for each function it appears in
Language: Java

import java.util.Scanner;

public class Palace {
	public static void main(String args[]) {
		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int t = scan.nextInt();
		int a = scan.nextInt();
		int h[] = new int[n];
		for (int i = 0; i < n; i++) {
			h[i] = scan.nextInt();
		}

		double temp = Math.abs(a - (t - h[0] * 0.006));
		int ans = 0;
		for (int i = 1; i < n; i++) {
			if (Math.abs(a - (t - h[i] * 0.006)) < temp) {
				temp = Math.abs(a - (t - h[i] * 0.006));
				ans = i;
			}
		}

		System.out.println(ans + 1);
		scan.close();
	}
}

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

#include<stdio.h>
int main(void){
  int i,max=0;
  static int n;
  scanf("%d",&n);
  for(i=0;i<3;i++){
    k=n%10;
    if(k>max) max=k;
  }
  printf("%d%d%d",max,max,max);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:5: error: 'k' undeclared (first use in this function)
    7 |     k=n%10;
      |     ^
main.c:7:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <bits/stdc++.h>
#define REP(i, a, b) for (long long i = a; i <= b; ++i)
#define ll long long
using namespace std;

ll n, i, a[5];

inline ll read(){
	ll s = 0, w = 1;
	char ch = getchar();
	while (ch < '0' || ch > '9'){
		if (ch == '-') w *= -1;
		ch = getchar();
	}
	while (ch >= '0' && ch <= '9'){
		s = s * 10 + ch - '0';
		ch = getchar();
	}
	return s * w;
}

inline void work(){
	n = read();
	while (m){
	    a[++i] = n % 10;
	    n /= 10;
	}
	sort(a + 1, a + i + 1);
	REP(j, 1, i) printf("%lld", a[i]);
}

int main(){
	work();
	return 0;
}

Compiler output:
a.cc: In function 'void work()':
a.cc:24:16: error: 'm' was not declared in this scope; did you mean 'tm'?
   24 |         while (m){
      |                ^
      |                tm
Language: C++

#include <bits/stdc++.h>
using namespace std; 
int main()
{
int a;
int b;
int c;
int n;
int max;

cin>>n;
a=n/100;
c=n%10;
b=(n-100*a-c)/10;
max=a;
if(b>max)
{
	max=b;
}
if(c>max)
{

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

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n;
  	cin>>n;
	m=n/100;
	if(((m*100)+(m*10)+m)<n)
		m++;
	cout<<m<<m<<m;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'm' was not declared in this scope
    7 |         m=n/100;
      |         ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
  cin>>n;
  int i,max=0;
  while(n!=0)
  {
    max(max,n%10);
    n/=10;
  }
  cout<<max<<max<<max<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: 'max' cannot be used as a function
   10 |     max(max,n%10);
      |     ~~~^~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
#include <math.h>
using namespace std;
#define rep(i,n) for(ll i=0;i<n;i++)
#define repl(i,l,r) for(ll i=(l);i<(r);i++)
#define per(i,n) for(ll i=n-1;i>=0;i--)
#define lper(i,r,l) for(ll i=r-1;i>=l;i--)
#define fi first
#define se second
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define CST(x) cout<<fixed<<setprecision(x)
using ll=long long;
using vl=vector<ll>;
using vvl=vector<vector<ll>>;
using pl=pair<ll,ll>;
const ll MOD=1000000007;
const ll MOD9=998244353;
const int inf=1e9;
const ll INF=4e18;
const ll dy[4]={1,0,-1,0};
const ll dx[4]={0,-1,0,1};
int main() {
  int N;
  cin >>N;
  repl(i,1,9) {
    if(N/111 !=0) {
      int a=N/111;
      int b=N-111*a;
      int c=N+(111-b);
      cout <<c<< endl;
    }
    else {
      cout <<N<< endl;
    }
  }
      


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

#include<bits/stdc++.h>
#include <math.h>
using namespace std;
#define rep(i,n) for(ll i=0;i<n;i++)
#define repl(i,l,r) for(ll i=(l);i<(r);i++)
#define per(i,n) for(ll i=n-1;i>=0;i--)
#define lper(i,r,l) for(ll i=r-1;i>=l;i--)
#define fi first
#define se second
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define CST(x) cout<<fixed<<setprecision(x)
using ll=long long;
using vl=vector<ll>;
using vvl=vector<vector<ll>>;
using pl=pair<ll,ll>;
const ll MOD=1000000007;
const ll MOD9=998244353;
const int inf=1e9;
const ll INF=4e18;
const ll dy[4]={1,0,-1,0};
const ll dx[4]={0,-1,0,1};
int main() {
  int N;
  cin >>N;
  repl(i,1,9) {
    if(N/111 !=0) {
      int a=N/111;
      int b=N-111*a;
      int c=N+(111-b);
      cout <<c<< endl;
    }
    else {
      cout <<N,< endl;
    }
  }
      

Compiler output:
a.cc: In function 'int main()':
a.cc:34:16: error: expected primary-expression before '<' token
   34 |       cout <<N,< endl;
      |                ^
a.cc:36:4: error: expected '}' at end of input
   36 |   }
      |    ^
a.cc:23:12: note: to match this '{'
   23 | int main() {
      |            ^
Language: C++

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

int n; 

int main()
{
	cin>>n;
	if ((n/100)*11>=n%100)  cout<<bai<<bai<<bai<<endl;
	else cout<<bai+1<<bai+1<<bai+1<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:39: error: 'bai' was not declared in this scope
    9 |         if ((n/100)*11>=n%100)  cout<<bai<<bai<<bai<<endl;
      |                                       ^~~
a.cc:10:20: error: 'bai' was not declared in this scope
   10 |         else cout<<bai+1<<bai+1<<bai+1<<endl;
      |                    ^~~
Language: C++

#pragma gcc optimize("Ofast")
#include <bits/stdc++.h>

using namespace std;
using ll = long long;

#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(V) (V).begin(),(V).end()
#define SORT(V) sort(ALL(V)) //小さい方からソート
#define REV(V) reverse(ALL(V)) //リバース
#define RSORT(V) SORT(V);REV(V) //大きい方からソート
#define NPN(V) next_permutation(ALL(V)) //順列
#define pb(n) push_back(n)
#define endl '\n'
#define Endl '\n'
#define DUMP(x)  cout << #x << " = " << (x) << endl
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define yes(n) cout << ((n) ? "yes" : "no"  ) << endl
#define Yay(n) cout << ((n) ? "Yay!": ":(") << endl
#define RAPID cin.tie(0);ios::sync_with_stdio(false)
#define VSUM(V) accumulate(ALL(V), 0)
#define MID(a,b,c) (a) < (b) && (b) < (c)
#define MIDe(a,b,c) (a) <= (b) && (b) <= (c)
#define IN(n) cin >> n
#define IN2(a,b) cin >> a >> b
#define IN3(a,b,c) cin >> a >> b >> c 
#define IN4(a,b,c,d) cin >> a >> b >> c >> d
#define VIN(V) for(int i = 0; i < (V).size(); i++) {cin >> (V).at(i);}
#define OUT(n) cout << n << endl
#define VOUT(V) REP(i, (V).size()) {cout << (V)[i] << endl;}
#define VOUT2(V) REP(i, (V).size()) {cout << (V)[i] << " ";} cout<<endl;

// 型マクロ定義
#define int long long
#define P pair<ll,ll>
#define Vi vector<ll>
#define Vd vector<double>
#define Vs vector<string>
#define Vc vector<char>
#define M map<ll,ll>
#define S set<ll>
#define PQ priority_queue<ll>
#define PQG priority_queue<ll,V,greater<ll>
//

const int MOD = 1000000007;
const int INF = 1061109567;
const double EPS = 1e-10;
const double PI  = acos(-1.0);

int gcd(int a,int b){return b != 0 ? gcd(b, a % b) : a;} //最大公約数
int lcm(int a, int b){return a * b / gcd(a, b);}
string toStrUp(string str){char diff = 'A'-'a';REP(i,str.size()) str[i] += diff;return str;}
string gCh(string str, int key){return str.substr(key,1);}

signed main() {
  RAPID;
  // デフォルト変数定義
  double n=0,m=0,a=0,b=0,d=0,x=0,y=0,z=0;
  double c = 0;
  string s="",t="";
  //

  // ここから
  IN(n);
  if(n%111==0) OUT(n);
  else OUT(((n/111)+1)*111);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:68:7: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   68 |   if(n%111==0) OUT(n);
      |      ~^~~~
      |      | |
      |      | int
      |      double
Language: C++

#include<iostream>
using namespace std;

main(){
string s; cin>>s; sort(s.begin(),s.end());
for(int i=0;i<s[i]!='\0';i++){
cout<<s[s.end()];
}
}

Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:19: error: 'sort' was not declared in this scope; did you mean 'short'?
    5 | string s; cin>>s; sort(s.begin(),s.end());
      |                   ^~~~
      |                   short
a.cc:7:8: error: no match for 'operator[]' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::__cxx11::basic_string<char>::iterator')
    7 | cout<<s[s.end()];
      |        ^
In file included 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/c++/14/bits/basic_string.h:1247:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]'
 1247 |       operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:1247:29: note:   no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
 1247 |       operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT
      |                   ~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:1265:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]'
 1265 |       operator[](size_type __pos)
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:1265:28: note:   no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
 1265 |       operator[](size_type __pos)
      |                  ~~~~~~~~~~^~~~~
Language: C++

#include<iostream>
using namespace std;

main(){
string s; cin>>s;
for(i=0;i<s[i]!='\0';i++){
cout<<s[0];
}
}

Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'i' was not declared in this scope
    6 | for(i=0;i<s[i]!='\0';i++){
      |     ^
Language: C++

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

int main() {
int n,m; cin>>n;
  m=(n/100)*111;
  if(n<=m)cout<<m<<endl;
  else cout<<m+=111<<endl;
}


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

#include <bits/stdc++.h>

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++)
typedef long long ll;


int main(){
  int n;
  int ans = 0;
  cin >> n;
  rep1(i,9){
    ans = 100*i+10*i+i;
    if(ans>=n){
      cout << ans << endl;
      return 0;
    }
  }
}
1

Compiler output:
a.cc:21:1: error: expected unqualified-id before numeric constant
   21 | 1
      | ^
Language: C++

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

void solve(long long N) {
  if( N <= 111 ){ cout << 111 << endl; return 0; }
    if( N <= 222 ){ cout << 222 << endl; return 0; }
    if( N <= 333 ){ cout << 333 << endl; return 0; }
    if( N <= 444 ){ cout << 444 << endl; return 0; }
    if( N <= 555 ){ cout << 555 << endl; return 0; }
    if( N <= 666 ){ cout << 666 << endl; return 0; }
    if( N <= 777 ){ cout << 777 << endl; return 0; }
    if( N <= 888 ){ cout << 888 << endl; return 0; }
    cout << 999 << endl;
}

// Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You
// use the default template now. You can remove this line by using your custom
// template)
int main() {
  long long N;
  scanf("%lld", &N);
  solve(N);
  return 0;
}


Compiler output:
a.cc: In function 'void solve(long long int)':
a.cc:5:47: error: return-statement with a value, in function returning 'void' [-fpermissive]
    5 |   if( N <= 111 ){ cout << 111 << endl; return 0; }
      |                                               ^
a.cc:6:49: error: return-statement with a value, in function returning 'void' [-fpermissive]
    6 |     if( N <= 222 ){ cout << 222 << endl; return 0; }
      |                                                 ^
a.cc:7:49: error: return-statement with a value, in function returning 'void' [-fpermissive]
    7 |     if( N <= 333 ){ cout << 333 << endl; return 0; }
      |                                                 ^
a.cc:8:49: error: return-statement with a value, in function returning 'void' [-fpermissive]
    8 |     if( N <= 444 ){ cout << 444 << endl; return 0; }
      |                                                 ^
a.cc:9:49: error: return-statement with a value, in function returning 'void' [-fpermissive]
    9 |     if( N <= 555 ){ cout << 555 << endl; return 0; }
      |                                                 ^
a.cc:10:49: error: return-statement with a value, in function returning 'void' [-fpermissive]
   10 |     if( N <= 666 ){ cout << 666 << endl; return 0; }
      |                                                 ^
a.cc:11:49: error: return-statement with a value, in function returning 'void' [-fpermissive]
   11 |     if( N <= 777 ){ cout << 777 << endl; return 0; }
      |                                                 ^
a.cc:12:49: error: return-statement with a value, in function returning 'void' [-fpermissive]
   12 |     if( N <= 888 ){ cout << 888 << endl; return 0; }
      |                                                 ^
Language: Java

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

   int sss = Math.ceil(N/111);
   System.out.println(111*sss);
 }
}

Compiler output:
Main.java:7: error: incompatible types: possible lossy conversion from double to int
   int sss = Math.ceil(N/111);
                      ^
1 error
Language: C

#include <cstdio.h>
 
int main()
{
	int N;
	scanf("%d", &N);
 
	int i = N / 111;
	if (N % 111 != 0) ++i;
 
	printf("%d\n", i * 111);
	return 0;
}

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

#include <cstdio.h>
 
int main()
{
	int N;
	scanf("%d", &N);
 
	int i = N / 111;
	if (N % 111 != 0) ++i;
 
	printf("%d\n", i * 111);
	return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
    int N;
    cin>>N;
    while (true)
    {
        if (N%111==0)
        {
            break
        }
        N++;
    }
    cout<<N<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: expected ';' before '}' token
   10 |             break
      |                  ^
      |                  ;
   11 |         }
      |         ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin >> n;
  
  int i=n/111;
  if(n%111) {
    cout << n<< endl;
    return 0;
  else {
    ++i;
    cout << i*111 << endl;
    return 0;
  }
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: expected '}' before 'else'
   11 |   else {
      |   ^~~~
a.cc:8:13: note: to match this '{'
    8 |   if(n%111) {
      |             ^
Language: C++

#include<bits/stdc+.j>
using namespace std;
int main(){
  int n;
  cin >> n;
  
  int i=n/111;
  if(n%111) {
    cout << n<< endl;
    return 0;
  else {
    ++i;
    cout << i*111 << endl;
    return 0;
  }
}
  

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

#include<bits/stdc++.h>
int main(){
	
	
	int n;
	cin >> n;
	for(int i = n;i <= 999;++i){
		if(i == 111 || i == 222 || i == 333 || i == 444 || i == 555 || i == 666 || i == 777 || i == 888 || i == 999){
			cout << i << '\n';
			return 0;
		}
	}
	return 0;	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin >> n;
      |         ^~~
      |         std::cin
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:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:25: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |                         cout << i << '\n';
      |                         ^~~~
      |                         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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

int main() {
  int N;
  cin >> N;
  if(N<=111){
    cout << 111 << endl;
  }else if(N<=222){
    cout << 222 << endl;
  }else if(N<=333){
    cout << 333 << endl;
  }else if(N<=444){
    cout << 444 << endl;
  }else if(N<=555){
    cout << 555 << endl;
  }else if(N<=666){
    cout << 666 << endl;
  }else if(N<=777){
    cout << 777 << endl;
  }else if(N<=888){
    cout << 888 << endl;
  }else if(N<=999){
    cout << 999 << endl;
  }
}
}


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

#include <bits/stdc++.h>
using namespace std;
 
int main() {

  int N;
  cin >> N;
  
  int num = 0
 
    for(int i = 0;i < 9){
      num = num + 111;
      
      if(N <= num){
        cout << num << endl;
      }
    }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: expected ',' or ';' before 'for'
   11 |     for(int i = 0;i < 9){
      |     ^~~
a.cc:11:19: error: 'i' was not declared in this scope
   11 |     for(int i = 0;i < 9){
      |                   ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;++i)
using namespace std;
typedef long long ll;
const int INF=1001001001;
int main(){
  int n;
  cin>>n;
  for(int x=111;X<=999;x+=111){
    if(x>=n){
      cout<<x<<endl;
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'X' was not declared in this scope
    9 |   for(int x=111;X<=999;x+=111){
      |                 ^
Language: C++

#include <algorithm>
#include <cstdio>

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

using namespace std;

int main(){

	int n; scanf("%d",&n);
	for(int i=n;;i++){
		char s[8];
		sprintf(s,"%d",i);
		int len=strlen(s);
		if(count(s,s+len,s[0])==len){
			printf("%d\n",i);
			break;
		}
	}

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:25: error: 'strlen' was not declared in this scope
   14 |                 int len=strlen(s);
      |                         ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <cstdio>
  +++ |+#include <cstring>
    3 |
Language: C++

#include <cstdio>

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

using namespace std;

int main(){

	int n; scanf("%d",&n);
	for(i=n;;i++){
		char s[8];
		sprintf(s,"%d",i);
		int len=strlen(s);
		if(count(s,s+len,s[0])==len){
			printf("%d\n",i);
			break;
		}
	}

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: 'i' was not declared in this scope
   10 |         for(i=n;;i++){
      |             ^
a.cc:13:25: error: 'strlen' was not declared in this scope
   13 |                 int len=strlen(s);
      |                         ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <cstdio>
  +++ |+#include <cstring>
    2 | 
a.cc:14:20: error: 'count' was not declared in this scope
   14 |                 if(count(s,s+len,s[0])==len){
      |                    ^~~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
  int N, tmp, cont;
  cin >> N;
  
  for(int i=1; i<=9; i++) {
    cont = i*100 + i*10 + i;
    if(cont<N) {
      cout << tmp << endl;
      break;
    }
    tmp = cont
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:15: error: expected ';' before '}' token
   14 |     tmp = cont
      |               ^
      |               ;
   15 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
    int a;
    cin>>a;
    int b=a/100;
    if(111*b>=n){
        cout <<111*b<< endl;
    }
    else{
        cout <<111*(b+1)<<endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: 'n' was not declared in this scope
    7 |     if(111*b>=n){
      |               ^
Language: Java

import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;

public class Main {
    static int gcd(int a, int b) {
        if (a % b != 0) {
            return gcd(b, a % b);
        } else {
            return b;
        }

    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int count = 0;
        INT n = sc.nextInt();
        int i = n / 111;
        if (n % 111 != 0) {
            i += 1;
        }

        System.out.println(i * 111);
    }
}

Compiler output:
Main.java:18: error: cannot find symbol
        INT n = sc.nextInt();
        ^
  symbol:   class INT
  location: class Main
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
 
int main() {
    char n[3];
    rep(i,3){
    cin>>n[i];
    }
    if(n[0]==n[1]&&n[1]==n[2]){
     cout<<n[0]<<n[1]<<n[2]<<endl;
    else if(n[0]>n[1]||(n[0]==n[1]&&n[0]>n[2])){
      cout<<n[0]<<n[0]<<n[1]<<endl;
    }
      else{
        cout<<n[0]+1<<n[0]+1<<n[1]+1<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: expected '}' before 'else'
   13 |     else if(n[0]>n[1]||(n[0]==n[1]&&n[0]>n[2])){
      |     ^~~~
a.cc:11:31: note: to match this '{'
   11 |     if(n[0]==n[1]&&n[1]==n[2]){
      |                               ^
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main(){
  int N;
  cin >> N;
  int buf[9];
  for(int i=1;i<=9;i++){
    buf[i]=i*100+i*10+i;
  }
  for(int i=0;i<9;i++){
    if(N<buf[i]){
    	  cout << buf[i];
    }
}


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

#include <iostream>
#include <string>

using namespace std;

int main(){
  int N;
  cin >> N;
  int buf[9];
  for(int i=1;i<=9;i++){
    buf[i]=i*100+i*10+i;
  }
  for(int i=0;i<9;i++){
    if(N<buf[i]){
    	  cout << bunf[i];
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:19: error: 'bunf' was not declared in this scope; did you mean 'buf'?
   15 |           cout << bunf[i];
      |                   ^~~~
      |                   buf
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
using p = pair<int,int>;
int main(){
	string n;
  	cin >> n;
  	sort(n.begin(),n.end());
  	
  int num;
	for(auto i : n){
      	if(stoi(i) == 0) continue;
		stringstream s;
      	s << i << i << i;
      	num = stoi(s.str());
    	if(stoi(n) <= num)
          break;
    }
  	cout << num;
	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: no matching function for call to 'stoi(char&)'
   11 |         if(stoi(i) == 0) continue;
      |            ~~~~^~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/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 'char' 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 'char' 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: Java

import java.util.*;
public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int a = n/100;
      int c = n%10;
      int b = (n-100*a-c)/10;
      if(a==b&&b==c)System.out.println(n);
      else if(a<b)System.out.println( (a+1)*111 );
      else if(a>b)System.out.println(a*111);
      else if(a=b&&b>c)System.out.println(a*111);
      else if(a=b&&b<c)System.out.println( (a+1)*111 );
    }
}

Compiler output:
Main.java:12: error: bad operand types for binary operator '&&'
      else if(a=b&&b>c)System.out.println(a*111);
                 ^
  first type:  int
  second type: boolean
Main.java:12: error: incompatible types: int cannot be converted to boolean
      else if(a=b&&b>c)System.out.println(a*111);
               ^
Main.java:13: error: bad operand types for binary operator '&&'
      else if(a=b&&b<c)System.out.println( (a+1)*111 );
                 ^
  first type:  int
  second type: boolean
Main.java:13: error: incompatible types: int cannot be converted to boolean
      else if(a=b&&b<c)System.out.println( (a+1)*111 );
               ^
4 errors
Language: C++

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

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


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

#include <stdio.h>
int main (void)
{
  int a;
  
  scanf("%d",&a);
  
  if (0<=a && a<=111){
    s=111;
  }
  else if (111<a && a<=222){
    s=222;
  }
  else if (222<a && a<=333){
    s=333;
  }
  else if (333<a && a<=444){
    s=444;
  }
  else if (444<a && a<=555){
    s=555;
  }
  else if (555<a && a<=666){
    s=666;
  }
  else if (666<a && a<=777){
    s=777;
}
  else if (777<a && a<=888){
    s=888;
}
  else if (888<a && a<=999){
    s=999;
  }
  printf("%d",s);
  
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:5: error: 's' undeclared (first use in this function)
    9 |     s=111;
      |     ^
main.c:9:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
int main (void)
{
  int a;
  
  scanf("%d",&a);
  
  if (0<=a && a<=111)
    s=111;
  else if (111<a && a<=222)
    s=222;
  else if (222<a && a<=333)
    s=333;
  else if (333<a && a<=444)
    s=444;
  else if (444<a && a<=555)
    s=555;
  else if (555<a && a<=666)
    s=666;
  else if (666<a && a<=777)
    s=777;
  else if (777<a && a<=888)
    s=888;
  else if (888<a && a<=999)
    s=999;
  printf("%d",s);
  
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:5: error: 's' undeclared (first use in this function)
    9 |     s=111;
      |     ^
main.c:9:5: note: each undeclared identifier is reported only once for each function it appears in