Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * author: compounding
- * created: 2024-11-10 18:29:38
- **/
- #include <bits/stdc++.h>
- using namespace std;
- mt19937_64 RNG(chrono::steady_clock::now().time_since_epoch().count());
- #define NeedForSpeed \
- ios_base::sync_with_stdio(false); \
- cin.tie(NULL); \
- cout.tie(NULL);
- #define int long long
- #define all(x) (x).begin(), (x).end()
- typedef vector<int> vi;
- typedef vector<pair<int, int>> vpi;
- #define f first
- #define s second
- #define endl "\n"
- const int mod = 1000007;
- void solve()
- {
- int N;
- cin >> N;
- map<int, int> prime_exponents;
- for (int i = 2; i <= N; i++)
- {
- int num = i;
- for (int p = 2; p * p <= num; p++)
- {
- while (num % p == 0)
- {
- prime_exponents[p]++;
- num /= p;
- }
- }
- if (num > 1)
- {
- prime_exponents[num]++;
- }
- }
- int result = 1;
- for (auto &pe : prime_exponents)
- {
- int exponent = pe.second * 2;
- result = (result * (exponent + 1)) % mod;
- }
- cout << result << endl;
- }
- signed main()
- {
- NeedForSpeed;
- solve();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment