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

#include <stdio.h>
int main (void)
{
  int a;
  
  scanf("%d",&a);
  
  if (000<=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 (000<=a && a<=111)
    s=111;
  if (111<a && a<=222)
    s=222;
  if (222<a && a<=333)
    s=333;
  if (333<a && a<=444)
    s=444;
  if (444<a && a<=555)
    s=555;
  if (555<a && a<=666)
    s=666;
  if (666<a && a<=777)
    s=777;
  if (777<a && a<=888)
    s=888;
  if (888<a && a<=999)
    s=999;
  printf("%d",s);

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
main.c:26:3: error: expected declaration or statement at end of input
   26 |   printf("%d",s);
      |   ^~~~~~
Language: C

n=int(input())
for i in range(n,1000):
    if str(i)[0] == str(i)[1] == str(i)[2]:
        print(i)
        exit()


Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | n=int(input())
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:1:3: error: expected expression before 'int'
    1 | n=int(input())
      |   ^~~
Language: C++

#include <iostream>
using namespace std;

int main() {
	ll n;
	cin>>n;//数値読み取り
	cout << ((n+111-1)/111)  *111;
	// your code goes here
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'll' was not declared in this scope
    5 |         ll n;
      |         ^~
a.cc:6:14: error: 'n' was not declared in this scope
    6 |         cin>>n;//数値読み取り
      |              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i=0;i<(int)(n);i++)
#define all(x)    (x).begin(),(x).end()
typedef long long ll;
const int MOD = (int)1e9 + 7;

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



Compiler output:
a.cc: In function 'int main()':
a.cc:11:31: error: lvalue required as left operand of assignment
   11 |   for(int i=n;i<1000;i++) if(i%111 = 0){
      |                              ~^~~~
Language: C++

#include <bits/stdc++.h>
#define debug(x) cerr << "\n" \
                      << #x << " = " << x << ".\n"
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define print(xx) cout << (xx) << endl
using namespace std;
#define int long long
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vint;
const int INF = ((1LL << 30) + (1LL << 29));
const ll MOD = 1000000007;

/* 

*/
//================== INPUT ========================
int N;
//=================================================
void input()
{
    cin>>N;

}
//=================================================
void solve()
{
    for (int i = n; i<= 999; ++i){
        if (i % 111 == 0) {
            cout<<i<<endl;
            return;
        }
    }

}

//=================================================
signed main()
{
    input();
    solve();
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:28:18: error: 'n' was not declared in this scope
   28 |     for (int i = n; i<= 999; ++i){
      |                  ^
Language: C++

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

int main() {
  int n;
  cin >> n;
  
  int hyaku = n/100;
  int juu = (n-ue*100)/10;
  int ichi = (n-ue*100-ma*10);
  
  int ans;
  
  if (hyaku >= juu){
    if (juu >= ichi){
      ans = hyaku*100+hyaku*10 + hyaku;
    }
    else{
      ans = (hyaku+1)*100 + (hyaku+1)*10 + hyaku+1;
    }
  }
  else{
    ans = (hyaku+1)*100 + (hyaku+1)*10 + hyaku+1;
  }
  
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: 'ue' was not declared in this scope
    9 |   int juu = (n-ue*100)/10;
      |                ^~
a.cc:10:24: error: 'ma' was not declared in this scope; did you mean 'fma'?
   10 |   int ichi = (n-ue*100-ma*10);
      |                        ^~
      |                        fma
Language: C++

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

int main() {
  int n;
  cin >> n;
  
  int hyaku = n/100;
  int juu = (n-ue*100)/10;
  int ichi = (n-ue*100-ma*10);
  
  int ans;
  
  if (hyaku >= juu){
    if (juu >= ichi){
      ans = hyaku*100+hyaku*10 + hyaku;
    }
    else{
      ans = (hyaku+1)*100 + (hyaku+1)*10 + hyaku+1;
    }
  }
  else{
    ans = (hyaku+1)*100 + (hyaku+1)*10 + hyaku+1;
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: 'ue' was not declared in this scope
    9 |   int juu = (n-ue*100)/10;
      |                ^~
a.cc:10:24: error: 'ma' was not declared in this scope; did you mean 'fma'?
   10 |   int ichi = (n-ue*100-ma*10);
      |                        ^~
      |                        fma
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int A,B,C;
  cin >> A;
  for(int i=0;i<9;i++){
    if(A<=111*i){
      cout << 111*i << endl;
      break;
    }
}


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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int A,B,C;
  cin >> A;
  for(int i=0;i<9;i++){
    if(A=<111*i){
      cout << 111*i << endl;
      break;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected primary-expression before '<' token
    7 |     if(A=<111*i){
      |          ^
a.cc:11:2: error: expected '}' at end of input
   11 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C

#include<stdio.h>

int main(void)
{
  int N;
  scanf("%d",&N);
  int i=N/111;
  
  if(N%111!=0){
    i=i+1;}
 }
printf("%d\n", i*111);
return 0;
}

Compiler output:
main.c:12:8: error: expected declaration specifiers or '...' before string constant
   12 | printf("%d\n", i*111);
      |        ^~~~~~
main.c:12:16: error: unknown type name 'i'
   12 | printf("%d\n", i*111);
      |                ^
main.c:13:1: error: expected identifier or '(' before 'return'
   13 | return 0;
      | ^~~~~~
main.c:14:1: error: expected identifier or '(' before '}' token
   14 | }
      | ^
Language: C

#include<stdio.h>

int main(void)
{
  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:12:8: error: expected declaration specifiers or '...' before string constant
   12 | printf("%d\n", i*111);
      |        ^~~~~~
main.c:12:16: error: unknown type name 'i'
   12 | printf("%d\n", i*111);
      |                ^
main.c:13:1: error: expected identifier or '(' before 'return'
   13 | return 0;
      | ^~~~~~
main.c:14:1: error: expected identifier or '(' before '}' token
   14 | }
      | ^
Language: C

#include<stdio.h>

int main(void)
{
  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: In function 'main':
main.c:10:8: error: expected ';' before '}' token
   10 |     i++};
      |        ^
      |        ;
main.c: At top level:
main.c:12:8: error: expected declaration specifiers or '...' before string constant
   12 | printf("%d\n", i * 111);
      |        ^~~~~~
main.c:12:16: error: unknown type name 'i'
   12 | printf("%d\n", i * 111);
      |                ^
main.c:13:1: error: expected identifier or '(' before 'return'
   13 | return 0;
      | ^~~~~~
main.c:14:1: error: expected identifier or '(' before '}' token
   14 | }
      | ^
Language: C++

#pragma GCC optimize "-O3"
#pragma GCC target ("avx")
#define _USE_MATH_DEFINES
#include<bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0;i<n;++i)
#define vi vector<int>
#define vvi vector<vi>
#define pb push_back
#define pi pair<int,int>
#define vp vector<pair<int,int>>
#define mp make_pair
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
#define inf (1ll<<60)
#define SORT(v) sort(all(v))
#define RSORT(v) sort(all(v),greater<int>())
signed gcd(int a, int b){return b?gcd(b,a%b):a;}
signed lcm(int a,int b){return a*b/gcd(a,b);}
//priority_queue<int, vector<int>, greater<int> > que; //昇順

using namespace std;

const int mod=1e9+7;

void run();

void init() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout<<fixed<<setprecision(12);
}

signed main(){
    init();
    run();
    return 0;
}

void run(){
    int n;
    cin >> n;
    int n%111;
    while(n!=0||n!=111)
    {
        ++n;
    }
    cout << n << endl;
}

Compiler output:
a.cc: In function 'void run()':
a.cc:44:10: error: expected initializer before '%' token
   44 |     int n%111;
      |          ^
Language: C++

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

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


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

#include <bits/stdc++.h>
 
using namespace std;
 
#define ll long long int
 
#define REP(i, n) for(int i = 0; i < (n); i++)
#define SREP(i, s) for(int i = 0; i < (s.size()); i++)
#define SORT(v, n) sort(v, v+n);
#define GSORT(v, n) sort(v, v+n, greater<int>());
#define VSORT(v) sort(v.begin(),v.end());
#define VGSORT(v) sort(v.begin(),v.end(),greater<int>());
#define REV(a) reverse(begin(a),end(a));
 
ll gcd(ll x, ll y){
	if(x<y) swap(x,y);
	if(y==0) return x;
	return gcd(y,x%y);
}
 
ll lcm(ll x, ll y){
	return (x*y/gcd(x,y));
}

int main(){
	ios::sync_with_stdio(false);cin.tie(0);
////////////////////////////////////////////
	int n;
	cin >> n;
	ans=(n-1)/111;
  	cout << (ans+1)*111 << endl;
/////////////////////////////////////////////
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   30 |         ans=(n-1)/111;
      |         ^~~
      |         abs
Language: Java

import static java.lang.Integer.*;
//import static java.lang.Long.*;
//import static java.lang.Math.*;

public class Main {
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(System.in);
		int n = parseInt(sc.next());
		sc.close();
		for(i=1;i<=9;i++) {
			if(n<=i*111) {
				break;
			}
		}
		System.out.println(i*111);
	}
}


Compiler output:
Main.java:8: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:8: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:5:33: error: expected expression before '%' token
    5 |   for(i=n;;i++)if(i/100==(i/10)/%10&&i/100==i%10){
      |                                 ^
Language: C

#include <stdio.h>
int main(){
  int i,n;
  for(i=n;;i++)if(i/100==(i/10)/%10&&i/100==i%10){
    printf("%d",i);
    return 0;
  }
}

Compiler output:
main.c: In function 'main':
main.c:4:33: error: expected expression before '%' token
    4 |   for(i=n;;i++)if(i/100==(i/10)/%10&&i/100==i%10){
      |                                 ^
Language: C

#include <stdio.h>
int main(){
  int n;
  for(i=n;;i++)if(i/100==(i/10)/%10&&i/100==i%10){
    printf("%d",i);
    return 0;
  }
}

Compiler output:
main.c: In function 'main':
main.c:4:7: error: 'i' undeclared (first use in this function)
    4 |   for(i=n;;i++)if(i/100==(i/10)/%10&&i/100==i%10){
      |       ^
main.c:4:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:4:33: error: expected expression before '%' token
    4 |   for(i=n;;i++)if(i/100==(i/10)/%10&&i/100==i%10){
      |                                 ^
Language: C++

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


Compiler output:
a.cc:7:3: error: expected unqualified-id before 'return'
    7 |   return 0;
      |   ^~~~~~
a.cc:8:1: error: expected declaration before '}' token
    8 | }
      | ^
Language: C++

#include <iostream>
#include <iomanip>
#include <cctype>
#include <cstdlib>
#include <string>
#include <algorithm>
#include <vector>
#include <map>
#include <cmath>
#define rep(i, n) for(int i = 0; i < n; ++i)
using namespace std;

int comp(const void* a, const void* b){
	return *(int*)a - *(int*)b;
}

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

Compiler output:
a.cc: In function 'int main()':
a.cc:23:29: error: expected ';' before 'cout'
   23 |                 n+=111-n%111
      |                             ^
      |                             ;
   24 |                 cout << n << endl;
      |                 ~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
//define
#define int long long
#define str string
#define rep(x,y) for(int i=x;i<y;i++)
#define REP(x,y) for(int j=x;j<y;j++)
#define all(x) x.begin(),x.end()
//vectordefine
#define vint vector<int>
#define vc vector<char>
#define vstr vector<string>
#define pb(n) push_back(n)
//queuedefine
#define qint queue<int>
#define qc queue<char>
#define qstr queue<str>
//mapdefine
#define mint map<int>
#define mc map<char>
//pairdefine
#define pint pair<int,int>
#define pis pair<int,str>
#define pic pair<int,char>
#define pci pair<char,int>
#define mod 100000007
//main
signed main(){
  int N,M,O,P,count=0,count2=0,count3=0,stack=0;
  str S,T;
  cin>>N;
  if(N<112)cout<<111<<endl;
  elif(N<223)cout<<222<<endl;
  elif(N<334)cout<<333<<endl;
  elif(N<445)cout<<444<<endl;
  elif(N<556)cout<<555<<endl;
  elif(N<667)cout<<666<<endl;
  elif(N<778)cout<<777<<endl;
  elif(N<889)cout<<888<<endl;
  else cout<<999<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:3: error: 'elif' was not declared in this scope
   33 |   elif(N<223)cout<<222<<endl;
      |   ^~~~
a.cc:40:3: error: 'else' without a previous 'if'
   40 |   else cout<<999<<endl;
      |   ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
//define
#define int long long
#define str string
#define rep(x,y) for(int i=x;i<y;i++)
#define REP(x,y) for(int j=x;j<y;j++)
#define all(x) x.begin(),x.end()
//vectordefine
#define vint vector<int>
#define vc vector<char>
#define vstr vector<string>
#define pb(n) push_back(n)
//queuedefine
#define qint queue<int>
#define qc queue<char>
#define qstr queue<str>
//mapdefine
#define mint map<int>
#define mc map<char>
//pairdefine
#define pint pair<int,int>
#define pis pair<int,str>
#define pic pair<int,char>
#define pci pair<char,int>
#define mod 100000007
//main
signed main(){
  int N,M,O,P,count=0,count2=0,count3=0,stack=0;
  str S,T;
  cin>>N;
  if(N<112)cout<<111<<endl;
  elif(N<<223)cout<<222<<endl;
  elif(N<334)cout<<333<<endl;
  elif(N<445)cout<<444<<endl;
  elif(N<556)cout<<555<<endl;
  elif(N<667)cout<<666<<endl;
  elif(N<778)cout<<777<<endl;
  elif(N<889)cout<<888<<endl;
  else cout<<999<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:9: warning: left shift count >= width of type [-Wshift-count-overflow]
   33 |   elif(N<<223)cout<<222<<endl;
      |        ~^~~~~
a.cc:33:3: error: 'elif' was not declared in this scope
   33 |   elif(N<<223)cout<<222<<endl;
      |   ^~~~
a.cc:40:3: error: 'else' without a previous 'if'
   40 |   else cout<<999<<endl;
      |   ^~~~
Language: C++

#include <iostream>
using namespace std ;
int main()
{
	int n,i;
	cin >> n;
	i = n/111;
	if (N % 111 != 0){
		i++;
	}
	cout << 111*i << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: 'N' was not declared in this scope
    8 |         if (N % 111 != 0){
      |             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;cin>>n;
  for(int i=0;i<9;i++){
    a=i*100+i*10+i;
    if(a<=n && n<a+111)break;
  }
  cout<<a+111<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'a' was not declared in this scope
    6 |     a=i*100+i*10+i;
      |     ^
a.cc:9:9: error: 'a' was not declared in this scope
    9 |   cout<<a+111<<endl;
      |         ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;cin>>n;
  for(int i=0;i<9;i++){
    a=i*100+i*10+i;
    if(a<=n && n<a+111)break;
  }
  cout<<a<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'a' was not declared in this scope
    6 |     a=i*100+i*10+i;
      |     ^
a.cc:9:9: error: 'a' was not declared in this scope
    9 |   cout<<a<<endl;
      |         ^
Language: C++

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

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

  int ans=0;
  for(int i =1; i<10; i++){
   if(N<=111*i){
     ans= 111*i;
     break;
   }
  }

  else cout << ans << endl;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:16:3: error: 'else' without a previous 'if'
   16 |   else cout << ans << endl;
      |   ^~~~
Language: C++

//#include <bits/stdc++.h>
#include <stack>
#include <iostream>
#include <vector>
using namespace std;
int main() {
	//入力
	double x[10];
	string u[10];
	int N, ans = 0, t = 0;
	cin >> N;
	//処理
	for (int i = 1; i < 10; i++) {
		if (i * 100 + i * 10 + i - N <= 0 && (i + 1) * 100 + (i + 1) * 10 + i + 1 - N >= 0) {
			t = i * 100 + i * 10 + i;
		}
	}
	if (i * 100 + i * 10 + i - N >= (i - 1) * 100 - (i + 1) * 10 - i - 1 + N) {
		ans = (i + 1) * 100 + (i + 1) * 10 + i + 1;
	}
	if (ans > 999) ans = 999;
	//出力
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:13: error: 'i' was not declared in this scope
   18 |         if (i * 100 + i * 10 + i - N >= (i - 1) * 100 - (i + 1) * 10 - i - 1 + N) {
      |             ^
Language: C++

//#include <bits/stdc++.h>
#include <stack>
#include <iostream>
#include <vector>
using namespace std;
int main() {
	//入力
	double x[10];
	string u[10];
	int N,ans=0,t=0;
	cin >> N;
	//処理
	t = N / 100;
	if ((t + 1) * 100 + (t + 2) * 10 + t + 2 - N <= 55) {
		ans = (t + 1) * 100 + (t + 2) * 10 + t + 2;
	} else ans = t * 100 + t * 10 + t;
	if (N > 944) ans = 999;
	//出力
	cout << ans << endl;

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

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

using namespace std;


#define mod(cans) cans%10**9+7
#define cin_pl(x,y) for(int i=0;i<x;i++){cin>>y[i];}
#define pl_twin(x,y,z) for(int i=0;i<x;i++){cin>>y[i]>>z[i];}
#define debug(x) cout << "Debug" << x << "\n"
#define rep(i,n) for(int i=0;i<n;i++)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
//#define st(s) size_t size = s.length()
#define prians(Answer) cout<<Answer<<"\n"
#define make_pair mp;
#define com_div(x,Co) for(int i=1;i<x+1;i++){if(x%i==0){Co++;}}
#define TF(X) X==1?cout<<"Yes\n":cout<<"No\n"
#define elcon else{continue;}

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vector<int>> matrix;
typedef pair<int,int> pr;
typedef greater<int> gi;

int main()
{   
 string s;
  cin>>s;
  size_t size = s.length();
  rep(i,size)
  {
    if(s[i]=="1")
   s[i]='9';
    else if(s[i]=="9")
      s[i]='1';
    else
      continue;
  }
  cout<<s;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:39:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   39 |     if(s[i]=="1")
a.cc:41:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   41 |     else if(s[i]=="9")
Language: C++

#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <numeric>

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



int main() {
    int s; cin >> s;
        if (s%111 != 0){
            cout << 111*(s/111 + 1); << endl;
        }else{
            cout << s << endl;
        }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:38: error: expected primary-expression before '<<' token
   17 |             cout << 111*(s/111 + 1); << endl;
      |                                      ^~
Language: C++

#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <numeric>

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



int main() {
    int s; cin >> s;
    while (true)
    {
        if (s%111 != 0){
            cout << 111*(s/111 + 1); << endl;
        }else{
            cout << s << endl;
        }
    }
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:38: error: expected primary-expression before '<<' token
   19 |             cout << 111*(s/111 + 1); << endl;
      |                                      ^~
Language: C++

#include<stdio.h>
int main(void)
{
	int N;

	scanf("%d", &N);

	int A, B, C;

	A = N / 100;
	C = N % 10;
	B = N - A - C;


	if (A >= B && A >= C)
		printf("%d%d%d", A, A, A);
	
		printf("111");
	else
		printf("%d%d%d", A + 1, A + 1, A + 1);




	return 0;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: 'n' was not declared in this scope
    5 |     cin >> n;
      |            ^
a.cc:9:14: error: expected ';' before '}' token
    9 |         break
      |              ^
      |              ;
   10 |       }
      |       ~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: expected ';' before '}' token
    9 |       d += 111
      |               ^
      |               ;
   10 |     }
      |     ~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: 'num' was not declared in this scope; did you mean 'enum'?
    8 |     while(num < n)
      |           ^~~
      |           enum
a.cc:9:14: error: expected ';' before '}' token
    9 |     {d += 111}
      |              ^
      |              ;
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: lvalue required as left operand of assignment
    8 |       if(i % 111 = 0){
      |          ~~^~~~~
a.cc:10:14: error: expected ';' before '}' token
   10 |         break
      |              ^
      |              ;
   11 |       }
      |       ~
Language: C++

// 数え上げる
int main(){
	int N; cin >> N;

	for (int i=N; i<1000; ++i){
		if (i % 111 == 0){
			cout << i << endl;
			break;
		}
	}
}



Compiler output:
a.cc: In function 'int main()':
a.cc:3:16: error: 'cin' was not declared in this scope
    3 |         int N; cin >> N;
      |                ^~~
a.cc:7:25: error: 'cout' was not declared in this scope
    7 |                         cout << i << endl;
      |                         ^~~~
a.cc:7:38: error: 'endl' was not declared in this scope
    7 |                         cout << i << endl;
      |                                      ^~~~
Language: C

#include <stdio.h>
int main(void){
    int a,b;
    scanf("%d\n"&a);
    b=a/100;
    if(b*111>=a){
        b=b+111;
    }
    printf
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:17: error: invalid operands to binary & (have 'char *' and 'int')
    4 |     scanf("%d\n"&a);
      |           ~~~~~~^
      |           |
      |           char *
main.c:9:11: error: expected ';' before 'return'
    9 |     printf
      |           ^
      |           ;
   10 |     return 0;
      |     ~~~~~~
Language: C

include <stdio.h>
int main(void){
    int a,b;
    scanf("%d\n"&a);
    b=a/100;
    if(b*111>=a){
        b=b+111;
    }
    printf
    return 0;
}


Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
Language: C

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

int main() {
    char hun = getchat(), ten = getchar(), one = getchar();
    if (hun < ten) hun++;
    else if (hun == ten) {
        if (hun < one) hun++;
    }
    for (int i=0; i<3; i++) putchar(hun);
    putchar('\n');
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:16: error: implicit declaration of function 'getchat'; did you mean 'getchar'? [-Wimplicit-function-declaration]
    7 |     char hun = getchat(), ten = getchar(), one = getchar();
      |                ^~~~~~~
      |                getchar
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: expected primary-expression before '>' token
    8 |     if(111*i=>N){
      |              ^
Language: C++

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

using namespace std;

bool check_zorome(int a){
  int ketasu = log10(a);
  int k = a/pow(10,ketasu);
  bool f = false;
  for(int i = ketasu; i >= 0; i--){
    int t = a/pow(10,ketasu);
    if(t != k) f = true;
    a = a % pow(10,ketasu);
  }
  if(f) return false;
  else return true;
}

int main(){
  int N;
  cin >> N;
  int ans;
  for(int i = N; i < 1000; i++){
    if(check_zorome(i)){
      ans = i;
      break;
    }
  }
cout << ans;
}


Compiler output:
a.cc: In function 'bool check_zorome(int)':
a.cc:14:11: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   14 |     a = a % pow(10,ketasu);
      |         ~ ^ ~~~~~~~~~~~~~~
      |         |      |
      |         int    __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

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

using namespace std;

bool check_zorome(int a){
  int ketasu = log10(a);
  int k = a/pow(10,ketasu);
  bool f = false;
  for(int i = ketasu; i >= 0; i--){
    int t = a/pow(10,ketasu);
    if(t != k) f = true;
    a %= pow(10,ketasu);
  }
  if(f) return false;
  else return true;
}

int main(){
  int N;
  cin >> N;
  int ans;
  for(int i = N; i < 1000; i++){
    if(check_zorome(i)){
      ans = i;
      break;
    }
  }
cout << ans;
}


Compiler output:
a.cc: In function 'bool check_zorome(int)':
a.cc:14:7: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   14 |     a %= pow(10,ketasu);
      |     ~~^~~~~~~~~~~~~~~~~
a.cc:14:7: note:   in evaluation of 'operator%=(int, __gnu_cxx::__promote<double>::__type {aka double})'
Language: C++

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

bool check_zorome(int a){
  int ketasu = log10(a);
  int k = a/pow(10,ketasu);
  bool f = false;
  for(int i = ketasu; i >= 0; i--){
    int t = a/pow(10,ketasu);
    if(t != k) f = true;
    a %= pow(10,ketasu);
  }
  if(f) return false;
  else return true;
}

int main(){
  int N;
  cin >> N;
  int ans;
  for(int i = N; i < 1000; i++){
    if(check_zorome(i)){
      ans = i;
      break;
    }
  }
cout << ans;
}

Compiler output:
a.cc: In function 'bool check_zorome(int)':
a.cc:12:7: error: invalid operands of types 'int' and 'double' to binary 'operator%'
   12 |     a %= pow(10,ketasu);
      |     ~~^~~~~~~~~~~~~~~~~
a.cc:12:7: note:   in evaluation of 'operator%=(int, double)'
a.cc: In function 'int main()':
a.cc:20:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   20 |   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:28:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   28 | cout << ans;
      | ^~~~
      | 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,x;
  cin >> n;
  x =-1;
  if(n%111 == 0){
    cout << n << endl;
  }
  else {
    for(int i =0 ; i <19 ; i++){
      if(111*i < n){
        x++;
      }
    }
    cout << 111*x << endl;
  }
}


Compiler output:
a.cc:1:10: error: #include expects "FILENAME" or <FILENAME>
    1 | #include bits/stdc++.h>
      |          ^~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> n;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #include bits/stdc++.h>
a.cc:9:5: error: 'cout' was not declared in this scope
    9 |     cout << n << endl;
      |     ^~~~
a.cc:9:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:18: error: 'endl' was not declared in this scope
    9 |     cout << n << endl;
      |                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #include bits/stdc++.h>
a.cc:17:5: error: 'cout' was not declared in this scope
   17 |     cout << 111*x << endl;
      |     ^~~~
a.cc:17:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:22: error: 'endl' was not declared in this scope
   17 |     cout << 111*x << endl;
      |                      ^~~~
a.cc:17:22: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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

int main(){
    int n; cin >> n;
    int a, b, c;
    a = n % 10;
    b = (n - a) / 10 % 10;
    c = (n - b) / 10 % 10;
    for(int i=0;i<3;i++){
        cout << max(a, maax(b, c));
    }
    cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:24: error: 'maax' was not declared in this scope
   11 |         cout << max(a, maax(b, c));
      |                        ^~~~
Language: C++

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

int main(){
    cin >> N;
    cout << (N+111-1)/111 <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: 'N' was not declared in this scope
    5 |     cin >> N;
      |            ^
Language: C++

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

int main() {
  int N;
  cin>>N;
  cout<<((N-1)/111+1)*111<<endl;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespce'
    2 | using namespce std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin>>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:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   cout<<((N-1)/111+1)*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:7:28: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   cout<<((N-1)/111+1)*111<<endl;
      |                            ^~~~
      |                            std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/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;
int main() {
	int A,;
	cin >> A;
    for(i=0 ; i<111*A/100+1;i++){
    int B = 111*i;
    }
		cout << B << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:15: error: expected unqualified-id before ';' token
    4 |         int A,;
      |               ^
a.cc:6:9: error: 'i' was not declared in this scope
    6 |     for(i=0 ; i<111*A/100+1;i++){
      |         ^
a.cc:9:25: error: 'B' was not declared in this scope
    9 |                 cout << B << endl;
      |                         ^
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; ++i)
#define repR(i, n) for(int i = n; i >= 0; ++i)
#define FDS(i, n) for(ll i = 0; i < n; ++i)
#define FDSR(i, n) for(int i = n; i >= 0; ++i)
#define FOR(i, m, n) for(int i = m; i < n; ++i)
#define FORR(i, m, n) for(int i = m;i >= n;--i)
#define VSORT(v) sort(v.begin(), v.end());
#define INF 999999999
#define itn int
#define ednl endl
using namespace std
typedef long long ll;

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

Compiler output:
a.cc:12:20: error: expected ';' before 'typedef'
   12 | using namespace std
      |                    ^
      |                    ;
   13 | typedef long long ll;
      | ~~~~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; ++i)
#define repR(i, n) for(int i = n; i >= 0; ++i)
#define FDS(i, n) for(ll i = 0; i < n; ++i)
#define FDSR(i, n) for(int i = n; i >= 0; ++i)
#define FOR(i, m, n) for(int i = m; i < n; ++i)
#define FORR(i, m, n) for(int i = m;i >= n;--i)
#define VSORT(v) sort(v.begin(), v.end());
#define INF 999999999
#define itn int
#define ednl endl
using namespace std
typedef long long ll;
template<typename TypeInt>
TypeInt G_C_D(TypeInt a, TypeInt b)
{
    if (a < 0) a = -a;
    if (b < 0) b = -b;
    while (b != 0) {
        a %= b;
        if (a == 0) return b;
        b %= a;
    }
    return a;
}

template<typename TypeInt>
TypeInt G_C_D(const std::vector<TypeInt> &list)
{
    if (list.size() < 2)
        throw "内容が1以下\n";
 
    TypeInt a = list[0];
    for (size_t i = 1; i < list.size(); ++i) {
        a = G_C_D(a, list[i]);
    }
    return a;
}
template<typename TypeInt>
TypeInt L_C_M(TypeInt a, TypeInt b) {
    if( a == 0 && b == 0)return 0;
    return a / G_C_D(a, b) * b;
}
template<typename TypeInt>
TypeInt L_C_M(const std::vector<TypeInt> &list)
{
    if (list.size() < 2)
        throw "内容が1以下\n";
 
    TypeInt a = list[0];
    for (size_t i = 1; i < list.size(); ++i) {
        a = L_C_M(a, list[i]);
    }
    return a;
}

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

Compiler output:
a.cc:12:20: error: expected ';' before 'typedef'
   12 | using namespace std
      |                    ^
      |                    ;
   13 | typedef long long ll;
      | ~~~~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; ++i)
#define repR(i, n) for(int i = n; i >= 0; ++i)
#define FDS(i, n) for(ll i = 0; i < n; ++i)
#define FDSR(i, n) for(int i = n; i >= 0; ++i)
#define FOR(i, m, n) for(int i = m; i < n; ++i)
#define FORR(i, m, n) for(int i = m;i >= n;--i)
#define VSORT(v) sort(v.begin(), v.end());
#define INF 999999999
#define itn int
#define ednl endl
using namespace std
typedef long long ll;
template<typename TypeInt>
TypeInt G_C_D(TypeInt a, TypeInt b)
{
    if (a < 0) a = -a;
    if (b < 0) b = -b;
    while (b != 0) {
        a %= b;
        if (a == 0) return b;
        b %= a;
    }
    return a;
}

template<typename TypeInt>
TypeInt G_C_D(const std::vector<TypeInt> &list)
{
    if (list.size() < 2)
        throw "内容が1以下\n";
 
    TypeInt a = list[0];
    for (size_t i = 1; i < list.size(); ++i) {
        a = G_C_D(a, list[i]);
    }
    return a;
}
template<typename TypeInt>
TypeInt L_C_M(TypeInt a, TypeInt b) {
    if( a == 0 && b == 0)return 0;
    return a / G_C_D(a, b) * b;
}
template<typename TypeInt>
TypeInt L_C_M(const std::vector<TypeInt> &list)
{
    if (list.size() < 2)
        throw "内容が1以下\n";
 
    TypeInt a = list[0];
    for (size_t i = 1; i < list.size(); ++i) {
        a = L_C_M(a, list[i]);
    }
    return a;
}

int main(){
	int n;
	cin>>n;
	cout<<(n-1)/111+1<<endl;
}

Compiler output:
a.cc:12:20: error: expected ';' before 'typedef'
   12 | using namespace std
      |                    ^
      |                    ;
   13 | typedef long long ll;
      | ~~~~~~~
Language: C

#include <stdio.h>

int
main(int argc, char *argv[])
{
  int N;
  scanf("%d", &N);
  
  for(int i = 0; i < 10; i++){
    a = 111 * (i - 1);
    b = 111 * i;
    if(a < N && N <= b){
      printf("%d\n", b);
      break;
    }
  }
  
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:5: error: 'a' undeclared (first use in this function)
   10 |     a = 111 * (i - 1);
      |     ^
main.c:10:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:5: error: 'b' undeclared (first use in this function)
   11 |     b = 111 * i;
      |     ^
Language: C

#include <stdio.h>

int
main(int argc, char *argv[])
{
  int N;
  scanf("%d", N);
  
  for(int i = 0; i < 10; i++){
    a = 111 * (i - 1);
    b = 111 * i;
    if(a < N && N <= b){
      printf("%d\n", b);
      break;
    }
  }
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:5: error: 'a' undeclared (first use in this function)
   10 |     a = 111 * (i - 1);
      |     ^
main.c:10:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:5: error: 'b' undeclared (first use in this function)
   11 |     b = 111 * i;
      |     ^
Language: C++

#include <iostream>
#include<cmath>
using namespace std;
int main(){
  int n;
  cin>>n;
  for(int i=1;i<10;i++){
    ans = 100*i + 10*i + i;
    if(ans>=n){
      cout<<ans<<endl;
      break;
    }
  }
  
  return 0;
}

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 = 100*i + 10*i + i;
      |     ^~~
      |     abs
Language: C++

#include<iostream>
using namespace std;
 
int main(){
  int n,a,b,c,ans; cin>>n;
  a=n/100; c=n%10; b=(n-100*a-c)/10;
  if(a>=b){
    if(b>=c || c=a)
    ans=a*111;
    else
    ans=(a+1)*111;}
  else{
    ans=(a+1)*111;}
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: lvalue required as left operand of assignment
    8 |     if(b>=c || c=a)
      |        ~~~~~^~~~
Language: C++

#include<iostream>
using namespace std;
 
int main(){
  int n,a,b,c,ans; cin>>n;
  a=n/100; c=n%10; b=(n-100*a-c)/10;
  if(a>=b){
    if(b>=c){
    ans=a*111};
    else{
    ans=(a+1)*111;}}
  else{
    ans=(a+1)*111;}
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: expected ';' before '}' token
    9 |     ans=a*111};
      |              ^
      |              ;
a.cc:10:5: error: expected '}' before 'else'
   10 |     else{
      |     ^~~~
a.cc:7:11: note: to match this '{'
    7 |   if(a>=b){
      |           ^
a.cc: At global scope:
a.cc:12:3: error: expected unqualified-id before 'else'
   12 |   else{
      |   ^~~~
a.cc:14:3: error: 'cout' does not name a type
   14 |   cout<<ans<<endl;
      |   ^~~~
a.cc:15:1: error: expected declaration before '}' token
   15 | }
      | ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  int n,a,b,c,ans; cin>>n;
  n/100=a; n%10=c; (n-100*a-c)/10=b;
  if(a>=b){
    if(b>=c)
    ans=a*111;
    else
    ans=(a+1)*111;}
  else{
    ans=(a+1)*111;}
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:4: error: lvalue required as left operand of assignment
    6 |   n/100=a; n%10=c; (n-100*a-c)/10=b;
      |   ~^~~~
a.cc:6:13: error: lvalue required as left operand of assignment
    6 |   n/100=a; n%10=c; (n-100*a-c)/10=b;
      |            ~^~~
a.cc:6:31: error: lvalue required as left operand of assignment
    6 |   n/100=a; n%10=c; (n-100*a-c)/10=b;
      |                    ~~~~~~~~~~~^~~
Language: C++

#include <iostream>
#include <sstream>
#include <stdio.h>
#include <algorithm>
#include <string>
#include <bitset>
#include <vector>
using namespace std;
int f(int n,int number) {
	if (number == 4)return(n + 3);
	if (number % 2==0)f(n + 1, number/2);
	else f(n + 1, number * 3 + 1);
}
int main()	
{
	int N,T;
	cin >> N;//>>T;

	for (int i = 111; i < 1000; i+=111) {
		if (i >= N){
			cout << i<<endl;
			break;
		}
	}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:10: error: expected '}' at end of input
   24 |         }
      |          ^
a.cc:15:1: note: to match this '{'
   15 | {
      | ^
a.cc: In function 'int f(int, int)':
a.cc:13:1: warning: control reaches end of non-void function [-Wreturn-type]
   13 | }
      | ^
Language: C

#include<stdio.h>
int main(){
  int n,ans;
  scanf("%d",&n);
  if(n < 112){
    ans = 111;
  }elseif(n < 223){
    ans = 111;
  }elseif(n < 334){
    ans = 111;
  }elseif(n < 445){
    ans = 111;
  }elseif(n < 556){
    ans = 111;
  }elseif(n < 667){
    ans = 111;
  }elseif(n < 778){
    ans = 111;
  }elseif(n < 889){
    ans = 111;
  }else{
    ans = 999;
  }
  printf("%d\n",ans);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:4: error: implicit declaration of function 'elseif' [-Wimplicit-function-declaration]
    7 |   }elseif(n < 223){
      |    ^~~~~~
main.c:7:19: error: expected ';' before '{' token
    7 |   }elseif(n < 223){
      |                   ^
      |                   ;
Language: C++

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

int main(){

    int a;
    cin >> a;

    cout << int(a/111 + 0.99999999) << endl;

    return 0;
}



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

#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
int cnt=0;
for(int i=1,i<10,i++){
if(i*111<=n) cnt++;
}
if(cnt==0)cout<<"99";
else cout<<cnt*111;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: expected ';' before '<' token
    7 | for(int i=1,i<10,i++){
      |              ^
      |              ;
a.cc:7:14: error: expected primary-expression before '<' token
a.cc:7:21: error: expected ';' before ')' token
    7 | for(int i=1,i<10,i++){
      |                     ^
      |                     ;
Language: C++

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

int main(void){
    int n, r;
    cin >> n;
    for(int i=1; i<=10; i++){
        if(n <= 111*i) r = 111*i;
    }
    if(i == 10) r = 1111;
    cout << r << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: 'i' was not declared in this scope
   10 |     if(i == 10) r = 1111;
      |        ^
Language: C++

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

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

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

#include<iostream>
using namespace std;
int main(){
  int n;
  cin>>n,x,ans;
  x=n/111;
  if(n%100==0)
    cout<<x*111<<endl;
  else
    cout<<(x+1)*111<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: 'x' was not declared in this scope
    5 |   cin>>n,x,ans;
      |          ^
a.cc:5:12: error: 'ans' was not declared in this scope; did you mean 'abs'?
    5 |   cin>>n,x,ans;
      |            ^~~
      |            abs
Language: C++

#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;
int main(void){
  　int N;
  　cin>>N;
  　for(int i=1;i<10;i++){
     　if(N<=i*111){
     　    cout<<i*111<<endl;
     　    break;
     　}
  　}
}


Compiler output:
a.cc:7:3: error: extended character 　 is not valid in an identifier
    7 |   　int N;
      |   ^
a.cc:8:3: error: extended character 　 is not valid in an identifier
    8 |   　cin>>N;
      |   ^
a.cc:9:3: error: extended character 　 is not valid in an identifier
    9 |   　for(int i=1;i<10;i++){
      |   ^
a.cc:10:6: error: extended character 　 is not valid in an identifier
   10 |      　if(N<=i*111){
      |      ^
a.cc:11:6: error: extended character 　 is not valid in an identifier
   11 |      　    cout<<i*111<<endl;
      |      ^
a.cc:12:6: error: extended character 　 is not valid in an identifier
   12 |      　    break;
      |      ^
a.cc:13:6: error: extended character 　 is not valid in an identifier
   13 |      　}
      |      ^
a.cc:14:3: error: extended character 　 is not valid in an identifier
   14 |   　}
      |   ^
a.cc: In function 'int main()':
a.cc:7:3: error: '\U00003000int' was not declared in this scope
    7 |   　int N;
      |   ^~~~~
a.cc:8:3: error: '\U00003000cin' was not declared in this scope
    8 |   　cin>>N;
      |   ^~~~~
a.cc:8:10: error: 'N' was not declared in this scope
    8 |   　cin>>N;
      |          ^
a.cc:9:9: error: expected primary-expression before 'int'
    9 |   　for(int i=1;i<10;i++){
      |         ^~~
a.cc:9:17: error: 'i' was not declared in this scope
    9 |   　for(int i=1;i<10;i++){
      |                 ^
Language: C++

#include <iostream>
using namespace std;

int main(){
  int N;
  cin>>N;
  for(int i=1;i<10;i++){
    if(N<111*i){
      cout<<(i*111)<<"\n";
      break;
  }
  return 0;
}

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

#include <bits/stdc++.h>
#define inf 1000000000
#define maxs(x,y) (x = max(x , y))
#define mins(x,y) (x = min(x , y))
using namespace std;
typedef long long int ll;

int main(){

    int N;
    cin >> N;

    if(N%111 == 0){
        ans = N;
    }else if(N%111 >= N/100){
        ans = N/100;
        ans++;
        ans *= 111;
    }else if(N%111 <= N/100){
        ans = N/100;
        ans *= 111;
    }
    

    cout << ans << endl;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |         ans = N;
      |         ^~~
      |         abs
a.cc:16:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   16 |         ans = N/100;
      |         ^~~
      |         abs
a.cc:20:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   20 |         ans = N/100;
      |         ^~~
      |         abs
a.cc:25:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   25 |     cout << ans << endl;
      |             ^~~
      |             abs
Language: C++

#include<iostream>
using namespace std;

int main(){
  int N;
  cin>>N;
  cout<<111*ceil(N/111)<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: 'ceil' was not declared in this scope
    7 |   cout<<111*ceil(N/111)<<endl;
      |             ^~~~