You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
579 B
30 lines
579 B
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
#define int long long
|
|
typedef pair<int, int> PII;
|
|
|
|
const int N = 110;
|
|
const int MOD = 1e9 + 7;
|
|
|
|
unordered_map<int, int> primes;
|
|
int n;
|
|
|
|
signed main() {
|
|
cin >> n;
|
|
while (n--) {
|
|
int x;
|
|
cin >> x;
|
|
for (int i = 2; i <= x / i; i++)
|
|
while (x % i == 0) {
|
|
x /= i;
|
|
primes[i]++;
|
|
}
|
|
if (x > 1) primes[x]++;
|
|
}
|
|
|
|
int res = 1;
|
|
for (auto p : primes) res = res * (p.second + 1) % MOD;
|
|
|
|
printf("%lld\n", res);
|
|
} |