欧几里得,gcdlcm=xy的应用
#include<cstdio>
#include<iostream>
using namespace std;
int gcd(int a,int b){
if(b==0) return a;
return gcd(b,a%b);
}
int cnt;
int main(){
int x,y;
scanf("%d%d",&x,&y);
for(int i=x;i<=y;i++){
int num=x*y/i;
if(num*i==x*y&&gcd(num,i)==x) cnt++;
}
printf("%d",cnt);
return 0;
}