| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 71798 | sh25_ganzy | 最大公约数和最小公倍数问题 | C++ | Accepted | 0 MS | 244 KB | 434 | 2025-10-29 13:27:12 |
#include<bits/stdc++.h> using namespace std; long long gcd(long long a,long long b){ long long r=a%b; while(r!=0){ a=b; b=r; r=a%b; } return b; } int main(){ long long x,y,m; cin>>x>>y; m=x*y; int cnt=0; for(long long i=1;i*i<=m;i++){ if(m%i==0&&gcd(i,m/i)==x){ if(i!=m/i){ cnt+=2; }else{ cnt+=1; } } } cout<<cnt; return 0; }