1029

题目总版

我觉得你要开long long
by 小粉兔 @ 2019-02-15 11:47:23


没看明白 ```cpp #include<bits/stdc++.h> using namespace std; long long tot,x,y,p,q,mul,ml,a,b; int main(){ cin>>x>>y; p=x,q=y,mul=x*y; for(int i=1;;++i){ p=x*i,q=mul/p; a=__gcd(p,q); if(p>y) break; if(a!=x||mul%p!=0||mul%q!=0) continue; ++tot; } cout<<tot; return 0; } ```
by 康师傅 @ 2019-02-15 11:47:32


为何此贴要发到**题目总版**
by wwlw @ 2019-02-15 11:48:34


@[wwlw](/space/show?uid=83337) w要往哪里放??
by AFoxOfZzr @ 2019-02-15 20:14:22


@[AFoxOfZzr](/space/show?uid=118086) ~~当然是灌水区啊~~
by wwlw @ 2019-02-15 20:19:36


@[小粉兔](/space/show?uid=10703) w这个没开long long过了; 但是为什么不用特判此数是不是平方数然后ans-1呢
by AFoxOfZzr @ 2019-02-15 20:40:42


|