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

#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <unordered_map>
#include <vector>
#include <string.h>
#include <set>

using namespace std;

#define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl

template<class T> void printvec(const vector<T>& v) {
  for (auto x : v) { cout << x << " "; }
  cout << endl;
}
template<class T> void printtree(const vector< vector<T> >& tree) {
  for (long long i = 0; i < tree.size(); ++i) {
    cout << i + 1 << ": "; printvec(tree[i]);
  }
}
template<class T, class U> void printmap(const map<T, U>& mp) {
  for (auto x : mp) { cout << x.first << "=>" << x.second << endl; }
}

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

#define rep(i, n) for(ll i = 0; i < n; ++i)
#define all(s) s.begin(), s.end()
#define fr first
#define sc second
#define mp make_pair
#define pb push_back

typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
typedef tuple<ll, ll, ll> triple;
typedef double D;

const ll INF = 1e9;
const ll MOD = 1000000007;  // 1e9 + 7

int main(int argc, char** argv) {
  cin.tie(NULL);
  cout.tie(NULL);
  ios_base::sync_with_stdio(false);
  //cout << setprecision(10) << fixed;

  ll k;
  cin >> k;
  queue<ll> q;
  for (int i = 1; i <= 9; ++i) {
    q.push(i);
  }

  rep(i, k) {
    ll x = q.front(); q.pop()p
    if (i == k-1) {
      cout << x << endl;
      return 0;
    }

    ll y = x * 10 + (x % 10);
    if (x % 10 != 0) { // e.g. 10 -> 100, 101
      q.push(y-1);
    }
    q.push(y);
    if (x % 10 != 9) { // e.g. 9 -> 98, 99
      q.push(y+1)
    }
  }
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:65:30: error: expected ';' before 'p'
   65 |     ll x = q.front(); q.pop()p
      |                              ^
      |                              ;
a.cc:77:18: error: expected ';' before '}' token
   77 |       q.push(y+1)
      |                  ^
      |                  ;
   78 |     }
      |     ~
Language: C++

#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<=(b);++i)
#define mem(a,x) memset(a,x,sizeof(a))
#define pb push_back
#define pi pair<int, int>
#define mk make_pair
using namespace std;
typedef long long ll;
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}
int a[200],len;
   priority_queue<ll,vector<ll>,greater<ll>> pq;
int main()
{int k;
   cin>>k;
   if(k<=12){
      cout<<k;
      return;
   }

   for(int i=1;i<=9;i++)
   pq.push(i);

   int cnt=0;
   ll ans;
   while(true){
      ll num=pq.top();
      pq.pop();
      cnt++;

      if(cnt==k){
         ans=num;
         break;
      }

      int ld=num%10;
      ll num1=num*10+ld;
      pq.push(num1);

      if(ld!=0){
         num1=num*10+ld-1;
         pq.push(num1);
      }
      if(ld!=9){
         num1=num*10+ld+1;
         pq.push(num1);
      }
   }
   cout<<ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:7: error: return-statement with no value, in function returning 'int' [-fpermissive]
   17 |       return;
      |       ^~~~~~
Language: C++

#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<=(b);++i)
#define mem(a,x) memset(a,x,sizeof(a))
#define pb push_back
#define pi pair<int, int>
#define mk make_pair
using namespace std;
typedef long long ll;
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}
int a[200],len;
int main()
{int k;
   cin>>k;
   if(k<=12){
      cout<<k;
      return;
   }
   priority_queue<ll,vector<ll>,greater<ll>> pq;
   for(int i=1;i<=9;i++)
   pq.push(i);

   int cnt=0;
   ll ans;
   while(true){
      ll num=pq.top();
      pq.pop();
      cnt++;

      if(cnt==k){
         ans=num;
         break;
      }

      int ld=num%10;
      ll num1=num*10+ld;
      pq.push(num1);

      if(ld!=0){
         num1=num*10+ld-1;
         pq.push(num1);
      }
      if(ld!=9){
         num1=num*10+ld+1;
         pq.push(num1);
      }
   }
   cout<<ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:7: error: return-statement with no value, in function returning 'int' [-fpermissive]
   16 |       return;
      |       ^~~~~~
Language: C++

#include <bits/stdc++.h>
#include <boost/range/adaptor/reversed.hpp>
#include <boost/range/algorithm/sort.hpp>
#include <boost/range/irange.hpp>

using namespace std;
using boost::irange;
using boost::sort;
using boost::adaptors::reversed;

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

    queue<long> q;
    for (int i : irange(1, 10)) q.push(i);
    long x;
    while (k--) {
        x = q.front();
        q.pop;
        if (x % 10 != 0) q.push(10 * x - 1);
        q.push(10 * x);
        if (x % 10 != 9) q.push(10 * x + 1);
    }
    cout << x << endl;
}


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

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

vector<long long> v;
void dfs(ll x, ll num, ll st, ll cc){
	if(v.size() > 100050) return;
	if(num == 0) num += x;
	else {
		num *= 10;
		num += x;
	}
	if(cc > st) return;
	if(cc == st){
		v.push_back(num);
		return;
	}
	if(x-1 >= 0) dfs(x-1,num,st,cc+1);
	if(x+1 <= 9) dfs(x+1,num,st,cc+1);
	dfs(x,num,st,cc+1);
	return;
}

