I tried one of the questions from a CodeChef challange, while my code seems to be working perfectly(I’ve tried many different cases), after an online submission, it is being labelled as generating wrong answer.
The conundrum I endeavored to resolve via the same is ‘For a given positive integer N, what is the maximum sum of distinct numbers such that the Least Common Multiple of all these numbers is N.’
I could post the code here, but not sure whether I’m allowed to do so.
I’m baffled, please help!
Ps. I’m absolutely sure there’s nothing wrong with my code.