1 solutions
-
0
#include <bits/stdc++.h> using namespace std; #define int long long const int N = 1e5 + 5; void solve(){ int x,y; cin >> x >> y; int ans = 0; for(int i = 1;i <= sqrt(x*y); i++){ if(x * y % i == 0 && gcd(i, x * y / i) == x) ans++; } cout << (x != y ? ans * 2 : ans * 2 -1) << endl; } signed main(){ ios::sync_with_stdio(0); cin.tie(0), cout.tie(0); int T = 1; // cin >> T; while(T--){ solve(); } return 0; }
- 1
Information
- ID
- 487
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 9
- Tags
- (None)
- # Submissions
- 92
- Accepted
- 9
- Uploaded By