Magic Square

Limits: 1s, 256 MB

A little boy Towhid is good at mathematics. He solves a lot of mathematical equation regularly.

This is a companion discussion topic for the original entry at

int main()
long long int i,T,n,a;
float b;
for(i=1; i<=T; i++){
b= ((((n*n)+1)1.00)/2);
printf(“Case %lld: %lld\n”,i,a);

What’s the problem with the code??? Showing Wrong Answer in the sample test case???Plz , help.,…

I think, The judge is going crazy here .In IDE the result comes 500000500,but in the judge, it becomes 500000512!!!
What is going on???

Simplify your equation and don’t use float.
It’s solvable without using any floating point number.
Maybe your IDE is smarter and handle many errors you code. :slight_smile: