Help me in solving F4 problem

My issue

please explain the approach to this problem

My code

#include <bits/stdc++.h>
using namespace std;

int main() {
	// your code goes here
    int t;
    cin>>t;
    while(t--)
    {
        long long num;
        cin>>num;
        
        vector<long long int>dp(100 , 0);
        dp[0]=0;
        dp[1]=1;
        for(int i=2;i<100;i++)
        {
            dp[i]=dp[i-1]*10+pow(10,i-1);
        }
        
    }
}

Problem Link: Se7en Practice Coding Problem