Here is My solution:https://www.codechef.com/viewsolution/18687071

For Loc may problem DSERIES

The constraints on N are upto 10^10 . So everytime you multiply by some factor of N you need to first take modulo . Specifically this line in your code lead to WA .

```
for(int i=0;i<=t;i++)
ans=(ans*(n+1+i))%M;
```

Have a look at the modified version of your solution.

Thankss

accept his answer bro !! Instead of thanks…

1 Like