TestNaOH @ 2024-02-15 15:29:22
int main() {
int x,y;
cin >> x >> y;
//y*x = P*Q
ll mul = x * y;
int cnt = 0;
for (ll i = x; i <= sqrt(mul); i+=x) {
if (mul % i == 0 && mul / i % x == 0 && gcd(mul / i, i) == x) {
cnt+=2;
}
}
if (x == y) cnt--;
cout << cnt;
}
删掉mul % i == 0就过不了了,为什么啊,这不是恒成立的吗,mul是x的倍数,i也是x的倍数,这明明是个永真式
by HIT_new_learner @ 2024-02-20 22:57:40
例:x==2,y==3;则mul==6; 但mul%4!=0;