#include <bits/stdc++.h>
using namespace std;
int main(){
int t;
cin>>t;
while(t--){
int n;
cin>>n;
int nine = floor(((n*4)-n)/4);
int pos = 0;
int ans=0;
for(int i=0;i<nine;i++){
ans = ans + 9*pow(10,pos);
cout<<ans<<'\n';
pos++;
}
cout<<ans<<'\n';
}
return 0;
}
this is my code. I wrote this as a solution for cp problem. in there if i give the value of n ,
6
the answer is
9998
but it should be giving 9999. can anybody tell me what is wrong here?