题目:
代码:
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
const int mod=1e9+7;
unordered_map<int,int>m;
int main(){
int n;
scanf("%d",&n);
while(n--){
int a;
scanf("%d",&a);
for(int i=2;i<=a/i;i++){
if(a%i==0){
while(a%i==0){
m[i]++;
a/=i;
}
}
}
if(a>1)m[a]++;
}
ll ans=1;
for(auto x:m){
int p=x.first,a=x.second;
ll res=1;
while(a--){
res=(res*p+1)%mod;
}
ans=(ans*res)%mod;
}
printf("%lld",ans);
return 0;
}