int main(){
	
	ll k; cin>>k;
	for(int i = 1; i <= 10; i++){
		for(int j = 1; j <= 9; j++){
			dfs(j,0,i,1);
		}
	}
	sort(v.begin(),v.end());
	cout<<v[k-1]<<"\n";
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include<bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include<bits/stdc++.h>
        ^
Main.java:3: error: class, interface, enum, or record expected
typedef long long ll;
^
Main.java:5: error: class, interface, enum, or record expected
vector<long long> v;
^
Main.java:6: error: unnamed classes are a preview feature and are disabled by default.
void dfs(ll x, ll num, ll st, ll cc){
^
  (use --enable-preview to enable unnamed classes)
Main.java:26: error: not a statement
	ll k; cin>>k;
	         ^
Main.java:33: error: not a statement
	cout<<v[k-1]<<"\n";
	            ^
7 errors
Language: C++

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

#define ll long long 
queue<ll>q;

int main()
{
    int k;
    cin >> k;
    for (int i = 1; i <= 9; i++)
        q.push(i);

    int j = 1;

    while (j < k)
    {
        ll p = q.front();
        q.pop();
        j++;

        l u = p % 10;

        if (u != 0)
            q.push(p * 10 + u - 1);

        q.push(p * 10 + u);

        if (u != 9)
            q.push(p * 10 + u + 1);
    }
    cout << q.front() << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:9: error: 'l' was not declared in this scope
   22 |         l u = p % 10;
      |         ^
a.cc:24:13: error: 'u' was not declared in this scope
   24 |         if (u != 0)
      |             ^
a.cc:27:25: error: 'u' was not declared in this scope
   27 |         q.push(p * 10 + u);
      |                         ^
Language: C++

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

void f(int k,string s){
    string list2[28]={"00","01","10","11","12","21","22","23","32","33","34","43","44","45","54","55","56","65","66","67","76","77","78","87","88","89","98","99"};
    int list3[10] = {2,5,8,11,14,17,20,23,26,28};

    if(k<=28) cout << s+list2[k-1] << endl;
    for(char i='1';i<='9';i++){
        k /= 28;
        f(k,i+s);
    }
}

int main(){
    int k;
    cin >> k;
    int list1[26]={10,11,12,21,22,23,32,33,34,43,44,45,54,55,56,65,66,67,76,77,78,87,88,89,98,99};
    if(1<=k&&k<=9) cout << k << endl;//1桁
    else if(10<=k&&k<=36) cout << list1[k-10] << endl;//2桁
    else if ()
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:14: error: expected primary-expression before ')' token
   21 |     else if ()
      |              ^
a.cc:22:1: error: expected primary-expression before '}' token
   22 | }
      | ^
Language: Java

public class Main {

	public static void main(String[] args) {
		Scanner sca = new Scanner(System.in);
		int k = sca.nextInt();
		long loop = 1;
		long loop_hantei = 0;
		int[] keta = new int[12];
		boolean flag_runrun = true;
		while(k != 0) {
			flag_runrun = true;
			loop_hantei = loop;
			int i = 0;
			// 桁数を求める
			do {
				keta[i] = (int)(loop_hantei % 10);
				loop_hantei /= 10;
				i++;
			} while(loop_hantei != 0);
			// ルンルン数かどうかを判定する
			for(int j = i-1; j >= 1; j--) {
				if(keta[j] - keta[j-1] > 1 || keta[j-1] - keta[j] > 1) {
					flag_runrun = false;
					loop += (int)(Math.pow(10, (j-1))); // 例えばもしも13000で非ルンルンと判定したとき、次に調べる数を14000(=13000+10の3乗)にする
					break;
				}
			}
			if(flag_runrun == true) {
				loop++;
				k--;
			}
			else {
			}
		}
		System.out.println(loop - 1);

		// 後始末
		sca.close();
	}
}

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

#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;++i)
#include<string>
#include<vector>
using namespace std;
typedef long long ll;
typedef pair<int, int>P;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
//max=({});
//条件式が真ならwhileの中身を回し続ける
//printf("%d\n", ans);

//pairの入力
//vector<pair<ll, ll>>work(n);
//rep(i, n) {
//	ll a, b;
//	cin >> a >> b;
//	work[i] = make_pair(a, b);
//for(auto p:mp)(mapの探索)
//printf("%.10f\n",なんちゃら)

int g[15][15];
const int INF = 1001001001;
const int dx[4] = { -1,0,1,0 };
const int dy[4] = { 0,-1,0,1 };

//最大公約数
ll gcd(ll x, ll y) {
	return y ? gcd(y, x % y) : x;
}

ll lcm(ll x, ll y) {
	if (x == 0 || y == 0)return 0;
	return (x / gcd(x, y) * y);
}

//素因数分解
vector<pair<ll, int>>factorize(ll n) {
	vector<pair<ll, int>>res;
	for (ll i = 2;i * i <= n;++i) {
		if (n % i)continue;
		res.emplace_back(i, 0);
		while (n % i == 0) {
			n /= i;
			res.back().second++;
		}
	}
	if (n != 1)res.emplace_back(n, 1);
	return res;
}

int bingo[3][3];
int cnt[2][105];
int h, w;
bool flag[110][110];

int main() {
	ll k;
	cin >> k;
	deque<int>q;
	for (int i = 1;i < 10;++i) {
		q.push_back(i);
	}
	ll ans = 0;
	for (int i = 1;i <= k;++i) {
		int x=q.begin();
		if (x % 10 == 0) {
			q.push_back(10 * x);
			q.push_back(10 * x + 1);
		}
		else if (x % 10 == 9) {
			q.push_back(10 * x - 1);
			q.push_back(10 * x);
		}
		else {
			q.push_back(10 * x - 1);
			q.push_back(10 * x);
			q.push_back(10 * x + 1);
		}
		q.pop_front();
		if (i == k)ans = x;
	}
	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:67:30: error: cannot convert 'std::deque<int>::iterator' {aka 'std::_Deque_base<int, std::allocator<int> >::iterator'} to 'int' in initialization
   67 |                 int x=q.begin();
      |                       ~~~~~~~^~
      |                              |
      |                              std::deque<int>::iterator {aka std::_Deque_base<int, std::allocator<int> >::iterator}
Language: C++

#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;++i)
#include<string>
#include<vector>
using namespace std;
typedef long long ll;
typedef pair<int, int>P;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
//max=({});
//条件式が真ならwhileの中身を回し続ける
//printf("%d\n", ans);

//pairの入力
//vector<pair<ll, ll>>work(n);
//rep(i, n) {
//	ll a, b;
//	cin >> a >> b;
//	work[i] = make_pair(a, b);
//for(auto p:mp)(mapの探索)
//printf("%.10f\n",なんちゃら)

int g[15][15];
const int INF = 1001001001;
const int dx[4] = { -1,0,1,0 };
const int dy[4] = { 0,-1,0,1 };

//最大公約数
ll gcd(ll x, ll y) {
	return y ? gcd(y, x % y) : x;
}

ll lcm(ll x, ll y) {
	if (x == 0 || y == 0)return 0;
	return (x / gcd(x, y) * y);
}

//素因数分解
vector<pair<ll, int>>factorize(ll n) {
	vector<pair<ll, int>>res;
	for (ll i = 2;i * i <= n;++i) {
		if (n % i)continue;
		res.emplace_back(i, 0);
		while (n % i == 0) {
			n /= i;
			res.back().second++;
		}
	}
	if (n != 1)res.emplace_back(n, 1);
	return res;
}

int bingo[3][3];
int cnt[2][105];
int h, w;
bool flag[110][110];

int main() {
	ll k;
	cin >> k;
	dequeue<int>q;
	for (int i = 1;i < 10;++i) {
		q.push_back(i);
	}
	ll ans = 0;
	for (int i = 1;i <= k;++i) {
		int x=q.begin();
		if (x % 10 == 0) {
			q.push_back(10 * x);
			q.push_back(10 * x + 1);
		}
		else if (x % 10 == 9) {
			q.push_back(10 * x - 1);
			q.push_back(10 * x);
		}
		else {
			q.push_back(10 * x - 1);
			q.push_back(10 * x);
			q.push_back(10 * x + 1);
		}
		q.pop_front();
		if (i == k)ans = x;
	}
	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:61:9: error: 'dequeue' was not declared in this scope
   61 |         dequeue<int>q;
      |         ^~~~~~~
a.cc:61:17: error: expected primary-expression before 'int'
   61 |         dequeue<int>q;
      |                 ^~~
a.cc:63:17: error: 'q' was not declared in this scope
   63 |                 q.push_back(i);
      |                 ^
a.cc:67:23: error: 'q' was not declared in this scope
   67 |                 int x=q.begin();
      |                       ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
#define FOR(i,start,end) for(int i=start;i<=end;i++)
const int INF = 1001001001;
typedef long long ll;
const ll MOD=1000000007;
using namespace std;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<class T>auto MAX(const T& a) { return *max_element(a.begin(),a.end()); }
template<class T>auto MIN(const T& a) { return *min_element(a.begin(),a.end()); }
template<class T, class U>U SUM(const T& a, const U& v) { return accumulate(a.begin(),a.end(), v); }
template<class T, class U>U COUNT(const T& a, const U& v) { return count(a.begin(),a.end(), v); }
template<class T, class U>int LOWER(const T& a, const U& v) { return lower_bound(a.begin(),a.end(), v) - a.begin(); }
template<class T, class U>int UPPER(const T& a, const U& v) { return upper_bound(a.begin(),a.end(), v) - a.begin(); }
int GCD(int a, int b) { return b ? GCD(b, a%b) : a; }
int LCM(int a, int b) { int g = GCD(a, b); return a / g * b; }
int digsum(int n) {
    ll k;
    queue<string> q;
    q.push("1");
    q.push("2");
    q.push("3");
    q.push("4");
    q.push("5");
    q.push("6");
    q.push("7");
    q.push("8");
    q.push("9");
    cin >> k;k--;
    while(0!=k){
        string now = q.front();
        q.pop();
        for(int i = 0;i<10;i++){
            char add = i+'0';
            if(abs(now.back()-'0'-i) <= 1){
                q.push(now+add);
            }
        }
        k--;
    }
    cout << q.front() << endl;
}


Compiler output:
a.cc: In function 'int digsum(int)':
a.cc:43:1: warning: no return statement in function returning non-void [-Wreturn-type]
   43 | }
      | ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

//参考：http://ehafib.hatenablog.com/entry/2015/12/23/164517
//インクルード
#include<algorithm>//sort,二分探索,など
#include<bitset>//固定長bit集合
#include<cmath>//pow,logなど
#include<complex>//複素数
#include<deque>//両端アクセスのキュー
#include<functional>//sortのgreater
#include<iomanip>//setprecision(浮動小数点の出力の誤差)
#include<iostream>//入出力
#include<map>//map(辞書)
#include<numeric>//iota(整数列の生成),gcdとlcm(c++17)
#include<queue>//キュー
#include<set>//集合
#include<stack>//スタック
#include<string>//文字列
#include<unordered_map>//イテレータあるけど順序保持しないmap
#include<unordered_set>//イテレータあるけど順序保持しないset
#include<utility>//pair
#include<vector>//可変長配列

using namespace std;
typedef long long ll;

//マクロ
#define REP(i,n) for(ll i=0;i<(ll)(n);i++)
#define REPD(i,n) for(ll i=(ll)(n)-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=(a);i<=(b);i++)
#define FORD(i,a,b) for(ll i=(a);i>=(b);i--)
#define ALL(x) (x).begin(),(x).end() //sortなどの引数を省略したい
#define SIZE(x) ((ll)(x).size()) //sizeをsize_tからllに直しておく
#define MAX(x) *max_element(ALL(x))
#define INF 1000000000000
#define MOD 10000007
#define PB push_back
#define MP make_pair
#define F first
#define S second

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

  int k;
	cin >> k;
  queue<int> que;
  que.push(1);
  que.push(2);
  que.push(3);
  que.push(4);
  que.push(5);
  que.push(6);
  que.push(7);
  que.push(8);
  que.push(9);
  int x;
  FOR(i, 0, k-1) {
    x = que.front();
    que.pop()
    if (x % 10 != 0) {
      que.push(10*x-1);
    }
    que.push(10*x);
    if (x % 10 != 9) {
      que.push(10*x+1);
    }
  }
	cout << x << "\n";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:59:14: error: expected ';' before 'if'
   59 |     que.pop()
      |              ^
      |              ;
   60 |     if (x % 10 != 0) {
      |     ~~
Language: C++

#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;++i)
#include<string>
#include<vector>
using namespace std;
typedef long long ll;
typedef pair<int, int>P;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
//max=({});
//条件式が真ならwhileの中身を回し続ける
//printf("%d\n", ans);

//pairの入力
//vector<pair<ll, ll>>work(n);
//rep(i, n) {
//	ll a, b;
//	cin >> a >> b;
//	work[i] = make_pair(a, b);
//for(auto p:mp)(mapの探索)
//printf("%.10f\n",なんちゃら)

int g[15][15];
const int INF = 1001001001;
const int dx[4] = { -1,0,1,0 };
const int dy[4] = { 0,-1,0,1 };

//最大公約数
ll gcd(ll x, ll y) {
	return y ? gcd(y, x % y) : x;
}

ll lcm(ll x, ll y) {
	if (x == 0 || y == 0)return 0;
	return (x / gcd(x, y) * y);
}

//素因数分解
vector<pair<ll, int>>factorize(ll n) {
	vector<pair<ll, int>>res;
	for (ll i = 2;i * i <= n;++i) {
		if (n % i)continue;
		res.emplace_back(i, 0);
		while (n % i == 0) {
			n /= i;
			res.back().second++;
		}
	}
	if (n != 1)res.emplace_back(n, 1);
	return res;
}

int bingo[3][3];
int cnt[2][105];
int h, w;
bool flag[110][110];

int main() {
	ll k;
	cin >> k;
	queue<int>q;
	for (int i = 1;i < 10;++i) {
		q.push(i);
	}
	ll ans = 0;
	for (int i = 1;i <= k;++i) {
		int x=q.pop_front();
		if (x % 10 == 0) {
			q.push(10 * x);
			q.push(10 * x + 1);
		}
		else if (x % 10 == 9) {
			q.push(10 * x - 1);
			q.push(10 * x);
		}
		else {
			q.push(10 * x - 1);
			q.push(10 * x);
			q.push(10 * x + 1);
		}
		if (i == k)ans = x;
	}
	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:67:25: error: 'class std::queue<int>' has no member named 'pop_front'
   67 |                 int x=q.pop_front();
      |                         ^~~~~~~~~
Language: C++

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

int main(){
  int y;
  cin>>y;
  vector<long long>x;
  x={1};
  for(long long i=2;x.size()<y;i++){
  int j=0;
  while(pow(10,j)<i){
  j++;
  }
  vector<int>z(j);
  for(int k=0;k<j;k++){
  z.at(k)=i%pow(10,k+1)-i%pow(10,k);
  }
  for(int l=0;l<j-1;l++){
  if(max(z.at(l),z.at(l+1))-min(z.at(l),z.at(l+1))>1){
  break;
  }
  if(l==j-2){
  x.push_back(i);
  }
  }
  }
  cout<<x.at(y)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:12: error: invalid operands of types 'long long int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   16 |   z.at(k)=i%pow(10,k+1)-i%pow(10,k);
      |           ~^~~~~~~~~~~~
      |           |    |
      |           |    __gnu_cxx::__promote<double>::__type {aka double}
      |           long long int
a.cc:16:26: error: invalid operands of types 'long long int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   16 |   z.at(k)=i%pow(10,k+1)-i%pow(10,k);
      |                         ~^~~~~~~~~~
      |                         |    |
      |                         |    __gnu_cxx::__promote<double>::__type {aka double}
      |                         long long int
Language: C++

#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;++i)
#include<string>
#include<vector>
using namespace std;
typedef long long ll;
typedef pair<int, int>P;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
//max=({});
//条件式が真ならwhileの中身を回し続ける
//printf("%d\n", ans);

//pairの入力
//vector<pair<ll, ll>>work(n);
//rep(i, n) {
//	ll a, b;
//	cin >> a >> b;
//	work[i] = make_pair(a, b);
//for(auto p:mp)(mapの探索)
//printf("%.10f\n",なんちゃら)

int g[15][15];
const int INF = 1001001001;
const int dx[4] = { -1,0,1,0 };
const int dy[4] = { 0,-1,0,1 };

//最大公約数
ll gcd(ll x, ll y) {
	return y ? gcd(y, x % y) : x;
}

ll lcm(ll x, ll y) {
	if (x == 0 || y == 0)return 0;
	return (x / gcd(x, y) * y);
}

//素因数分解
vector<pair<ll, int>>factorize(ll n) {
	vector<pair<ll, int>>res;
	for (ll i = 2;i * i <= n;++i) {
		if (n % i)continue;
		res.emplace_back(i, 0);
		while (n % i == 0) {
			n /= i;
			res.back().second++;
		}
	}
	if (n != 1)res.emplace_back(n, 1);
	return res;
}

int bingo[3][3];
int cnt[2][105];
int h, w;
bool flag[110][110];

int main() {
	ll k;
	cin >> k;
	queue<int>q;
	for (int i = 1;i < 10;++i) {
		q.push(i);
	}
	ll ans = 0;
	for (int i = 1;i <= k;++i) {
		int x=q.pop();
		if (x % 10 == 0) {
			q.push(10 * x);
			q.push(10 * x + 1);
		}
		else if (x % 10 == 9) {
			q.push(10 * x - 1);
			q.push(10 * x);
		}
		else {
			q.push(10 * x - 1);
			q.push(10 * x);
			q.push(10 * x + 1);
		}
		if (i == k)ans = x;
	}
	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:67:28: error: void value not ignored as it ought to be
   67 |                 int x=q.pop();
      |                       ~~~~~^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, m) for (int i = 0; i < (int)(m); i++)
const int inf = 1000000000; // 10^9 Ten to the power of nine.
 
int main()
{
	int x=0;
	void DFS(ll i,ll c)
		{a[++x]=i;
		if(c==10) return;
		for(ll j=max(ll(0),(i%10)-1);j<=min(ll(9),(i%10)+1);j++)
		{DFS(i*10+j,c+1);}}

int main()
{
	for(size_t i =1;i<=9;i++){DFS(i,1);}
	sort(a,a+x);
	ll k;
	cin >> k;
	cout << a[k];
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: a function-definition is not allowed here before '{' token
   11 |                 {a[++x]=i;
      |                 ^
a.cc:16:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   16 | int main()
      |         ^~
a.cc:16:9: note: remove parentheses to default-initialize a variable
   16 | int main()
      |         ^~
      |         --
a.cc:16:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:17:1: error: a function-definition is not allowed here before '{' token
   17 | {
      | ^
a.cc:23:2: error: expected '}' at end of input
   23 | }
      |  ^
a.cc:8:1: note: to match this '{'
    8 | {
      | ^
Language: C

#include<stdio.h>
#include<string.h>
int main()
{
	long long n,r;
	scanf("%lld" ,&n);
	switch (n/3)
{
    case 1:
    r=(n+1)/3 // code to be executed if n = 1;
        break;
    case 2:
    r=(n+2)/3  // code to be executed if n = 2;
        break;
    default:
    r=(n)/3 
     // code to be executed if n doesn't match any cases
}
printf(n+8*r);
}
	

Compiler output:
main.c: In function 'main':
main.c:10:14: error: expected ';' before 'break'
   10 |     r=(n+1)/3 // code to be executed if n = 1;
      |              ^
      |              ;
   11 |         break;
      |         ~~~~~ 
main.c:13:14: error: expected ';' before 'break'
   13 |     r=(n+2)/3  // code to be executed if n = 2;
      |              ^
      |              ;
   14 |         break;
      |         ~~~~~ 
main.c:16:12: error: expected ';' before '}' token
   16 |     r=(n)/3
      |            ^
      |            ;
   17 |      // code to be executed if n doesn't match any cases
   18 | }
      | ~           
main.c:19:9: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
   19 | printf(n+8*r);
      |        ~^~~~
      |         |
      |         long long int
In file included from main.c:1:
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'long long int'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: Java

import java.util.*;
import java.io.*;
public class Main {
    public static void main(String[] args) throws Exception{
        
        Scanner sc = new Scanner(System.in);
       Map<Integer,Integer> m = new HashMap<>();
       int k = sc.nextInt();
       if(m.get(k)==null) {
      for(int i=2;i<=k;i++) {
    	  int a = m.get(i-1);
    	  boolean islunlun=false;
    	  int y;
    	  while(!islunlun)
    	  {
    		   y = a+1;
    		   if(isLunlunNumber(y)) {
    			   islunlun=true;
    		   }
    	  }
    	  m.put(i, y);
    	  
      }
      System.out.println(m.get(k));
       }else {
    	   System.out.println(m.get(k));
       }
        
  }

	private static boolean isLunlunNumber(int y) {
		// TODO Auto-generated method stub
		int digits=0;
		int temp;
		List<Integer> digitList=new ArrayList<>();
		while(y>0) {
			y/=10;
			digitList.add(y%10);
			digits++;
		}
		if(digits==1) {
			return true;
		}else {
			for(int i=0;i<digitList.size()-1;i++) {
				 temp=Math.abs(digitList.get(i)-digitList.get(i+1));
				if(temp!=1 && temp!=0) {
					return false;
				}
			}
		}
		return true;
		
	}
}
        


Compiler output:
Main.java:21: error: variable y might not have been initialized
    	  m.put(i, y);
    	           ^
1 error
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < (n); i++)
#define ALL(v) (v).begin(), (v).end()
using namespace std;
typedef long long ll;
typedef vector<int> v;
typedef vector<ll> vll;
typedef pair<int, int> P;
using Graph = vector<vector<int>>;
const int INF = 1001001001;
const int mINF = -1001001001;
const int mod = 1000000007;
// << fixed << setprecision(0) <<
// sort(ALL(),greater<int>());


int main() {
  int k;
  cin >> k;
  ll ans=1;
  while(k) {
    string s=to_string(ans);
    int n=length(s);
    int flg=-1;
    REP(i,n-1) {
      if(abs(s[i]-s[i+1])>1) flg++;
    }
    if(flg==-1) {
      k--;
    }
    ans++;
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:11: error: 'length' was not declared in this scope
   23 |     int n=length(s);
      |           ^~~~~~
Language: C++

#include <bits/stdc++.h>
typedef long long ll;
typedef long double ld;
using namespace std;
const int mod = 1e9 + 7;


//lunlunなら自身、そうでないなら次の数を返す
ll isOK(int num){
    string s = to_string(num);
    bool ok = true;
    int dig = 0;
    
    if(num==0) return 1;

    if(s.length() == 1);//
    else for(int i = 0; i < s.length()-1; ++i){
        if( abs( (s[i]-'0') - (s[i+1]-'0') ) > 1){
            ok = false;
            dig = i;
            break;
        }
    }
    if(ok) return num;
    
    else
    //合わない桁以降を書き換え
    if(s[dig] - s[dig-1] == 1) dig--; //繰り上がり
    for(int i = dig; i < length()-1; ++i){
        if(s[i-1] != '0') s[i] = s[i-1]-1;
        else s[i] == '0';
    }
    return stoi(s);
}

int main() {
    int K, i=1;
    ll ans = 1;
    cin >> K;
    
    while(i < K){
        if(isOK(ans)==ans){
            i++;
            ans++;
        }
        ans = isOK(ans);
    }

    cout << ans << endl;
}

Compiler output:
a.cc: In function 'll isOK(int)':
a.cc:29:26: error: 'length' was not declared in this scope
   29 |     for(int i = dig; i < length()-1; ++i){
      |                          ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define pp pair<int,int>
#define rep(i,n); for(int (i)=0;(i)<(n);(i)++)
#define ll long long
#define ld long double

int main() {
    int k;
  cin>>k;
  vector<ll> ans(3234566667);
  rep(i,3234566668){
    rep(j,itoa(i).size()){
    if(abs(itoa(i)[j]-itoa(i)[j+1])<=1){
ans[i]+=i;
    }
  }
  rep(i,3234566668){
if(ans[i]==0){
  ans.erase(i,1)
}
    cout<<ans[k-1];
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: 'itoa' was not declared in this scope
   13 |     rep(j,itoa(i).size()){
      |           ^~~~
a.cc:4:38: note: in definition of macro 'rep'
    4 | #define rep(i,n); for(int (i)=0;(i)<(n);(i)++)
      |                                      ^
a.cc:20:12: error: no matching function for call to 'std::vector<long long int>::erase(int&, int)'
   20 |   ans.erase(i,1)
      |   ~~~~~~~~~^~~~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1536:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator) [with _Tp = long long int; _Alloc = std::allocator<long long int>; iterator = std::vector<long long int>::iterator; const_iterator = std::vector<long long int>::const_iterator]'
 1536 |       erase(const_iterator __position)
      |       ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1536:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_vector.h:1564:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator, const_iterator) [with _Tp = long long int; _Alloc = std::allocator<long long int>; iterator = std::vector<long long int>::iterator; const_iterator = std::vector<long long int>::const_iterator]'
 1564 |       erase(const_iterator __first, const_iterator __last)
      |       ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:28: note:   no known conversion for argument 1 from 'int' to 'std::vector<long long int>::const_iterator'
 1564 |       erase(const_iterator __first, const_iterator __last)
      |             ~~~~~~~~~~~~~~~^~~~~~~
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:12:20: note: to match this '{'
   12 |   rep(i,3234566668){
      |                    ^
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:8:12: note: to match this '{'
    8 | int main() {
      |            ^
Language: C++

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

int main() {
  int k;
  long long ans=0;
  cin>>k;
  vector<vector<int>>a(100,vector<int>(10));
  for(int i=0;i<10;i++) a[0][i]=1;
  int i=1;
  int ka=k-9;
  long long keta=10;
  if(k<=9) cout<<k<<endl;
  else{
  while(k>0){
    for(int j=1;j<9;j++) a[i][j]=a[i-1][j]+a[i-1][j-1]+a[i-1][j+1];
    a[i][0]=a[i-1][0]+a[i-1][1];
    a[i][9]=a[i-1][8]+a[i-1][9];
    for(int j=1;j<10;j++){
      ka-=a[i][j]
      if(ka<=0) {
        ans+=j*keta;
        break;
      }
    }
    keta*=10;
    i++;
  }
  keta/=10;
    i--;
  while(ka>0){
    for(int j=1;j<10;j++){
      ka-=a[i][j]
      if(ka<=0) {
        ans+=j*keta;
        break;
      }
    }
    keta/=10;
    i--;
  }
    cout<<ans<<endl;
  }
      
      
      
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:18: error: expected ';' before 'if'
   20 |       ka-=a[i][j]
      |                  ^
      |                  ;
   21 |       if(ka<=0) {
      |       ~~          
a.cc:33:18: error: expected ';' before 'if'
   33 |       ka-=a[i][j]
      |                  ^
      |                  ;
   34 |       if(ka<=0) {
      |       ~~
Language: C

#include <stdio.h>

int main(){
    long long int K;
    scanf("%lld",&K);
    long long int mat[11][10];
    int i,j;
    for(i=0;i<11;i++){
        for(j=0;j<10;j++){
            mat[i][j]=0;
        }
    }
    for(j=0;j<10;j++){
            mat[0][j]=1;
        }
    for(i=1;i<11;i++){
        for(j=0;j<10;j++){
            if(j==0){
                mat[i][j]=mat[i-1[0]+mat[i-1][1];
            }
            else if(j==9){
                mat[i][j]=mat[i-1][8]+mat[i-1][9];
            }
            else{
                mat[i][j]=mat[i-1][i+1]+mat[i-1][i]+mat[i-1][i-1];
            }
        }
    }
    long long int sum=0,tsum=0;
    long long int a,b,S=0,temp;

    while(K>0){
        sum =0;
    for(i=0;i<11;i++){
        for(j=1;j<10;j++){
            sum +=mat[i][j];
            if(sum>K) break;
            a=i;
            b=j;
            tsum=0;
        }
        if(sum>K)break;
        
    }
    K-=tsum;
    temp=1;
    for(i=0;i<a;i++){
        temp *=10;
    }
        S += temp*b;
    }
    prinf("lld",S);

}

Compiler output:
main.c: In function 'main':
main.c:19:34: error: subscripted value is neither array nor pointer nor vector
   19 |                 mat[i][j]=mat[i-1[0]+mat[i-1][1];
      |                                  ^
main.c:19:49: error: expected ']' before ';' token
   19 |                 mat[i][j]=mat[i-1[0]+mat[i-1][1];
      |                                                 ^
      |                                                 ]
main.c:19:50: error: expected ';' before '}' token
   19 |                 mat[i][j]=mat[i-1[0]+mat[i-1][1];
      |                                                  ^
      |                                                  ;
   20 |             }
      |             ~                                     
main.c:52:5: error: implicit declaration of function 'prinf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   52 |     prinf("lld",S);
      |     ^~~~~
      |     printf
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
 
int main() {
    int k,id,tmp1,tmp2,tmp3,flag=0,num=0;
    cin>>k;
    
    for(int =1;i<100000;i++){
    	if(i>=10){
    		id=i;
    		flag=0;
    		while(id>=10){
    		   tmp1=id%10;
    		   tmp2=id/10;
    		   tmp3=tmp2%10;
    		   id=tmp2;
    		   if(abs(tmp1-tmp3)>1){
    		   	flag=1;
    		   	break;
    		   }
    		}
    		if(flag==0){
    			num++;
    			if(num==k){
    				cout<<i<<endl;
    			}
    		}
    	}else{
    		num++
    		if(num==k){
    			cout<<i<<endl;
    		}
    	}
    		
    	}
    }
	// your code goes here
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: expected unqualified-id before '=' token
   11 |     for(int =1;i<100000;i++){
      |             ^
a.cc:11:12: error: expected ';' before '=' token
   11 |     for(int =1;i<100000;i++){
      |            ^~
      |            ;
a.cc:11:13: error: expected primary-expression before '=' token
   11 |     for(int =1;i<100000;i++){
      |             ^
a.cc:11:16: error: 'i' was not declared in this scope; did you mean 'id'?
   11 |     for(int =1;i<100000;i++){
      |                ^
      |                id
a.cc:11:24: error: expected ')' before ';' token
   11 |     for(int =1;i<100000;i++){
      |        ~               ^
      |                        )
a.cc:11:25: error: 'i' was not declared in this scope; did you mean 'id'?
   11 |     for(int =1;i<100000;i++){
      |                         ^
      |                         id
a.cc: At global scope:
a.cc:41:9: error: expected unqualified-id before 'return'
   41 |         return 0;
      |         ^~~~~~
a.cc:42:1: error: expected declaration before '}' token
   42 | }
      | ^
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < (n); i++)
#define ALL(v) (v).begin(), (v).end()
using namespace std;
typedef long long ll;
typedef vector<int> v;
typedef vector<ll> vll;
typedef pair<int, int> P;
using Graph = vector<vector<int>>;
const int INF = 1001001001;
const int mINF = -1001001001;
const int mod = 1000000007;
// << fixed << setprecision(0) <<
// sort(ALL(),greater<int>());


int main() {
  int k;
  cin >> k;
  ll ans=1;
  while(k) {
    int n=size(to_string(ans));
    int flg=-1;
    REP(i,n-1) {
      if(abs(s[i]-s[i+1])>1) flg++;
    }
    if(flg==-1) {
      k--;
    }
    ans++;
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:14: error: 's' was not declared in this scope
   25 |       if(abs(s[i]-s[i+1])>1) flg++;
      |              ^
Language: Java

import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long k = Long.parseLong(sc.next());

        List<Long> runrun = new ArrayList<>();

        long num = 1;
        while(true){
            char[] arr = String.valueOf(num).toCharArray();
            int tmp = arr[0];
            boolean breaked = false;
            for(long l = 1; l<arr.length; l++){
                if(Math.abs(tmp, arr[i])>1){
                    breaked = true;
                    break;
                }
            }
            if(!breaked){
                runrun.add(num);
            }
            if(runrun.size() == k){
                System.out.println(runrun.get((int) (k-1)));
            }
        }
    }
}


Compiler output:
Main.java:17: error: cannot find symbol
                if(Math.abs(tmp, arr[i])>1){
                                     ^
  symbol:   variable i
  location: class Main
Main.java:17: error: no suitable method found for abs(int,char)
                if(Math.abs(tmp, arr[i])>1){
                       ^
    method Math.abs(int) is not applicable
      (actual and formal argument lists differ in length)
    method Math.abs(long) is not applicable
      (actual and formal argument lists differ in length)
    method Math.abs(float) is not applicable
      (actual and formal argument lists differ in length)
    method Math.abs(double) is not applicable
      (actual and formal argument lists differ in length)
2 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int long long
int bfs(int x)
{
    // Create a queue and enqueue 'i' to it
    queue<int> q;
    q.push(1);
    q.push(2);
    q.push(3);
    q.push(4);
    q.push(5);
    q.push(6);
    q.push(7);
    q.push(8);
    q.push(9);

    int cnt=0;
int  num;
    // Do BFS starting from i
    while (!q.empty()) {
        num = q.front();
        q.pop();
        cnt++;
   if(cnt==x)
      break;

            int last_dig = num % 10;

            // If last digit is 0, append next digit only
            if (last_dig == 0)
                q.push((num * 10) + (last_dig + 1));

            // If last digit is 9, append previous digit only
            else if (last_dig == 9)
                q.push((num * 10) + (last_dig - 1));

            // If last digit is neighter 0 nor 9, append both
            // previous and next digits
            else {
                q.push((num * 10) + (last_dig - 1));
                q.push((num * 10) + (last_dig + 1));
            }
        }
        return num;
    }

main()
{
 int k;
 cin>>k;
    cout<<bfs(x);
}


Compiler output:
a.cc:48:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   48 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:52:15: error: 'x' was not declared in this scope
   52 |     cout<<bfs(x);
      |               ^
Language: Java

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

        int K = sc.nextInt();
        int i = 10
        int len = 0;
        int cnt = 0;
        int sum = 0;
        int ans = 0;

        String tmp1;
        char tmp2;
        String tmp3;
        
        Do{
            len = String.valueOf(i).length();
            String tmp1 = String.valueOf(i);
            char tmp2 = ' ';
            while(len != 0) {
                tmp2 = tmp1.charAt(len-1);
                tmp3 = String.valueOf(tmp2);
                sum = Math.abs(sum - tmp);
                len--;
            }
            i++;
            if(sum == len - 1) {
                cnt++;
                ans = sum;
            }
        }while(cnt == K);
        System.out.println();
    }
}


Compiler output:
Main.java:7: error: ';' expected
        int i = 10
                  ^
Main.java:17: error: not a statement
        Do{
        ^
Main.java:17: error: ';' expected
        Do{
          ^
3 errors
Language: C++

#include<stdio.h>
#include<stdlib.h>
int isll();

int main(){
    int K , count = 0;
    scanf("%d",&K);
    long int ll=0;
    while(1){
        ll++;
        if(isll(ll)){
            count++;
        }
        if(count==K){
            printf("%ld",ll);
            break;
        }

    }
    return 0;
}



int isll(long int ll){
    if(ll<=12){
        return 1;
    }
    if(ll)
    char str[256];
    sprintf(str,"%ld",ll);
    int ptr=1;

    while(str[ptr]!='\0'){
        if(abs(str[ptr]-str[ptr-1])>1){
            return 0;
        }
        ptr++;
    }
    return 1;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: too many arguments to function 'int isll()'
   11 |         if(isll(ll)){
      |            ~~~~^~~~
a.cc:3:5: note: declared here
    3 | int isll();
      |     ^~~~
a.cc: In function 'int isll(long int)':
a.cc:31:13: error: 'str' was not declared in this scope; did you mean 'std'?
   31 |     sprintf(str,"%ld",ll);
      |             ^~~
      |             std
Language: Java

import java.util.*;
public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int K = sc.nextInt();
		int ans = 0;
		int keta = 2;
		double count = 1.0;
		if(K < 10){
			ans = K;
		}else{
			for(ans = 10;i < N;ans++){
				if(CheckNum(i,ans) != 1){
					while(CheckNum(ans,keta) != 1){
						i += (int)Math.pow(10.0,(double)keta - 1.0);
					}
				}
			}
		}
		System.out.println(ans);
	}
	public static int CheckNum(int num,int keta){
		int buf,buf2;
		while(keta > 1){
			buf = num / (int)Math.pow(10.0,(double)keta - 1.0);
			buf2 = (num - buf * (int)Math.pow(10.0,(double)keta - 1.0)) / (int)Math.pow(10.0,(double)keta - 2.0);
			if(Math.abs(buf - buf2) > 1){
				return keta;
			}else{
				keta--;
			}
		}
		return 1;
	}
}

Compiler output:
Main.java:12: error: cannot find symbol
			for(ans = 10;i < N;ans++){
			             ^
  symbol:   variable i
  location: class Main
Main.java:12: error: cannot find symbol
			for(ans = 10;i < N;ans++){
			                 ^
  symbol:   variable N
  location: class Main
Main.java:13: error: cannot find symbol
				if(CheckNum(i,ans) != 1){
				            ^
  symbol:   variable i
  location: class Main
Main.java:15: error: cannot find symbol
						i += (int)Math.pow(10.0,(double)keta - 1.0);
						^
  symbol:   variable i
  location: class Main
4 errors
Language: C++

#include<bits/stdc++.h>

using namespace std;

long long int abs(long long int a,long long int b)
{
    if( a > b)
    {
        return a-b;
    }
    return b-a;
}
int main()
{
    map<int,int>m;
    for(int i = 1;i <=12;i++)
    {
        m[i] = i;
    }

    int n;
    cin>>n;
    if(n < 13)
    {
        cout<<n;
    }
    else{
   int  k = 13;
    
    
        for(long long int j = 13 ; k < n;j++)
        {
            long long int temp = j;
            int unit = temp % 10;
            temp /= 10;

            while(temp > 0)
            {
                
                if(abs(temp % 10 , unit) > 1)
                {
                    break;
                }
                unit = temp % 10;
                temp /= 10;

            }
            if(temp == 0)
            {
                if(k == n)
                {
                    cout<<j;
                }
                k++;
            }

        }


    
    
  
}

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

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

int main(void){
    int K, flag, flag2, len;
    unsigned long int i;
    char mozi[50];
    scanf("%d", &K);
    if (K <= 12){
        printf("%d", K);
    }
    else {
        i = flag = 12;
        while(K != flag){
            i++;
            sprintf(mozi, "%d", i);
            len = strlen(mozi);
            flag2 = 0;
            for (j = 0; j < len-1; j++){
                if ((mozi[j] == mozi[j+1]) || (mozi[j]+1 == mozi[j+1]) || (mozi[j]-1 == mozi[j+1])){
                    flag2 += 2;
                    continue;
                }
                else{
                    break;
                }
            }
            if (flag2 == (len - 1)){
                flag += 1;
            }
        }
        printf(i)
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:18: error: 'j' undeclared (first use in this function)
   19 |             for (j = 0; j < len-1; j++){
      |                  ^
main.c:19:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:32:16: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
   32 |         printf(i)
      |                ^
      |                |
      |                long unsigned int
In file included from main.c:1:
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'long unsigned int'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:32:18: error: expected ';' before '}' token
   32 |         printf(i)
      |                  ^
      |                  ;
   33 |     }
      |     ~
Language: C++

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

bool ketasa(long long x){
  int keta = 0;
  int xx = x
  while(x != 0){
    xx=xx/10;
    keta++;
  }
  if(keta == 2){
    int z = x%10;
    x = x / 10;
    int z2 = x%10;
    if(abs(z-z2) < 2) {
      return 1;
    }
    if(abs(z-z2) > 1){
      return 0;
    }
  }
  if(keta != 2){
    int k = x % (10 * (keta-1));
    int k2;
    //x = x / 10;
    while(keta > 1){
      k2 = x % (10 * (keta - 2));
      if(abs(k - k2) > 1) {
        return 0;
      }
      k = k2;
      //x = x / 10;
      keta--;
    }

    return 1;
  }
}

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

  if(k < 10) {
    cout << k << endl;
    return 0;
  }

  int count = 9;

  long long xxx=10;

  while(count != k) {
    if(ketasa(xxx) == 1) {
      count++;
      
    }
    xxx++;
  }

  xxx--;

  cout << xxx << endl;
}


Compiler output:
a.cc: In function 'bool ketasa(long long int)':
a.cc:8:3: error: expected ',' or ';' before 'while'
    8 |   while(x != 0){
      |   ^~~~~
a.cc:39:1: warning: control reaches end of non-void function [-Wreturn-type]
   39 | }
      | ^
Language: C++

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

int main() {
  int k; cin >> k;
  long long wawa;
  if(k <= 10){
    cout << k;
    return 0;
  }
  vector<vector<long long>> a(20, vector<long long>(10, 0));
  int sum = 9;
  int x, y;
  for(int i = 0; i < 10; i++) a.at(0).at(i) = 1;
  for(int i = 1; i < 20; i++){
    for(int j = 0; j < 10; j++){
      if(j == 0){
        a.at(i).at(j) = a.at(i-1).at(j) + a.at(i-1).at(j+1);
      }else if(j == 9){
        a.at(i).at(j) = a.at(i-1).at(j-1) + a.at(i-1).at(j);
      }else{
        a.at(i).at(j) = a.at(i-1).at(j-1) + a.at(i-1).at(j) + a.at(i-1).at(j+1);
      }
      if(j != 0){
        sum += a.at(i).at(j);
      }
      if(sum >= k){
        x = i;
        y = j;
        wawa = sum - a.at(i).at(j);
        break;
      }
    }
  }
  long long out = y;
  for(int i = 0; i < x; i++) out *= 10;
  int wa = 0;
  for(long long i = out; i <  ; i++){
    int ind = out % 10;
    out = out / 10;
    int flag = 0;
    while(out / 10 > 0){
      if(out % 10 - ind < -1){
        flag = 1;
        out = out /10;
        break;
      }
      if(out % 10 - ind > 1){
        flag = 1;
        out = out / 10;
        break;
      }
      if(flag == 0) wa++;
    }
    if(wa == wawa) break;
  }
  cout << out;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:31: error: expected primary-expression before ';' token
   38 |   for(long long i = out; i <  ; i++){
      |                               ^