标签:col stream cond pac -- class typedef return a*
#include<iostream> #include<algorithm> #include<unordered_map> using namespace std; typedef long long LL; const int N=1e9+7; int n; int main(void){ cin>>n; unordered_map<int,int>prime; for(int i=0,a;i<n;i++){ cin>>a; for(int i=2;i<=a/i;i++) while(a%i==0){ a/=i; prime[i]++; } if(a>1)prime[a]++; } LL res=1; for(auto x:prime){ LL t=1; int a=x.first,b=x.second; while(b--)t=(a*t+1)%N; res=res*t%N; } cout<<res%N<<endl; return 0; }
标签:col stream cond pac -- class typedef return a*
原文地址:https://www.cnblogs.com/programyang/p/11221489.html