I don’t know why my solution is getting WA. Although I have seen some of the successful submissions wherein same brute force approach has been applied. The same brute force method I have applied and got WA.
Link to my solution https://www.codechef.com/viewsolution/27628855
Link to Problem page
@rana_1234 this is because i didn’t introduced test case for a 2 digit number manually,the test cases were randomly generated hence there was no 2 digit number to filter the submission
@vipulsnp the test cases were changed before the contest because the formate of the test file had some issues…hence the new set of test cases weren’t that strong