Submission #1442228
Source Code Expand
#include <cstdio> #define MOD 1000000007 #define MAXN 1000 #define ll long long int f[MAXN + 2]; int main() { int n; scanf("%d", &n); for (int i = 2; i <= n; i ++) { int k = i; for (int j = 2; k != 1; j ++) { while (k % j == 0) { f[j] ++; k /= j; } } } ll rez = 1; for (int i = 2; i <= n; i ++) rez = ( 1LL * rez * (f[i] + 1) ) % MOD; printf("%lld", rez); }
Submission Info
Submission Time | |
---|---|
Task | C - Factors of Factorial |
User | FizZ |
Language | C++14 (GCC 5.4.1) |
Score | 300 |
Code Size | 504 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 128 KB |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:11:20: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &n); ^
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 | 0 ms | 128 KB |
sample_02.txt | AC | 0 ms | 128 KB |
sample_03.txt | AC | 1 ms | 128 KB |
subtask_1_certain_01.txt | AC | 0 ms | 128 KB |
subtask_1_certain_02.txt | AC | 0 ms | 128 KB |
subtask_1_certain_03.txt | AC | 1 ms | 128 KB |
subtask_1_certain_04.txt | AC | 1 ms | 128 KB |
subtask_1_rand_01.txt | AC | 1 ms | 128 KB |
subtask_1_rand_02.txt | AC | 1 ms | 128 KB |
subtask_1_rand_03.txt | AC | 1 ms | 128 KB |