UVA 11461

Solve in C:

#include<stdio.h>
#include <math.h>
int main()
{

    int i,count=0,f,g,a,b;
    while(scanf("%d%d",&a,&b)!=EOF)
    {
        if(a==0&&b==0)
        break;
        count=0;
        for(i=a;i<=b;i++)
        {
            f=sqrt(i);

            if(f*f==i)
            count++;
        }
        printf("%d\n",count);
    }
    return 0;

}

No comments

Most View Post

Recent post

RESTful APIs with CRUD Operations in Laravel 12| (2025)

  RESTful APIs serve as the foundation of modern web development. They follow a set of rules called Representational State Transfer (REST) t...

Powered by Blogger.