#include<iostream>
#include<unordered_map>;
using namespace std;
typedef long long int LLI;
const int MOD=1e9+7;
int n;
int main(){
scanf("%d",&n);
unordered_map<int,int> primes;
while(n--){
int x;
scanf("%d",&x);
for(int i=2;i<=x/i;i++){
while(x%i==0){
x/=i;
primes[i]++;
}
}
if(x>1) primes[x]++;
}
LLI res= 1;
for(auto t:primes){
int p=t.first,a=t.second;
LLI sum = 1;
while(a--) sum = (sum*p+1) % MOD;
res = (res * sum) % MOD;
}
printf("%lld",res);
}
数论试除法求解约数之和(c++实现)
最新推荐文章于 2024-04-18 13:58:49 发布