Wrong answer in spoj
Hello Sufia, this works fine
you ignored the case when n=0.
Sufia this is getting accepted at spoj!
make sure you are selecting C++(gcc 8.3)
My bad! I was selecting g++ 14.x.x compiler.
If you could, please tell me what is the difference between the two. Isn’t g++ essentially gcc
Speaking of this specific case
No both are not same! its just a compiler stuff that g++ cannot link the resulting object files & will endup throwing errors like .o(.text+0x1b): undefined reference to std::` .