丢番图#include using namespace std;int main () { long long n; cin >> n; unordered_map primes; for (long long i = 2; i <= n / i; i ++) while (n % i == 0) { primes[i] ++; n /= i; } if (n > 1) primes[n] ++; long long res = 1; for (auto t : primes) { res = res * (t.second*2 + 1);//n^2的因子个数 } cout << ((res+1)>>1);//求这些因数能组成多少对,加1是因为可以相等x<=y return 0;}
暂时没有评论,来抢沙发吧~