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

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

int S(int N){
  int S = 0;
  while ( N > 0 ) {
    S = S + N - N / 10 * 10;
    N = N / 10;
  }
  return S;
}

bool Snuke(int i){
  int c=0;
  for(int j = i+1; j < 10*i; ++j){
    if( i / S(i) <= j / S(j) ) c++;
  }
  return (c == 9*i-1)
}

int main() {
   int K;
   vector<int> A;
   int a=0;
   cin >> K;
   for(int i = 1; i < 3*K; ++i){
     if( Snuke(i) ){
       A.at(a) = i;
       a++;
     }
   }
   for(int j = 0; j < K; j++){
     cout << A.at(j) << endl;
   }
}

Compiler output:
a.cc: In function 'bool Snuke(int)':
a.cc:18:22: error: expected ';' before '}' token
   18 |   return (c == 9*i-1)
      |                      ^
      |                      ;
   19 | }
      | ~
Language: C++

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

int s(long long n) {
  int sum = 0;
  while (n) {
	sum += n % 10;
  	n /= 10;
  }
}

int main () {
  int k;
  cin >> k;
  long long cnt = 0, d = 1;
  while (k--) {
    if(d*s(a+d)<a+d) d *= 10;
    a += d;
    cout << a << endl;
  }
}

Compiler output:
a.cc: In function 'int s(long long int)':
a.cc:10:1: warning: no return statement in function returning non-void [-Wreturn-type]
   10 | }
      | ^
a.cc: In function 'int main()':
a.cc:17:12: error: 'a' was not declared in this scope
   17 |     if(d*s(a+d)<a+d) d *= 10;
      |            ^
a.cc:18:5: error: 'a' was not declared in this scope
   18 |     a += d;
      |     ^
Language: Java

import java.util.*;
public class Main {

  public static void main(String[] args) { 
      Scanner sc = new Scanner(System.in);
      int k = sc.nextLong();
      if(k < 10) {
        System.out.println(k);
        reutrn;
      }
      System.out.println(10 * (k - 10 + 1) + 9);
  }
}

Compiler output:
Main.java:9: error: not a statement
        reutrn;
        ^
1 error
Language: C

#include<cstdio>
int main() {
	int k;
	long long v = 1,c,u,h;
	scanf("%d",&k);
	if(k > 0) {
		printf("1\n");
		k--;
	}
	while(k) {
		u = 1;
		c = v;
		while(c) {
			u *= 10;
			h = c % 10;
			c /= 10;
		}
		u /= 10;
		if(h == 9) {
			v = v + 1 * u * 10;
		}else{
			v = v + u;
		}
		printf("%lld\n",v);
		k--;
	}
	return 0;
}


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

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main() {
	int i=0, j = 1;
	int K;
	scanf("%d", &K);
	while(1) {
		int m = randM(tulingFunc(j));
		if(m/tulingFunc(m) >= j/tulingFunc(j) && i<K) {
			i++;
			printf("%d\n", j);
		}
		j++;
	}
    return 0;
}

int randM(int n) {
	return rand()%1+n;
}

int tulingFunc(int num) {
	int i = 0;
	int n = num;
	while(n!=0) {
		n = n / 10;
		i++;
	}
	int nums[i];
	int power = (int)pow((float)10, (float)i-1);
	int tmp, j, result = 0;
	for(j = 0;j<i;j++) {
		tmp = num / power;
		num = num % power;
		result += tmp;
	}
	return result;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:9:31: error: 'tulingFunc' was not declared in this scope
    9 |                 int m = randM(tulingFunc(j));
      |                               ^~~~~~~~~~
a.cc:9:25: error: 'randM' was not declared in this scope; did you mean 'rand'?
    9 |                 int m = randM(tulingFunc(j));
      |                         ^~~~~
      |                         rand
Language: C++

  #include<bits/stdc++.h>
  #define N 100005
  #define int long long
  using namespace std;
  int arr[N];

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

    vector<int> vec;
    for(int i = 1; i < 10;i++) {
      vec.push_back(i);
      cout << i << endl;
      k--;
      if(k == 0) return 0;
    }
    while(k) {
      for(int i = 0; i < 9;i++) {
        vec[i] = vec[i]*10+9;
        cout << vec[i] <<endl;;
        k--;
        if(k == 0) {return 0;}
      }
    }


  }


Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int i,w,h,n,x,y,a,left,right,up,down; 
	cin>>w>>h>>n;
	left=0;right=w;right=0;up=h;i<=n;i++;
	{
		cin>>x>>y>>a;
	for(int i=1)
		if(a==1)left=max(left,x);
		if(a==2)right=min(right,x);
		if(a==3)down=max(down,y);
		if(a==4)up=min(up,y);
	}
	if(left>right||down>up)cout<<0;
	else
	    cout<<(right-left)*(up-down);
	return 0;
}

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

K = int(input())
 
res = [(0, 0)]
mm = 0
cands = []
for i in range(1, 1000):
  v = i
  for j in range(16):
    cands.append(v)
    v = 10 * v + 9

cands = list(sorted(set(cands)))

for x in cands:
  i = sum(ord(c) - ord('0') for c in str(x))
  while x / i < res[-1][0]:
    res = res[:-1]
  res.append((x / i, x))
 
for i in range(1, K + 1):
  print(res[i][1])

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

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pint = pair<int,  int>;
using edge = pair<int, ll>;
using graph = vector<vector<Edge>>;
const ll INF = 1LL << 60;
const int INF32 = 1 << 29;
const ll MOD = 1000000007;

long long f(long long n) {
  long long res = 0;
  while (n > 0) {
    res += n%10;
    n /= 10;
  }
  return res;
}

double g(long long n) {
  return (double)(n)/f(n);
}

