题目
解题核心:
分解质因数,每个质因数的次方+1的累乘积就是ans
code
#include <iostream>
#include<algorithm>
#include<unordered_map>
//# #include<>
typedef long long LL;
const int N = 110, MOD = 1e9 + 7;using namespace std;
int main()
{unordered_map<int, int> map;LL n = 1200000;// 分解质因数for(int i = 2; i <= n / i; i ++)while(n % i == 0){n /= i;map[i] ++;}if(n > 1) map[n] ++;LL res = 1;for (auto prim: map)res = res * (prim.second + 1) % MOD;cout << res;return 0;
}