Link to my code is: https://ideone.com/tdKvwO
I want to ask what does Running (21) means? and If it is Wrong Answer after verifying all the before test cases then how to know on which it fails?
Running (21) means it is running the 21st test case. This does not mean that the first 20 test cases have passed though, as SPOJ runs all test cases before checking the output.
You cannot tell which test cases fail.