ACM (UVa) : 11461


#include
#include

int main ()
{
long A, B, I, J, Count;

while (scanf(“%ld %ld”, &A, &B)){

if (A==0 && B==0)
break;

Count = 0;

for (I=1; pow (I, 2) <= B; I++) Count++; for (I=1; pow (I, 2) < A; I++) Count--; printf("%ld\n", Count); } return 0; } [/sourcecode]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s