'commit'
This commit is contained in:
26
TangDou/AcWing_TiGao/T5/YueShuGeShu/1294_2.cpp
Normal file
26
TangDou/AcWing_TiGao/T5/YueShuGeShu/1294_2.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user