代码
#include <iostream>
#include <stdio.h>
using namespace std;
int main()
{
int a,b;
scanf("%d%d",&a,&b);
int ans_=0;
for(int i=a;i<=b;i++)
{
int ans=1;
for(int j=2;j*j<=i;j++)
{
if(i%j==0)
ans+=j+i/j;
}
if(ans<=i)continue;
int ans2=1;
for(int j=2;j*j<=ans;j++)
{
if(ans%j==0)
ans2+=j+ans/j;
}
if(ans2==i)
ans_+=1;
}
printf("%d",ans_);
}