As limits of R is [1,10^9], so even (S+2D)*R^2 has the chance of integer over flow if R is 10^9 (long long int in c). So do we have to do (% 1000000007) each time? And is it required to print an empty line after each output ?
↧
As limits of R is [1,10^9], so even (S+2D)*R^2 has the chance of integer over flow if R is 10^9 (long long int in c). So do we have to do (% 1000000007) each time? And is it required to print an empty line after each output ?