Not able to pass first 2 test cases

am I calculating the value of C(n,r) wrong?

Hi @gargayush34
Kindly share your code ide so that i can have a look.

Hi @gargayush34
Your code is giving wrong output for input 29 and 31.
For 29 it is giving output as 1002242216651367 but the correct output should be 1002242216651368
For 31 it is giving output as 14544636039226906 but the correct output should be 14544636039226909

Kindly have a look on these test cases and try to think why they are getting wrong output.