Could anyone explain whats wrong with my solution for problem IALG1? I have tested for a lot of test cases and my solution appears to be similar to the accepted ones.
Link to problem: CodeChef: Practical coding for everyone
Link to my solution: CodeChef: Practical coding for everyone