Language: C++

#define mug 10000000111;
#define yo 10000000711;
#define kyo 1e-9;

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

using namespace std;
typedef long long sei;
typedef long double syo;
typedef vector<sei> vs;
typedef vector<syo> vy;
typedef vector<vs> vvs;
typedef vector<vy> vvy;
typedef pair<sei, sei> kS;
sei max(sei a, int b) {return max(a, sei(b));}
sei max(int a, sei b) {return max(sei(a), b);}

sei rui(sei x, sei n) {
    sei res = 1;
    while (n > 0) {
        if (n & 1) { res *= x;}
        x *= x;
        n >>= 1;
    }
    return res;
}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    sei N,kai=0;
    cin >> N;
    kan(j,1,N){
        if(rui(9,j) > N){
            if(j == 1) break;
            else{
                N = N - rui(9, j-1);
                kai += j-1;
                break;
            }
        }
    }
    kan(j,1,N){
        if(rui(6,j) > N){
            if (j == 1) break;
            else {
                N = N - rui(6,j-1);
                kai += j-1;
                break;
            }
        }
    }
    kai += N;
    cout << kai << endl;
    return 0;
}


Compiler output:
a.cc:11:9: error: 'vector' does not name a type
   11 | typedef vector<sei> vs;
      |         ^~~~~~
a.cc:12:9: error: 'vector' does not name a type
   12 | typedef vector<syo> vy;
      |         ^~~~~~
a.cc:13:9: error: 'vector' does not name a type
   13 | typedef vector<vs> vvs;
      |         ^~~~~~
a.cc:14:9: error: 'vector' does not name a type
   14 | typedef vector<vy> vvy;
      |         ^~~~~~
a.cc:15:9: error: 'pair' does not name a type
   15 | typedef pair<sei, sei> kS;
      |         ^~~~
a.cc: In function 'sei max(int, sei)':
a.cc:17:34: error: call of overloaded 'max(sei, sei&)' is ambiguous
   17 | sei max(int a, sei b) {return max(sei(a), b);}
      |                               ~~~^~~~~~~~~~~
a.cc:16:5: note: candidate: 'sei max(sei, int)'
   16 | sei max(sei a, int b) {return max(a, sei(b));}
      |     ^~~
a.cc:17:5: note: candidate: 'sei max(int, sei)'
   17 | sei max(int a, sei b) {return max(sei(a), b);}
      |     ^~~
a.cc: In function 'int main()':
a.cc:30:5: error: 'cin' was not declared in this scope
   30 |     cin.tie(0);
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #define mug 10000000111;
a.cc:31:5: error: 'ios' has not been declared
   31 |     ios::sync_with_stdio(false);
      |     ^~~
a.cc:34:9: error: 'j' was not declared in this scope
   34 |     kan(j,1,N){
      |         ^
a.cc:34:5: error: 'kan' was not declared in this scope; did you mean 'kai'?
   34 |     kan(j,1,N){
      |     ^~~
      |     kai
a.cc:55:5: error: 'cout' was not declared in this scope
   55 |     cout << kai << endl;
      |     ^~~~
a.cc:55:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:55:20: error: 'endl' was not declared in this scope
   55 |     cout << kai << endl;
      |                    ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #define mug 10000000111;