1 条题解
-
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
信息
- ID
- 1141
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 10
- 标签
- (无)
- 递交数
- 6
- 已通过
- 2
- 上传者