For this Question: Alexa Loves to play with 0's and 2's. Among the positive integers that consist of 0's and 2's when written in base 10, he wanted to find the Kth smallest integer. Help him find that.Input is given from Standard Input in the following format:

KPrint the answer as an integer.
Here, the exact value must be printed as an integer, even if it is big. Unnecessary leading zeros such as 0523 are not allowed.<b>Sample Input 1</b>
3
<b>Sample Output 1</b>
22

<b>Sample Input 2</b>
11
<b>Sample Output 2</b>
2022

<b>Sample Input 3</b>
923423423420220108
<b>Sample Output 3</b>
220022020000202020002022022000002020002222002200002022002200

Explanation:
Positive numbers consisting of 0's and 2's are 2,20,22,200,202,220 and so on. Therefore,the 3rd smallest such number is 22., I have written this Solution Code: #include<bits/stdc++.h>
using namespace std;
string convert(long long x){
  string res;
  while(x>0){
    res.push_back('0'+(x%2));
    x/=2;
  }
  reverse(res.begin(),res.end());
  return res;
}
void output(string s){
  for(auto &nx : s){
    if(nx=='1'){cout << '2';}
    else{cout << '0';}
  }
  cout << '\n';
}
int main(){
  long long k;
  cin >> k;
  output(convert(k));
  return 0;
}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?