We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
My code fails for the same particular input inside more than one test case, which I managed to identify after unlocking the test case. It is the last input in test case 2, and last but 3rd input in test case 6. I do not want to spoil it for other participants, so I am reluctant to give the input here, but the admins should know which one I'm referring. The given value of K in the test case is 294, while my code is returning 479. It works for all the other cases, except this, so I am not sure what am I getting wrong.
Count Luck
You are viewing a single comment's thread. Return to all comments →
My code fails for the same particular input inside more than one test case, which I managed to identify after unlocking the test case. It is the last input in test case 2, and last but 3rd input in test case 6. I do not want to spoil it for other participants, so I am reluctant to give the input here, but the admins should know which one I'm referring. The given value of K in the test case is 294, while my code is returning 479. It works for all the other cases, except this, so I am not sure what am I getting wrong.
My submission is the following: https://www.hackerrank.com/challenges/count-luck/submissions/code/11456984
Can anyone help me out please?
EDIT: got it, I'm counting all the branches, instead of the only path which leads to the exit. That is a good test case.