4 solutions
-
-1
#include<bits/stdc++.h>
using namespace std;
const int P=1e9+7;
typedef long long LL;
int main()
{
int n; cin>>n; map<int,int> h; while(n--) { int x; cin>>x; for(int i=2;i<=x/i;i++) { while(x%i==0) { h[i]++; x/=i; } } if(x>1) h[x]++; } LL res=1; for(auto it:h) { int a=it.first,b=it.second; res=res*(1+b)%P; } cout<<res; return 0;
}
Information
- ID
- 188
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 5
- Tags
- # Submissions
- 65
- Accepted
- 12
- Uploaded By