Finding the maximum LADDUS to redeem?

Could you please check why my code is failing to pass all the tests?
link: Solution

Problem: LADDU
Contest: LRNDSA01