int main() {
  vector<long long> res;
  long long base = 1;

  // まずは候補を (1〜150)99999 的なやつを全列挙
  for (int i = 0; i < 15; ++i) {
    for (int j = 1; j < 150; ++j) {
      res.push_back(base * (j+1) - 1);
    }
    base *= 10;
  }
  sort(res.begin(), res.end());
  res.erase(unique(res.begin(), res.end()), res.end());

  // ダメなやつを除く: O(n^2) かかる効率悪い実装だけどとりあえず
  for (long long i = 0; i < res.size(); ++i) {
    for (long long j = i+1; j < res.size(); ++j) {
      if (g(res[i]) > g(res[j])) {
        res.erase(res.begin() + i--);
        break;
      }
    }
  }

  long long K;
  cin >> K;
  for (long long i = 0; i < K; ++i) {
    cout << res[i] << endl;
  }
}


Compiler output:
a.cc:7:29: error: 'Edge' was not declared in this scope; did you mean 'edge'?
    7 | using graph = vector<vector<Edge>>;
      |                             ^~~~
      |                             edge
a.cc:7:29: error: template argument 1 is invalid
a.cc:7:29: error: template argument 2 is invalid
a.cc:7:33: error: template argument 1 is invalid
    7 | using graph = vector<vector<Edge>>;
      |                                 ^~
a.cc:7:33: error: template argument 2 is invalid
Language: C

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

int keta(int n);
int power(int m, int n);
int s(int n);

int main(void)
{
    int k,ketak,ubm,i,j=0,km=0,*sunuke;
    double least;

    scanf("%d",&k);
    sunuke=(int *)malloc(sizeof(int)*k);

    ketak=keta(k);
    while(pow(10.0,ketak+2)>=pow(5.0,km))
    {
        km++;
    }
    km--;
    ubm=power(10,km);

    least=k/((double)s(k));
    for(i=k+1;k<=ubm;k++)
    {
        if(least>=i/((double)s(i))) least=i/((double)s(i));
    }

    for(i=k;k>=1;k--)
    {
        if((i+1)/((double)s(i+1))<=least) least=(i+1)/((double)s(i+1));
        if(i/((double)s(i))<=least) sunuke[j]=i;
        j++;
    }

    for(i=j-1;i>=0;i--) print("%d\n",sunuke[i]);

    free(sunuke);

    return 0;
}

int keta(int n)
{
    int i=0,pow=1;
    while(pow<=n)
    {
        pow*=10;
        i++;
    }
    return i;
}

int power(int m, int n)
{
    int pow=1;
    for(int i=1;i<=n;i++) pow*=m;
    return pow;
}

int s(int n)
{
    int m=n,sum=0;
    while(m!=0)
    {
        sum+=m%10;
        m=m/10;
    }
    return sum;
}

Compiler output:
main.c: In function 'main':
main.c:38:25: error: implicit declaration of function 'print'; did you mean 'lrint'? [-Wimplicit-function-declaration]
   38 |     for(i=j-1;i>=0;i--) print("%d\n",sunuke[i]);
      |                         ^~~~~
      |                         lrint
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i=0; i<(int)(n); ++i)
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using Graph = vector<vi>;  // vi <=> vl
using vb = vector<bool>;
using boolGraph = vector<vb>;
using P = pair<int, int>;  // int <=> ll
const int MOD = 1e9+7;
const double EPS = 1e-9;

