I can't frnd the error in code

I am computing n-1 C k-1 but it is giving wrong answer.

Share your code with me so that i can debug it for you. Share via ide.codingblocks.com , if you don’t know how to do that, Let me know will help you with the same.

https://ide.codingblocks.com/s/408368 check this

Please reply , check the code given in above link

Have asked mentor to reply as your code is in python. Please be patient, will try to resolve your doubt today only. Till then please proceed with your course.

Hello @aakash47, I have corrected your code and you can check this out, it is passing all the cases. https://ide.codingblocks.com/s/410474
When we are sure that the integers will divide properly then we can use // instead of / for the division.
You can refer to this. https://stackoverflow.com/questions/7561498/python-3-gives-wrong-output-when-dividing-two-large-numbers

Here

(5574440580220512*57)/(32) = 9929472283517787
but in python, we are getting some floating error due to which we are getting 9929472283517788

I hope you will understand the issue.
Pls, feel free to ask if there is any confusion.
Thanks :slight_smile:

Thanks :slight_smile: @A17LP0026 …

Thanks for the help :slight_smile:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

No, there will be no deduction in the score until and unless you unlock for the editorial or for the test cases.

Are you getting score for that or not ? If you are getting then it doesn’t matter.