Dream_In_Night @ 2024-10-19 19:26:41
为什么会这样
//Name:Lazy_doghead
#include<bits/stdc++.h>
using namespace std;
long long a,b,ans,i;
int main(){
cin>>a>>b;
if(b==a)ans--;
b*=a;
for(i=1;i<=sqrt(b);i++){
if(b%i==0&&__gcd(i,b/i)==a)ans+=2;
}
cout<<ans;
return 0;
}
这是100的
//Name:Lazy_doghead
#include<bits/stdc++.h>
using namespace std;
long long a,b,ans,i;
int main(){
cin>>a>>b;
if(a==b)ans--;
a*=b;
for(i=1;i<=sqrt(a);i++){
if(a%i==0&&__gcd(i,a/i)==b)ans+=2;
}
cout<<ans;
return 0;
}
这是40的
我请问呢????
by BWsha2k @ 2024-10-19 19:46:18
@Dream_In_Night 题目里有明确说明,先输入的那个数
by Dream_In_Night @ 2024-10-19 19:47:32
@BWsha2k thx