ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1490. Fire Circle

Test 10
Posted by marks 25 Dec 2007 04:13
What's wrong with the test 10?

#include<stdio.h>

int main(){
long unsigned int x,y=0,z=0,q,p,r;

scanf("%lu",&r);

x=r;
q=r*r;

do{
p=q-y*y;
 while( x*x >= p && x >= 0 )x--;
z+=(x+1);
y++;
}while(y<r);

z*=4;
printf("%lu\n",z);

return 0;
}
Re: Test 10
Posted by IgorKoval(from Pskov) 20 Mar 2010 02:34
Используй long long  и/или long double