431778 | CodeChef

hi, I Have been trying to solve this problem from last few days but I am either getting TLE or wrong answer, can anyone help me out how to proceed with this kind of problem.

Just loop through a and b and directly compute total possibilities for c.
My Submission.

You can also loop through a alone, and compute the possibilities directly with a combination formula.

1 Like

Did the same man, but got the wrong answer.
here is my code:
https://www.codechef.com/viewsolution/35701568

Got it man thank, just made a silly mistake.

1 Like