#include <stdio.h>
int gcd(int a,int b)
{
    while(b!=0)
    {
        int r=a%b;
        a=b;
        b=r;
    }
    return a;
}

int main() {
    int a,b,g,o=0;
    int x[1999][199]={0};
    scanf("%d %d",&a,&b);
    for(int i=a;i<=b;i++)
    {
        for(int j=1;j<=i;j++)
        {
            g=gcd(i,j);
            if(x[j/g][i/g]!=1)
            {
                x[j/g][i/g]=1;
                o++;
            }
        }
    }
    printf("%d",o);
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: