#include <stdio.h>
#include <stdlib.h>
int compare(const void *a,const void *b){
return (*(int*)a-*(int*)b);
}
int main() {
int a,b,o=1,l,p=0,q=0,t=0;
int x[2000];
int count[10000]={0},d[10000];
scanf("%d %d",&a,&b);
for(int i=a;i<=b;i++)
{
o=o*i;
}
l=o;
for(int i=a;i<=b;i++)
{
o=o/i;
for(int j=1;j<=i;j++)
{
x[q]=o*j;
q++;
}
o=l;
}
qsort(x,q,sizeof(int), compare);
for(int i=0;i<q-1;i++)
{
if(x[i]==x[i+1])
{
t++;
}
}
printf("%d",t);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: