Everytime i try to submit my C++ code i had this wrong answer and sometimes compilation time error or another. and on other compiler the code runs really very well.
I think, that the problem is your code, not compilers.