Submission #1069299
Source Code Expand
#include<cstdio> #include<algorithm> #include<functional> using namespace std; int main(void) { int n,i,j,x[1000],a,b; long long cnt; scanf("%d",&n); for(i=1;i<1000;i++) x[i]=0; for(i=2;i<=n;i++) { a=2; b=i; while(b>1) { if(b%a==0) { x[a]++; b/=a; } else a++; } } cnt=1; for(i=1;i<1000;i++) { if(x[i]!=0) { cnt=cnt*(x[i]+1); cnt%=1000000007; } } printf("%lld\n",cnt); return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - Factors of Factorial |
User | laf2 |
Language | C++14 (GCC 5.4.1) |
Score | 300 |
Code Size | 452 Byte |
Status | AC |
Exec Time | 2 ms |
Memory | 128 KB |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:9:16: 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 | 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 | 128 KB |
sample_02.txt | AC | 1 ms | 128 KB |
sample_03.txt | AC | 2 ms | 128 KB |
subtask_1_certain_01.txt | AC | 1 ms | 128 KB |
subtask_1_certain_02.txt | AC | 1 ms | 128 KB |
subtask_1_certain_03.txt | AC | 2 ms | 128 KB |
subtask_1_certain_04.txt | AC | 2 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 |