(我的方法)(实际上暴力枚举q的因子也能过) acwing那道数论题的链接(直接看题解链接):AcWing 200. Hankson的趣味题 #include<bits/stdc++.h> using namespace std; #define endl "\n" #define int long long #define x first #define y second typedef pair<int,int>PII; const int N=45000,M=100; ...