I had submitted the same code for PRETNUM this time in C++ 4.3.2 and in C++ 4.8.1 and C++ 11. i was shocked to see that i had gotten AC for this code in C++ 4.3.2 and WA for the same code in C++ 4.8.1 and also in C++ 11.
Can somebody explain where the error might have occured and the difference in behaviour of these 2 versions of C++ ? Also which one should we use from a long term point of view ?
I don’t have an answer, but I experienced almost the same problem. I was getting SIGFPE floating point error on 4.8.1 but AC on 4.3.2. No divisions by zero however. I have no clue what the reason is, but it might be similar to yours.