https://ideone.com/HdFs7X here is my codeit gives a WA, although i tested the code in many cases and it gives a correct answer, so what is the corner case i didn't think of?thanks, ans here is the problem http://www.spoj.com/problems/CRAN04