In problem CLCO06 - http://www.codechef.com/problems/CLCO06 plzz tell me where my code is going wrong…I have tried many test cases manually and found correct but still wrong answer after submission
Here is the link to my solution- http://www.codechef.com/viewsolution/6836789
@akshayv3 your code is giving wrong answer for following cases:
Input:
3
666
0666
2
02
90812
010289
Your code output ( Check here ):
AC
AC
AC
Expected Correct Output:
WA
WA
WA
I think you didn’t read the problem statement correctly. Mr. Y’s answer is the smallest number M obtained after swapping digits in N. Also M should not contain any leading zeroes.
Hope you understood now
You can read the editorial here.