fact er moddhe precalculated kore kore mod kore rakhbo. then easily nCr nPr ber korbo. somossa holo overflow hote pare vag korar age, so even answer int er moddhe holeo overflow hote pare.
From Pascal Triangle
DP use na korle 2^n complexity. DP use korte hobe.
Koivabe permute kora jabe?
niche common er songkhok factorial. like A 3 bar, D 2 bar ache. Upore total character.
A & B fixed at 2nd and 5th position.