stylus @ 2024-10-14 19:13:05
可能为0!\ 配上样例&my满分代码:\ 4.in:
12 4096
4.out:
0
在洛谷,\
享受CopyCoding的快乐
#include<bits/stdc++.h>
#define int long long
using namespace std;
void read(int &x){
x=0;char c=getchar();bool f=0;
while(c<48||c>'9'){
if(c=='-')f=1;
c=getchar();
}do{x=(x<<3)+(x<<1)+(c^48),c=getchar();}while(c>=48&&c<='9');
x=f?-x:x;
}
int x,y,a;
signed main(){
read(x),read(y);
if(y%x){cout<<0;return 0;}
for(int i=1;i<=y/x;i++){
if(y/x%i==0&&__gcd(i,y/x/i)==1)a++;
}cout<<a;
return 0;
}
by oubowen2024 @ 2024-10-14 19:48:52
谢谢