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.
27 lines
561 B
27 lines
561 B
#include <bits/stdc++.h>
|
|
using namespace std;
|
|
#define int long long
|
|
#define endl '\n'
|
|
const int MOD = 1e9 + 7;
|
|
// 2112 ms
|
|
bool prime(int x) {
|
|
if (x == 2) return 1;
|
|
for (int i = 2; i * i <= x; i++)
|
|
if (x % i == 0) return 0;
|
|
return 1;
|
|
}
|
|
signed main() {
|
|
int n;
|
|
cin >> n;
|
|
|
|
int res = 1;
|
|
for (int i = 2; i <= n; i++) {
|
|
if (!prime(i)) continue;
|
|
int x = i;
|
|
int s = 0;
|
|
while (x <= n) s += n / x, x *= i;
|
|
res = res * (2 * s + 1) % MOD;
|
|
}
|
|
cout << res << endl;
|
|
}
|