C compiler used by codechef?

I tried to upload a code for the question in practice problems question on binary tournament. In my code in a function I was returning long in place of long long declared in function definition. The code ran fine on my computer but when I tried to upload the code the server showed me wrong answer. As soon as I changed the return value from long to long long the code was accepted.I would like to know which C compiler are you people using so that I could use that one instead of my present compiler(gcc version 4.7.3 ubuntu).

Codechef uses the gcc compiler , the same as yours.This is visible in the drop down list on the submissions page. You can choose either gcc 4.3.2 or gcc 4.8.1. The reason you were getting WA is because long is 32 bit (range upto 10^9) while the size of long long is 64 bit(range upto 10^18).Hence the WA.

2 Likes
//