Combinatorics related exercises
1.Count The Blocks
Portal Title: the ECR 84 E
meaning of the questions: Given n, find from 0 to 10 ^ n-1 is the length of all i (i from 1 to n) number. N are each the number of digits (if less than the leading 0)
The following codes on
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=2e5+5,mod=998244353;
ll f[N],n;
int main(){
cin>>n;
f[0]=1;
for(int i=1;i<=n;i++) f[i]=(f[i-1]*10)%mod;
for(int i=1;i<n;i++) printf("%lld ",(18*f[n-i]+81*f[n-i-1]*(n-i-1))%mod);
puts("10");
return 0;
}