Language: C++

x#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;
typedef pair<int, int> P;
typedef pair<llong, llong> LP;
typedef pair<int, P> PP;
typedef pair<llong, LP> LPP;

int dy[]={0, 0, 1, -1, 0};
int dx[]={1, -1, 0, 0, 0};

unsigned GetDigit(unsigned num){
    return to_string(num).length();
}

int GetSum(int N){
  string S=to_string(N);
  int Sum=0;
  for(auto itr=S.begin();itr!=S.end();++itr){
    Sum += *itr-'0';
  }
  return Sum;
}

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

  int K;
  cin >> K;

  int A[1000000];
  for(int i=1;;++i){
    if(K==0) break;
    int dig=GetDigit(i);
    int tnum=i/((int)pow(10,dig-1));
    if(i<10) cout << i << endl;
    else if(i%10==0) {
      A[i%10]=((((int)pow(10,dig-1))*(tnum+1)+9)/GetSum(((int)pow(10,dig-1))*(tnum+1)+9));
      if((i/GetSum(i))<A[i%10]) cout << i << endl;
    }
    else if(tnum==9){
      if((i/GetSum(i))<((((int)pow(10,dig))+9)/GetSum(((int)pow(10,dig))+9))) cout << i << endl;
    }
    else {
      if((i/GetSum(i))<A[i%10]) cout << i << endl;
    }
  }
}


Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | x#include <bits/stdc++.h>
      |  ^
a.cc:1:1: error: 'x' does not name a type
    1 | x#include <bits/stdc++.h>
      | ^
a.cc:12:9: error: 'pair' does not name a type
   12 | typedef pair<int, int> P;
      |         ^~~~
a.cc:13:9: error: 'pair' does not name a type
   13 | typedef pair<llong, llong> LP;
      |         ^~~~
a.cc:14:9: error: 'pair' does not name a type
   14 | typedef pair<int, P> PP;
      |         ^~~~
a.cc:15:9: error: 'pair' does not name a type
   15 | typedef pair<llong, LP> LPP;
      |         ^~~~
a.cc: In function 'unsigned int GetDigit(unsigned int)':
a.cc:21:12: error: 'to_string' was not declared in this scope
   21 |     return to_string(num).length();
      |            ^~~~~~~~~
a.cc: In function 'int GetSum(int)':
a.cc:25:3: error: 'string' was not declared in this scope
   25 |   string S=to_string(N);
      |   ^~~~~~
a.cc:27:16: error: 'S' was not declared in this scope
   27 |   for(auto itr=S.begin();itr!=S.end();++itr){
      |                ^
a.cc: In function 'int main()':
a.cc:34:3: error: 'cin' was not declared in this scope
   34 |   cin.tie(0);
      |   ^~~
a.cc:35:3: error: 'ios' has not been declared
   35 |   ios::sync_with_stdio(false);
      |   ^~~
a.cc:44:22: error: 'pow' was not declared in this scope
   44 |     int tnum=i/((int)pow(10,dig-1));
      |                      ^~~
a.cc:45:14: error: 'cout' was not declared in this scope
   45 |     if(i<10) cout << i << endl;
      |              ^~~~
a.cc:45:27: error: 'endl' was not declared in this scope
   45 |     if(i<10) cout << i << endl;
      |                           ^~~~
a.cc:48:33: error: 'cout' was not declared in this scope
   48 |       if((i/GetSum(i))<A[i%10]) cout << i << endl;
      |                                 ^~~~
a.cc:48:46: error: 'endl' was not declared in this scope
   48 |       if((i/GetSum(i))<A[i%10]) cout << i << endl;
      |                                              ^~~~
a.cc:51:79: error: 'cout' was not declared in this scope
   51 |       if((i/GetSum(i))<((((int)pow(10,dig))+9)/GetSum(((int)pow(10,dig))+9))) cout << i << endl;
      |                                                                               ^~~~
a.cc:51:92: error: 'endl' was not declared in this scope
   51 |       if((i/GetSum(i))<((((int)pow(10,dig))+9)/GetSum(((int)pow(10,dig))+9))) cout << i << endl;
      |                                                                                            ^~~~
a.cc:54:33: error: 'cout' was not declared in this scope
   54 |       if((i/GetSum(i))<A[i%10]) cout << i << endl;
      |                                 ^~~~
a.cc:54:46: error: 'endl' was not declared in this scope
   54 |       if((i/GetSum(i))<A[i%10]) cout << i << endl;
      |                                              ^~~~