题目链接:约数之和
#include <iostream>
#include <algorithm>
#include <unordered_map>
typedef long long LL;
using namespace std;
const int mod = 1e9 + 7;
int main()
{
int n;
cin >> n;
unordered_map<int, int> primes;
while(n--)
{
int x;
cin >> x;
for(int i = 2; i <= x / i; i++)
{
if(x % i == 0)
{
while(x % i == 0)
{
x /= i;
primes[i]++;
}
}
}
if(x > 1) primes[x] ++;
}
LL res = 1;
// 下面的也是公式
for(auto prime: primes)
{
int p = prime.first, a = prime.second;
LL t = 1;
while(a--) t = (t * p + 1) % mod;
res = res * t % mod;
}
cout << res << endl;
return 0;
}