SUMSUMS ...... the code seems fine but shows wrong answer


this is how i tried … it is working for the given example

Hey @imavneet
Line 59 make it res[i]=(res[i]+(T[i][j]*F[j])%mod)%mod;

If your doubt is resolved please mark it as closed.