YSchencheche @ 2023-12-07 20:54:02
#include<bits/stdc++.h>
#define nb(i,j,k) for(int i=j;i<=k;i++)
#define Nb(i,j,k) for(int i=j;i>=k;i--)
using namespace std;
int main()
{
int x,y,c=0,j;
scanf("%d%d",&x,&y);
nb(i,1,sqrt(x*y)
{
j=x*y/i;
if(j*i!=x*y || __gcd(i,j)!=x)
{
continue;
}
c++;
}
c*=2;
printf("%d",c);
return 0;
}
蒟蒻求助 为什么错呀
by Sqj147 @ 2024-02-07 18:37:32
如果 x0 == y0 呢?