'commit'
This commit is contained in:
30
TangDou/AcWing/Divisor/870.cpp
Normal file
30
TangDou/AcWing/Divisor/870.cpp
Normal file
@@ -0,0 +1,30 @@
|
||||
#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);
|
||||
}
|
||||
Reference in New Issue
Block a user