#include using namespace std; using ll=long long; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int ttt; cin>>ttt; auto f=[](ll x)->ll{ if(x==0)return 0; string s=to_string(x); int n=s.size(); vector dp(20); dp[0]=1; for(int i=0;i ndp(20); for(int j=0;j<20;j++){ int x=j/10,y=j%10; for(int d=0;d<10;d++){ if(d>l>>r; cout<