For this Question: Rahul wants to impress a girl named Tanu whom he loves very dearly. Rahul gets to know that Tanu is stuck on a programming problem. Help Rahul to solve the problem so that he can impress Tanu.
Here is the description of the problem:-
Choose an integer n and subtract the first digit of the number n from it i.e if n is 245 then subtract 2 from it making it 245-2 = 243.
Keep on doing this operation until the number becomes 0 (for eg. 25 requires 14 operations to reduce to 0)
You are given a number of operation limit X. You have to find the greatest integer such that you can reduce it to 0 using atmost X operations.The first line of input contains the number of test cases T. The next T line contains a single integer X denotes the number of operations.

Constraints:-
1 <= T <= 100
1 <= X <= 314329798For each test case in a new line print the maximum number that can be obtained by performing exactly X operations.Sample Input:-
3
2
20
29

Sample Output:-
10
45
100

Explanation:-
For test 2:- 45 is the largest number that will become 0 after exactly 20 operations., I have written this Solution Code: 
// author-Shivam gupta

#include <bits/stdc++.h>


using namespace std;

#define MEM(a, b) memset(a, (b), sizeof(a))

#define FOREACH(it, l) for (auto it = l.begin(); it != l.end(); it++)

#define IN(A, B, C) assert( B <= A && A <= C)

#define MP make_pair
#define FOR(i,a) for(int i=0;i<a;i++)

#define FOR1(i,j,a) for(int i=j;i<a;i++)

#define EB emplace_back

#define INF (int)1e9

#define EPS 1e-9

#define PI 3.1415926535897932384626433832795

#define MOD 1000000007

#define read(type) readInt<type>()
#define max1 10000001
#define out(x) cout<<x<<'\n'
#define out1(x) cout<<x<<" "
#define END cout<<'\n'
typedef long int li;

typedef unsigned long int uli;

typedef long long int ll;

typedef unsigned long long int  ull;


void fast(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
}

ll cal(ll n){
ll ans=0;
ll cnt=0;
ll p=n;
ll res=n;
while(res/10>0){
        cnt=0;
p=res;
        n=res;
        while(n/10>0){
    cnt++;
    n=n/10;}

ll x=lround(pow(10,cnt));
ll t=p/x;
ll y=p%x;
ans+=(y/t+1);
res=res-t*(y/t+1);
}
ans++;
return ans;


}

int main(){

    int t;
    cin>>t;
    while(t--){
ll x;
cin>>x;
ll i=1,j=1e9+50;

ll mid;
while(i<j){

    mid= (i+j)/2;
    ll ans=cal(mid);
    if(ans>x){j=mid;}
    else if(ans==x){break;}
        else{
            i=mid+1;
        }
}
for(ll k=mid-1;k<1e9+20;k++){
    if(cal(k)>x){out(k-1);break;}
}

}

}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?