int main() {
  int n; cin >> n;
  
  vl snuke;
  ll digit = 1;
  rep(i,15) {
    rep(j,9) snuke.push_back((j+2)*digit - 1);
    digit *= 10;
  }

  ll irregular = 1099;
  int denominator = 19;
  digit = 100;
  
  rep(i,12) {
    ll num = irregular;
    int tmp = denominator;
    
    rep(j,9) {
      if (num/digit >= tmp) break;
      
      rep(k,9) snuke.push_back(num + digit*k)
      num += digit * 10;
      ++tmp;
    }

    (irregular *= 10) += 9;
    denominator += 9;
    digit *= 10;
  }

  irregular = 101 * 1e12 - 1;
  rep(i,9) {
    snuke.push_back(irregular);
    irregular += 1e12;
  }

  sort(all(snuke));

  rep(i,n) cout << snuke[i] << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:37:46: error: expected ';' before 'num'
   37 |       rep(k,9) snuke.push_back(num + digit*k)
      |                                              ^
      |                                              ;
   38 |       num += digit * 10;
      |       ~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define all int i=0; i<n; i++
#define pb push_back
typedef long long int ll;

#define FAST_IO ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
#define endl '\n'
#define mod 1000000007

bool sortinrev(const pair<ll,ll> &a,  
               const pair<ll,ll> &b) 
{ 
       return (a.first > b.first); 
}
float sum(int a){
	float res=0.00;
	while(a!=0){
		res+= a%10;
		a/=10;
	}
	return res;
}
int main(){
	int k;
	cin>>k;
	for(int i=1; i<=k; i++){
		int flag=1;
		for(int j=i+1; j<=i+1000; j++){
			if(i/sum(i) > j/sum(j)){
				flag=0;
				break;
			}
		}
		if(flag==1)cout<<iendl;
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:34: error: 'iendl' was not declared in this scope; did you mean 'endl'?
   35 |                 if(flag==1)cout<<iendl;
      |                                  ^~~~~
      |                                  endl
Language: C++

#include<bits/stdc++.h>
#define $$ long long int
#define pb push_back
#define db pop_back
#define q2(n) (n%2)==0
#define vp vector<pair <$$,$$> >
#define vctr vector<$$>
#define in(a) scanf("%lld",&a)
#define out(a) printf("%lld ",a)
#define loop(i,m,p) for ($$ i = m; i < p; i++)
#define loopn(i,m,p) for ($$ i = p-1; i >=m; --i)

using namespace std;


int main()
{
    $$ n;
    cin>>n;
    $$ ar[30]={1,2,3,4,5,6,7,8,9,19,29,39,49,59,69,79,89,89,99,199,299,399,499,599,699,799,899,999,1999,2999,3999,4999,5999,6999,7999,8999,9999};
    if (n<30)
    {
    	/* code */cout<<ar[n-1];
    }
    else
    	cout<<"lol";



return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:144: error: too many initializers for 'long long int [30]'
   20 |     $$ ar[30]={1,2,3,4,5,6,7,8,9,19,29,39,49,59,69,79,89,89,99,199,299,399,499,599,699,799,899,999,1999,2999,3999,4999,5999,6999,7999,8999,9999};
      |                                                                                                                                                ^
Language: C++

#include<bits/stdc++.h>
#define $$ long long int
#define pb push_back
#define db pop_back
#define q2(n) (n%2)==0
#define vp vector<pair <$$,$$> >
#define vctr vector<$$>
#define in(a) scanf("%lld",&a)
#define out(a) printf("%lld ",a)
#define loop(i,m,p) for ($$ i = m; i < p; i++)
#define loopn(i,m,p) for ($$ i = p-1; i >=m; --i)

using namespace std;


int main()
{
    $$ n;
    cin>>n;
    ar[30]={1,2,3,4,5,6,7,8,9,19,29,39,49,59,69,79,89,89,99,199,299,399,499,599,699,799,899,999,1999,2999,3999,4999,5999,6999,7999,8999,9999};
    if (n<30)
    {
    	/* code */cout<<ar[n-1];
    }
    else
    	cout<<"lol";



return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:5: error: 'ar' was not declared in this scope
   20 |     ar[30]={1,2,3,4,5,6,7,8,9,19,29,39,49,59,69,79,89,89,99,199,299,399,499,599,699,799,899,999,1999,2999,3999,4999,5999,6999,7999,8999,9999};
      |     ^~
Language: C++


//  main.cpp
//  ABC
//
//  Created by Amarsanaa Davaasuren on 2019/08/31.
//  Copyright © 2019 Amarsanaa Davaasuren. All rights reserved.
//

#include <iostream>
#include <vector>
#include <map>
#include <cstdio>
#include <string>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define repr(i, n) for (int i = (n) - 1; i >= 0; i--)
#define FOR(i,i0,n) for(int (i)=(i0);(i)<(n);(i)++)
#define rn return

using namespace std;
using ll = long long;

int sum(ll n){
    int ans = 0;
    while (n){
        ans += n%10;
        n /= 10;
    }
    rn ans;
}

ll update(ll m){
    string sn = to_string(m);
    int bk = 0;
    repr(i,sn.size()){
        if (sn[i] == '9') continue;
        else{
            sn[i] = '9'; bk = 1;break;
        }
    }
    if (bk == 0) sn = "1" + sn;
    rn stoll(sn);
}

ll snuke(ll n){
    ll n_sn = n/sum(n);
    ll m = n + 1;
    vector <pair<ll,ll>> ans;
    rep(i,10){
        pair<ll,ll> P = make_pair(m/sum(m),m);
        ans.push_back(P);
        m = update(m);
    }
    sort(ans.begin(),ans.end());
    return ans[0].second;
}

int main(){
    int K; cin >> K;
    ll ans = 1;
    rep(i,K-1) ans = snuke(ans);
    cout << ans;
    rn 0;
}

Compiler output:
a.cc: In function 'll snuke(ll)':
a.cc:53:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   53 |     sort(ans.begin(),ans.end());
      |     ^~~~
      |     short
Language: C++

#include<bits/stdc++.h>
#define rep(i,n,m) for(int i = (n); i <(m); i++)
#define rrep(i,n,m) for(int i = (n) - 1; i >=(m); i--)
using namespace std;
using ll = long long;

ll digit_sum(ll n)
{
    ll res = 0LL;
    while (n)
    {
        res += n % 10LL;
        n /= 10LL;
    }
    return res;
}

ll next_snuke(ll n)
{
    ll now = n;
    ll base = 1;
    ll smallest = n;
    double small = (double) smallest / digit_sum(smallest)
    while(now < 100L * n)
    {
        ll check = (now / base) % 10L;
        if (check != 9)
        {
            cout << "*" << now << ' ' << check << ' ' << base << endl;
            now += base;
            ll d_now = (double)now / digit_sum(now);
            if (small > d_now)
            {
                smallest = now;
                small = d_now;
            }
            if (check == 8) base *= 10L;
        }
        else
            base *= 10L;
    }
    return smallest;
}

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

    ll snuke = 0LL;
    // while (k)
    // {
    //     snuke = next_snuke(snuke + 1LL);
    //     cout << snuke << endl;
    //     --k;
    // }
    cout << next_snuke(6999999999999999LL + 1LL) << endl;
    return 0;
}

Compiler output:
a.cc: In function 'll next_snuke(ll)':
a.cc:24:5: error: expected ',' or ';' before 'while'
   24 |     while(now < 100L * n)
      |     ^~~~~
Language: C++

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <list>
#include <queue>
#include <deque>
#include <algorithm>
#include <numeric>
#include <utility>
#include <complex>
#include <functional>
using namespace std;
const int MOD = 1000000007;
typedef long long ll;
typedef pair<ll, ll> p;
const int INF = (1 << 28);
const int dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0};
const int Dx[8] = {0, 1, 1, 1, 0, -1, -1, -1}, Dy[8] = {-1, -1, 0, 1, 1, 1, 0, -1};
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << endl
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
ll k;
ll sum(ll n){
    ll sumk=0;
    while(n>0){
        sumk+=n%10;
        n/=10;
    }
    return sumk;
}
double div(ll n){
    return double(n)/sum(n);
}
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> k;
    vector<ll> ex;
    ll keta=1;
    for(int i=0;i<15;i++){
        for(int j=2;j<=150;j++){
            ex.push_back(keta*j-1);
        }
        keta*=10;
    }
    sort(ALL(ex));
    ex.erase(unique(ALL(ex)),ex.end());
    for(ll i=0;i<ex.size();i++){
        for(ll j=i+1;j<ex.size();j++){
            if(div(ex[j])<div(ex[i])){
                ex.erase(ex.begin()+i);
                i--
                break;
            }
        }
    }
    for(ll i=0;i<k;i++){
        cout<<ex[i]<<"\n";
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:66:20: error: expected ';' before 'break'
   66 |                 i--
      |                    ^
      |                    ;
   67 |                 break;
      |                 ~~~~~
Language: C++

using ll = long long;

ll ds(ll x) {
    ll ret = 0;
    while(x) {
        ret += x % 10;
        x /= 10;
    }
    return ret;
}

int main() {
    ll K; scanf("%lld", &K);

    ll num = 1, add = 1;
    for(ll i=0; i < K; ++i) {
        printf("%lld\n", num);
        while(double(num + add) / ds(num + add) > double(num + 2 * add) / ds(num + 2 * add)) add *= 10;
        num += add;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: 'scanf' was not declared in this scope
   13 |     ll K; scanf("%lld", &K);
      |           ^~~~~
a.cc:17:9: error: 'printf' was not declared in this scope
   17 |         printf("%lld\n", num);
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | using ll = long long;
Language: C

#include<stdio.h>

int main(){
	int i,j=0,k,K;
	scanf("%d",&)K;

	while(1){
		for(i=1;i<=9;i++){
			printf("%d",i);
			for(k=0;k<j;k++){
				printf("9");
			}
			printf("\n");
			if(--K==0)return 0;
		}
		j++;
	}


	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:21: error: expected expression before ')' token
    5 |         scanf("%d",&)K;
      |                     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
    using ll = long long;
    ll k;
    cin >> k;

    if(k <= 9)
    {
        for(int i = 1; i <= min(k, 9); i++)
        {
            cout << i << endl;
        }
        return 0;
    }
    ll t = 9;
    k -= 9;
    ll d = 10;
    while(k != 0)
    {
        for(int i = 1; i <= 9; i++)
        {

            t += d;
            cout << t << endl;
            k--;
            if(k == 0) break;
        }
        d *= 10;
    }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:32: error: no matching function for call to 'min(ll&, int)'
   11 |         for(int i = 1; i <= min(k, 9); i++)
      |                             ~~~^~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:11:32: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   11 |         for(int i = 1; i <= min(k, 9); i++)
      |                             ~~~^~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:11:32: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   11 |         for(int i = 1; i <= min(k, 9); i++)
      |                             ~~~^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    ll k;
    cin>>k;
    ll i=1,j=1;
    while((i<=k)&&(i<10)){
        cout<<i<<'\n';
        i++;
    }
    while(j<k-8){
        cout<<10*j+9<<'\n';
        j++;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'll' was not declared in this scope
    4 |     ll k;
      |     ^~
a.cc:5:10: error: 'k' was not declared in this scope
    5 |     cin>>k;
      |          ^
a.cc:6:7: error: expected ';' before 'i'
    6 |     ll i=1,j=1;
      |       ^~
      |       ;
a.cc:7:12: error: 'i' was not declared in this scope
    7 |     while((i<=k)&&(i<10)){
      |            ^
a.cc:11:11: error: 'j' was not declared in this scope; did you mean 'jn'?
   11 |     while(j<k-8){
      |           ^
      |           jn
Language: Java

/*
String[]の初期化、整数の型がlongになっているか
関数（splitとかcontainsとか）内では"+"とかは正規表現となされるので"\\+"とする
配列のコピーはarr1=arr.clone()
HashSet<>[]はおのおの初期化した？？？？？
負の数の割り算は絶対値が小さいほうに切り捨てられるex.-1/2=0ので、ある値>kみたいな式だとバグらせやすいので注意
ある値>=kとして、切り上げた値をとるべき
toLowerCase()はアルファベット以外に対して行ってもエラーにはならない
 */
//入力終了→Ctrl+D
import java.time.Year;
import java.util.*;
import java.awt.*;
import java.awt.Graphics.*;
import static java.lang.System.*;
import static java.lang.Math.*;
public class Main {
    public static void main(String[] $) {
        Scanner sc = new Scanner(in);
        long k=sc.nextLong();
        long c=0,i=1;
        while (c<k){
            int h=0;
            for (int j = 1; j <= 500; j++) {
                if ((double) i / sum(i) <= (double) (i + j) / sum(i + j)) {
                    h++;
                }
                if(h==500){
                    out.println(i);
                    c++;
                }
            }
            i++;
        }
    }
    static long sum(long i){
        long t=0;
        while (i>0){
            t+=i%10;
            i/=10;
        }
        return t;
    }
}
/*
String[]の初期化、整数の型がlongになっているか
関数（splitとかcontainsとか）内では"+"とかは正規表現となされるので"\\+"とする
配列のコピーはarr1=arr.clone()
HashSet<>[]はおのおの初期化した？？？？？
負の数の割り算は絶対値が小さいほうに切り捨てられるex.-1/2=0ので、ある値>kみたいな式だとバグらせやすいので注意
ある値>=kとして、切り上げた値をとるべき
toLowerCase()はアルファベット以外に対して行ってもエラーにはならない
 */
//入力終了→Ctrl+D
import java.time.Year;
import java.util.*;
import java.awt.*;
import java.awt.Graphics.*;
import static java.lang.System.*;
import static java.lang.Math.*;
public class Main {
    public static void main(String[] $) {
        Scanner sc = new Scanner(in);
        long k=sc.nextLong();
        long c=0,i=1;
        while (c<k){
            int h=0;
            for (int j = 1; j <= 300; j++) {
                if ((double) i / sum(i) <= (double) (i + j) / sum(i + j)) {
                    h++;
                }
                if(h==300){
                    out.println(i);
                    c++;
                }
            }
            i++;
        }
    }
    static long sum(long i){
        long t=0;
        while (i>0){
            t+=i%10;
            i/=10;
        }
        return t;
    }
}


Compiler output:
Main.java:55: error: class, interface, enum, or record expected
import java.time.Year;
^
Main.java:56: error: class, interface, enum, or record expected
import java.util.*;
^
Main.java:57: error: class, interface, enum, or record expected
import java.awt.*;
^
Main.java:58: error: class, interface, enum, or record expected
import java.awt.Graphics.*;
^
Main.java:59: error: class, interface, enum, or record expected
import static java.lang.System.*;
^
Main.java:60: error: class, interface, enum, or record expected
import static java.lang.Math.*;
^
6 errors
Language: C++

using System;
using System.Linq;
using System.Collections.Generic;

namespace AtCoder
{
	class Programs
	{
		static void Main ()
		{
			int k = int.Parse (Console.ReadLine ());
			if (k <= 9) {
				for (int i = 1; i < k; i++) {
					Console.WriteLine (i);
				}
			} else {
				for (int i = 1; i <= 9; i++) {
					Console.WriteLine (i);
					k--;
				}
				long Base = 10;
				long n = 2;
				while (k > 0) {
					if (n > 10) {
						Base *= 10;
						n = 2;
					}
					Console.WriteLine (n * Base - 1);
					n++;
					k--;
				}
			}
		}
	}
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Linq;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:34:10: error: expected ';' after class definition
   34 |         }
      |          ^
      |          ;
a.cc: In static member function 'static void AtCoder::Programs::Main()':
a.cc:11:33: error: expected primary-expression before 'int'
   11 |                         int k = int.Parse (Console.ReadLine ());
      |                                 ^~~
a.cc:14:41: error: 'Console' was not declared in this scope
   14 |                                         Console.WriteLine (i);
      |                                         ^~~~~~~
a.cc:18:41: error: 'Console' was not declared in this scope
   18 |                                         Console.WriteLine (i);
      |                                         ^~~~~~~
a.cc:28:41: error: 'Console' was not declared in this scope
   28 |                                         Console.WriteLine (n * Base - 1);
      |                                         ^~~~~~~
Language: C++

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

	int kazu = 0;
	int sita9 = 0;
	long long uesuuji = 0;

	while(kazu < K) {
		uesuuji++;
		long long hontou = uesuuji * pow(10, sita9);
		rep(i, sita9) hontou += 9 * pow(10, i);

		long long tugi = hontou + pow(10, sita9);
		if (snukecalc(hontou) > snukecalc(tugi)) {
			sita9++;

			rep(i, sita9) hontou -= 9 * pow(10, i);
			if (hontou <= 0) uesuuji = 0;
			else uesuuji = hontou / pow(10, sita9);

			continue;
		}
		else {
			cout << hontou << endl;
			kazu++;
		}
	}

	Would you please return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin >> K;
      |         ^~~
a.cc:12:46: error: 'pow' was not declared in this scope
   12 |                 long long hontou = uesuuji * pow(10, sita9);
      |                                              ^~~
a.cc:13:21: error: 'i' was not declared in this scope
   13 |                 rep(i, sita9) hontou += 9 * pow(10, i);
      |                     ^
a.cc:13:17: error: 'rep' was not declared in this scope
   13 |                 rep(i, sita9) hontou += 9 * pow(10, i);
      |                 ^~~
a.cc:16:21: error: 'snukecalc' was not declared in this scope
   16 |                 if (snukecalc(hontou) > snukecalc(tugi)) {
      |                     ^~~~~~~~~
a.cc:26:25: error: 'cout' was not declared in this scope
   26 |                         cout << hontou << endl;
      |                         ^~~~
a.cc:26:43: error: 'endl' was not declared in this scope
   26 |                         cout << hontou << endl;
      |                                           ^~~~
a.cc:31:9: error: 'Would' was not declared in this scope
   31 |         Would you please return 0;
      |         ^~~~~
Language: C

#include<stdio.h>
#include <math.h>
int main()
{
  long long int k,i,j,keta,num[1000000000000000];
  scanf("%lld",&k);
  for(i=1;i<=10;i++){
    num[i] = i;
  }
  for(i=11;i<1000000000000000;i++){
    num[i] = (10**(i/10))*(i%10+1)-1;
  }
  for(i=1;i<=k;i++){
    printf("%lld",num[i+((i+i/10)/10)]);
  }
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:11:18: error: invalid type argument of unary '*' (have 'long long int')
   11 |     num[i] = (10**(i/10))*(i%10+1)-1;
      |                  ^~~~~~~
Language: C++

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

int k;

void sunke(){
    long i,j,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;
    i = 0;
    j = 0;
    l = 9;
    m = 99;
    n = 999;
    o = 9999;
    p = 99999;
    q = 999999;
    r = 9999999;
    s = 99999999;
    t = 999999999;
    u = 9999999999;
    v = 99999999999;
    w = 999999999999;
    x = 9999999999999;
    y = 99999999999999;
    z = 999999999999999;
    while(i < k){
        if(i < 9){
            j++;
            printf("%ld\n", j);
        }else if(i >= 9 && i < 18){
            l += 10;
            printf("%ld\n", l);
        }else if(i >= 18 && i < 27){
            m += 100;
            printf("%ld\n", m);
        }else if(i >= 27 && i < 36){
            n += 1000;
            printf("%ld\n", n);
        }else if(i >= 36 && i < 45){
            o += 10000;
            printf("%ld\n", o);
        }else if(i >= 45 && i < 54){
            p += 100000;
            printf("%ld\n", p);
        }else if(i >= 54 && i < 63){
            q += 1000000;
            printf("%ld\n", q);
        }else if(i >= 63 && i < 72){
            r += 10000000;
            printf("%ld\n", r);
        }else if(i >= 72 && i < 81){
            s += 100000000;
            printf("%ld\n", s);
        }else if(i >= 81 && i < 90){
            t += 1000000000;
            printf("%ld\n", t);
        }else if(i >= 90 && i < 99){
            u += 10000000000;
            printf("%ld\n", u);
        }else if(i >= 99 && i < 108){
            v += 100000000000;
            printf("%ld\n", v);
        }else if(i >= 108 && i < 117){
            w += 1000000000000;
            printf("%ld\n", w);
        }else if(i >= 117 && i < 126){
            x += 10000000000000;
            printf("%ld\n", x);
        }else if(i >= 126 && i < 135){
            y += 100000000000000;
            printf("%ld\n", y);
        }
        if(i >= 135){
            printf("%ld\n", z);
        }
        i++;
    }
}

int main(){
    scanf("%d", &k);
    while(k < 1){
        scanf("%d", &k);
    }
    sunke(k);
    printf("\n");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:84:10: error: too many arguments to function 'void sunke()'
   84 |     sunke(k);
      |     ~~~~~^~~
a.cc:6:6: note: declared here
    6 | void sunke(){
      |      ^~~~~
Language: C++

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

int k;

void sunke(){
    long i,j,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;
    i = 0;
    j = 0;
    l = 9;
    m = 99;
    n = 999;
    o = 9999;
    p = 99999;
    q = 999999;
    r = 9999999;
    s = 99999999;
    t = 999999999;
    u = 9999999999;
    v = 99999999999;
    w = 999999999999;
    x = 9999999999999;
    y = 99999999999999;
    z = 999999999999999;
    while(i < k){
        if(i < 9){
            j++;
            printf("%ld\n", j);
        }else if(i >= 9 && i < 18){
            l += 10;
            printf("%ld\n", l);
        }else if(i >= 18 && i < 27){
            m += 100;
            printf("%ld\n", m);
        }else if(i >= 27 && i < 36){
            n += 1000;
            printf("%ld\n", n);
        }else if(i >= 36 && i < 45){
            o += 10000;
            printf("%ld\n", o);
        }else if(i >= 45 && i < 54){
            p += 100000;
            printf("%ld\n", p);
        }else if(i >= 54 && i < 63){
            q += 1000000;
            printf("%ld\n", q);
        }else if(i >= 63 && i < 72){
            r += 10000000;
            printf("%ld\n", r);
        }else if(i >= 72 && i < 81){
            s += 100000000;
            printf("%ld\n", s);
        }else if(i >= 81 && i < 90){
            t += 1000000000;
            printf("%ld\n", t);
        }else if(i >= 90 && i < 99){
            u += 10000000000;
            printf("%ld\n", u);
        }else if(i >= 99 && i < 108){
            v += 100000000000;
            printf("%ld\n", v);
        }else if(i >= 108 && i < 117){
            w += 1000000000000;
            printf("%ld\n", w);
        }else if(i >= 117 && i < 126){
            x += 10000000000000;
            printf("%ld\n", x);
        }else if(i >= 126 && i < 135){
            y += 100000000000000;
            printf("%ld\n", y);
        }
        if(i >= 135){
            printf("%ld\n", z);
        }
        i++;
    }
}

int main(void){
    scanf("%d", &k);
    while(k < 1){
        scanf("%d", &k);
        if(k > 0){
            break;
        }
    }
    sunke(k);
    printf("\n");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:87:10: error: too many arguments to function 'void sunke()'
   87 |     sunke(k);
      |     ~~~~~^~~
a.cc:6:6: note: declared here
    6 | void sunke(){
      |      ^~~~~
Language: C++

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

int k;

void sunke(){
    long i,j,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;
    i = 0;
    j = 0;
    l = 9;
    m = 99;
    n = 999;
    o = 9999;
    p = 99999;
    q = 999999;
    r = 9999999;
    s = 99999999;
    t = 999999999;
    u = 9999999999;
    v = 99999999999;
    w = 999999999999;
    x = 9999999999999;
    y = 99999999999999;
    z = 999999999999999;
    while(i < k){
        if(i < 9){
            j++;
            printf("%ld\n", j);
        }else if(i >= 9 && i < 18){
            l += 10;
            printf("%ld\n", l);
        }else if(i >= 18 && i < 27){
            m += 100;
            printf("%ld\n", m);
        }else if(i >= 27 && i < 36){
            n += 1000;
            printf("%ld\n", n);
        }else if(i >= 36 && i < 45){
            o += 10000;
            printf("%ld\n", o);
        }else if(i >= 45 && i < 54){
            p += 100000;
            printf("%ld\n", p);
        }else if(i >= 54 && i < 63){
            q += 1000000;
            printf("%ld\n", q);
        }else if(i >= 63 && i < 72){
            r += 10000000;
            printf("%ld\n", r);
        }else if(i >= 72 && i < 81){
            s += 100000000;
            printf("%ld\n", s);
        }else if(i >= 81 && i < 90){
            t += 1000000000;
            printf("%ld\n", t);
        }else if(i >= 90 && i < 99){
            u += 10000000000;
            printf("%ld\n", u);
        }else if(i >= 99 && i < 108){
            v += 100000000000;
            printf("%ld\n", v);
        }else if(i >= 108 && i < 117){
            w += 1000000000000;
            printf("%ld\n", w);
        }else if(i >= 117 && i < 126){
            x += 10000000000000;
            printf("%ld\n", x);
        }else if(i >= 126 && i < 135){
            y += 100000000000000;
            printf("%ld\n", y);
        }
        if(i >= 135){
            printf("%ld\n", z);
        }
        i++;
    }
}


int main(void){
    scanf("%d", &k);
    while(k < 1){
        scanf("%d", &k);
        if(k > 0){
            break;
        }
    }
    sunke(k);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:88:10: error: too many arguments to function 'void sunke()'
   88 |     sunke(k);
      |     ~~~~~^~~
a.cc:6:6: note: declared here
    6 | void sunke(){
      |      ^~~~~
Language: C++

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

long k;

void sunke(){
    long i,j,l;
    i = 0;
    j = 0;
    l = 9;
    while(i < k){
        if(i < 9){
            j++;
            printf("%ld\n", j);
        }else if(i >= 9 && i < 99999999999990){
            l += 10;
            printf("%ld\n", l);
        }else if(i >= 99999999999990){
            break;
        }
        i++;
    }
}


int main(void){
    scanf("%ld", &k);
    while(k < 1){
        scanf("%ld", &k);
        if(k > 0){
            break;
        }
    }
    sunke(k);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:10: error: too many arguments to function 'void sunke()'
   34 |     sunke(k);
      |     ~~~~~^~~
a.cc:6:6: note: declared here
    6 | void sunke(){
      |      ^~~~~
Language: C++

#pragma GCC optimize("O3")
#define first x
#define second y
#include <bits/stdc++.h>

using namespace std;

enum {MOD0 = 1000000000, MOD7 = 1000000007, MOD9 = 1000000009};
typedef unsigned short ushort;typedef unsigned int uint;typedef long long ll;typedef unsigned long long ull;
#ifndef CrafterKolyan
#define endl '\n'
#endif

void gen(int k) {
    ll cur = 1;
    ll pw10 = 1;
    while(k--) {
        cout << cur << endl;
        cur += pw10;
        if (cur >= 10 * pw10) {
            cur -= pw10;
            pw10 *= 10;
            cur += pw10;
        }
    }
    regen();
}

signed main() {
#ifndef CrafterKolyan
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
#endif
    int k;
    cin >> k;
    gen(k);
    return 0;
}


Compiler output:
a.cc: In function 'void gen(int)':
a.cc:26:5: error: 'regen' was not declared in this scope; did you mean 'gen'?
   26 |     regen();
      |     ^~~~~
      |     gen
Language: C++

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

double snuke(long int a);
int main (void)
{
   int k,i=0;
   long int t;
   long int *p;


   scanf("%d",&k);
   p=(long int*)malloc(sizeof(long int)*(k+5));

   while(i<=k){
   if(i<9){
      i++;
      *(p+i)=i;
      }

   else{
      t=((i+2)%10+1)*pow(10,(i+2)/10)-1;
      if(snuke(t)>=snuke(*(p+i)))
         i++;
      *(p+i)=t;
      }}

   for (i=1;i<=k;i++)
      printf("%ld\n",*(p+i));

   free(p);

   return 0;
}
   double snuke(long int a)
{
   long int b=a,c=0;

   while(b!=0){
      c+=b%10;
    e b/=10;
      }
   return (double)a/c;
}

Compiler output:
a.cc: In function 'double snuke(long int)':
a.cc:42:5: error: 'e' was not declared in this scope
   42 |     e b/=10;
      |     ^
Language: C++

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

int main (void)
{
   int k,i=0;
   long int *p;


   scanf("%d",&k);

   p=(long int*)malloc(sizeof(long int)*(k+1));
      if(p==NULL){
      printf("確保失敗\n");
      return -1;
      }

   while(i<k){
      i++;
   if(i<10)
      *(p+i)=i;
   else
      *(p+i)=((i+1)%10+1)*pow(10,(i+1)/10)-1;
      }

   for (i=1;i<=k;i++)
      printf("%ld\n",*(p+i));

   free(p);

   return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:4: error: 'scanf' was not declared in this scope
   10 |    scanf("%d",&k);
      |    ^~~~~
a.cc:14:7: error: 'printf' was not declared in this scope
   14 |       printf("確保失敗\n");
      |       ^~~~~~
a.cc:3:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    2 | #include <stdlib.h>
  +++ |+#include <cstdio>
    3 | 
a.cc:27:7: error: 'printf' was not declared in this scope
   27 |       printf("%ld\n",*(p+i));
      |       ^~~~~~
a.cc:27:7: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include<bit/stdc++.h>
using namespace std;
typedef long long ll;
ll n;
double f(ll x){
	ll sum=0,xx=x;
	while(xx){
		sum+=xx%10;
		xx/=10;
	}
	return x*1.0/sum;
}
int main(){
	cin >> n;
	num=1;
	base=1;
	for(int i=1;i<=n;i++){
		cout << num << endl;
		double ii=S(num+base);
		double jj=S(num+base*10);
		if(ii>jj)
            base*=10;
		num+=base;
	}
	return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
double s(long long n)
{
    long long x=n,y=0;
    
    while (x)
    {
        y+=x%10;
        x/=10;
    }
    return (double)n/y;
}
int main()
{
    long long K;
    long long n=1;
    long long x=1;
    cin>>k;
    for (int i = 0; i < K; i++)
    {
        cout<<n<<endl;
        if (s(n+x)>s(n+x*10))
            x*=10;
        n+=x;
    }
    return 0;
}


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


#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
#include <complex>

#define forin(i, f, t) for(auto i = f; i < t; i++)

using namespace std;
using ll = long long;


int main() {
    ll k;
    cin >> k;
    ll count = 0;
    ll n = 1;
    
    while (count < k) {
        cout << n << endl;
        count++;
        if (n < 9) {
            n++;
        } else {
            n += 10
        }
    }
    
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:26:20: error: expected ';' before '}' token
   26 |             n += 10
      |                    ^
      |                    ;
   27 |         }
      |         ~
Language: C++

#include <stdio.h>
#include <math.h>
int main (void)
{
   int k,i=9,i;
   int snuke[10000]={1,2,3,4,5,6,7,8,9}
   int *p=snuke;

   scanf("%d",&k);
 
   while(i<k){
      i++;   
      *(p+i+1)=((i+1)%10)*pow(10,i%10)-1;
      }

   for (i=1;i<=k;i++)
      printf("%d\n",p+i);

   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:14: error: redeclaration of 'int i'
    5 |    int k,i=9,i;
      |              ^
a.cc:5:10: note: 'int i' previously declared here
    5 |    int k,i=9,i;
      |          ^
a.cc:7:4: error: expected ',' or ';' before 'int'
    7 |    int *p=snuke;
      |    ^~~
a.cc:13:9: error: 'p' was not declared in this scope
   13 |       *(p+i+1)=((i+1)%10)*pow(10,i%10)-1;
      |         ^
a.cc:17:21: error: 'p' was not declared in this scope
   17 |       printf("%d\n",p+i);
      |                     ^
Language: C++

#include <stdio.h>
#include <math.h>
int main (void)
{
   int k,i=9,i;
   int snuke[10000]={1,2,3,4,5,6,7,8,9}
   int *p=snuke;

   scanf("%d",&k);
 
   while(i<k){
      i++;   
      *(p+i+1)=((i+1)%10)*pow(10,i%10)-1;
      }

   for (i=1;i<=k;i++)
      printf("%d\n",p+i);

   return 0;
}
~         

Compiler output:
a.cc: In function 'int main()':
a.cc:5:14: error: redeclaration of 'int i'
    5 |    int k,i=9,i;
      |              ^
a.cc:5:10: note: 'int i' previously declared here
    5 |    int k,i=9,i;
      |          ^
a.cc:7:4: error: expected ',' or ';' before 'int'
    7 |    int *p=snuke;
      |    ^~~
a.cc:13:9: error: 'p' was not declared in this scope
   13 |       *(p+i+1)=((i+1)%10)*pow(10,i%10)-1;
      |         ^
a.cc:17:21: error: 'p' was not declared in this scope
   17 |       printf("%d\n",p+i);
      |                     ^
a.cc: At global scope:
a.cc:21:2: error: expected class-name at end of input
   21 | ~
      |  ^
Language: C++

#include<stdio.h>
int main(){
  int k;
  long long a=0,i,t=1,p=1,c=0;
  scanf("%d",&k);
  for(i=0;i<k;i++){
    a+=t;
    c++;
    if(a/t==10){
      t=t*10;
      c-=9;
    }
    if(a>=10){
      if(a>p*c){
        a+=p*9;
        p=p*10;
        c+=9;
      }
    }
    printf("%lld\n",a);
  }
  return 0;


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

#include <bits/stdc++.h>
using namespace std;
int main()
{
 	int K;
	long int A, B, C, D, E, F;
	cin >> K;
	for (int i=1; i<=K; i++){
		A = i/9;
		B = i%9;
		C = 0;
		for (int m=0; m<A; m++){
			D = 1;
			for(int j=0;j<m;j++){
				D = D*10;
			}
			C += 9*D;
		}
		E =1;
		for(int j=0;j<A;j++){
				E = E*10;
			}
			
		F = B*E+C

		cout << F << endl;
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:26: error: expected ';' before 'cout'
   24 |                 F = B*E+C
      |                          ^
      |                          ;
   25 | 
   26 |                 cout << F << endl;
      |                 ~~~~
Language: Java

package AtCoder.AtCoderBeginnerContest101;

import java.util.Scanner;

public class question4 {
        public static void main(String[] args){
            Scanner sr = new Scanner(System.in);
            String inputLine = sr.nextLine();
            Integer K = Integer.valueOf(inputLine);
            int count = 0;
            int n = 1;
            while (count != K) {
                if (n > 30000){
                    break;
                }
                boolean sunukeCheckFlag = true;
                for (int m =n+1; m <=30000; m++){
                    if (nPerSn(n) <= nPerSn(m)){
                        continue;
                    }else{
                        sunukeCheckFlag = false;
                        break;
                    }
                }
                if (sunukeCheckFlag){
                    System.out.println(n);
                    count++;
                    n++;
                }else {
                    n++;
                }
            }
        }
        public static double nPerSn(int num){

            double Sn = 0;
            int cNum = num;
            while (cNum != 0){
                Sn += (cNum % 10);
                cNum /= 10;
            }
            return num / Sn;
        }
}


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

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <math.h>
int main(void) {
	long k, i = 0, j, cnt = 0, cnt1 = 0, m, ans3;
	double b, d, l, ans2, ans, c;
	scanf("%ld", &k);
	while(1) {
		if (i < 9) {
			i++;
		}
		else {
			i += 10;
		}
		ans=0;
		cnt = 0;
		c = i;
		for (j = 15; j >= 0; j--) {
			b = pow(10, j);
			if (c >= b) {
				ans += (int)c / (int)b;
				c -= (int)c / (int)b * b;
			}
		}
		ans = i / ans;
		for (l = i + 1; l < i+100000; l++) {
			ans2 = 0;
			d = l;
			for (j = 15; j >= 0; j--) {
				b = pow(10, j);
				if (d >= b) {
					ans2 += (int)d / (int)b;
					d -= (int)d / (int)b * b;
				}
			}
			ans2 = l / ans2;
			if (ans > ans2) {
				cnt = 1;
				break;
			}
		}
		if (cnt == 0) {
			printf("%ld\n", i);
			cnt1++;
			if (i == 99999) {
				//break;
			}
		}
		if (cnt1 == k) {
			break;
		}
	}

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

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <math.h>
int main(void) {
	long k, i = 0, j, cnt = 0, cnt1 = 0, m, ans3;
	double b, d, l, ans2, ans, c;
	scanf("%d", &k);
	while(1) {
		if (i < 9) {
			i++;
		}
		else {
			i += 10;
		}
		ans=0;
		cnt = 0;
		c = i;
		for (j = 15; j >= 0; j--) {
			b = pow(10, j);
			if (c >= b) {
				ans += (int)c / (int)b;
				c -= (int)c / (int)b * b;
			}
		}
		ans = i / ans;
		for (l = i + 1; l < i+100000; l++) {
			ans2 = 0;
			d = l;
			for (j = 15; j >= 0; j--) {
				b = pow(10, j);
				if (d >= b) {
					ans2 += (int)d / (int)b;
					d -= (int)d / (int)b * b;
				}
			}
			ans2 = l / ans2;
			if (ans > ans2) {
				cnt = 1;
				break;
			}
		}
		if (cnt == 0) {
			printf("%ld\n", i);
			cnt1++;
			if (i == 99999) {
				//break;
			}
		}
		if (cnt1 == k) {
			break;
		}
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:52:10: error: expected '}' at end of input
   52 |         }
      |          ^
a.cc:4:16: note: to match this '{'
    4 | int main(void) {
      |                ^
Language: Java

import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String K = scanner.next();
		long resultLong=0; 
		long number = 0;
		while(resultLong<K) {
			number++;
			long N=0;
			for(int i=0; i<K.length(); i++) {
				N = N + Integer.parseInt(s.charAt(i)+"");
			}
			if(number/N<=1) {
				System.out.println(number);
				resultLong++;
			}
		}

	}
}


Compiler output:
Main.java:12: error: bad operand types for binary operator '<'
		while(resultLong<K) {
		                ^
  first type:  long
  second type: String
Main.java:16: error: cannot find symbol
				N = N + Integer.parseInt(s.charAt(i)+"");
				                         ^
  symbol:   variable s
  location: class Main
2 errors