题目:
代码:
#include<iostream>
#include<algorithm>
#include<unordered_map>
using namespace std;
typedef long long LL;
const int mod=1e9+7;
int main(){
int n;
cin>>n;
unordered_map<int,int> primes;
while(n--){
int a;
cin>>a;
for(int i=2;i<=a/i;i++){
while(a%i==0){
a/=i;
primes[i]++;
}
}
if(a>1) primes[a]++;
}
LL res=1;
for(auto prime:primes){
int d=prime.first,z=prime.second; //d表示底数,z表示指数
//约数之和公式
LL t=1;
while(z--) t=(t*d+1)%mod;
res=res*t%mod;
}
cout<<res<<endl;
return 0;
}