模板:
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
using namespace std;
const int maxn = 1e5+10;
typedef long long LL;
const LL MOD = 998244353;
LL fac[maxn],inv[maxn];
LL POW(LL x,LL y){
LL res = 1LL;
while(y){
if(y&1LL) res = res*x%MOD;
x = x*x%MOD;
y>>=1LL;
}
return res;
}
void Init(){
fac[0] = inv[0] = 1LL;
for(int i=1;i<maxn;i++){
fac[i] = fac[i-1]*i%MOD;
inv[i] = POW(fac[i],MOD-2);
}
}
LL C(LL n,LL m){
return fac[n]*inv[n-m]%MOD*inv[m]%MOD;
}
int main(void){
Init();
for(LL i=1;i<=12;i++){
for(LL j=1;j<=i;j++){
printf("C(%lld,%lld) = %lld\n",i,j,C(i,j));
}
}
return 0;
}