Hi, I do not know why I'm getting WA in this problem even though all the test cases work. Would be much appreciated if someone could help!
Code : http://ideone.com/wyoWqB