xu_bo_yan @ 2024-08-26 16:17:42
#include<bits/stdc++.h>
using namespace std;
long long x,y,sum;
int main(){
cin>>x>>y;
for(long long i=x;i<=y;i++){
for(long long j=x;j<=y;j++){
if(__gcd(i,j)==x&&i*j/__gcd(i,j)==y) sum+=1;
}
}
cout<<sum;
return 0;
}
by MLE_Automaton @ 2024-08-26 16:22:51
试着使用数学方法:lcd*gcd=两数之积