Submission #8000879
Source Code Expand
/*zhenhao*/ #include <bits/stdc++.h> using namespace std; #define xx first #define yy second typedef pair<int, int> pii; typedef long long LL; const int N = 1100; int vis[N]; void div(int x) { for (int i = 2; i * i <= x; i++) if (x % i == 0) { while (x % i == 0) { vis[i]++; x /= i; } } if (x > 1) vis[x]++; } const int mod = 1e9 + 7; int main() { int n; cin >> n; for (int i = 1; i <= n; i++) div(i); LL res = 1; for (int i = 2; i < N; i++) (res *= (vis[i] + 1)) %= mod; cout << res << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - Factors of Factorial |
User | alter0sss |
Language | C++14 (GCC 5.4.1) |
Score | 300 |
Code Size | 703 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 256 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 300 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt, sample_03.txt |
All | sample_01.txt, sample_02.txt, sample_03.txt, subtask_1_certain_01.txt, subtask_1_certain_02.txt, subtask_1_certain_03.txt, subtask_1_certain_04.txt, subtask_1_rand_01.txt, subtask_1_rand_02.txt, subtask_1_rand_03.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample_01.txt | AC | 1 ms | 256 KB |
sample_02.txt | AC | 1 ms | 256 KB |
sample_03.txt | AC | 1 ms | 256 KB |
subtask_1_certain_01.txt | AC | 1 ms | 256 KB |
subtask_1_certain_02.txt | AC | 1 ms | 256 KB |
subtask_1_certain_03.txt | AC | 1 ms | 256 KB |
subtask_1_certain_04.txt | AC | 1 ms | 256 KB |
subtask_1_rand_01.txt | AC | 1 ms | 256 KB |
subtask_1_rand_02.txt | AC | 1 ms | 256 KB |
subtask_1_rand_03.txt | AC | 1 ms | 256 KB |