Submission #1247545
Source Code Expand
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner scan = new Scanner(System.in); int a = scan.nextInt(); int an[] = new int[a+1]; int ans=1; int c=0; for(int i=0;i<a+1;i++){ an[i]=1; } for(int i=2;i<=a;i++){ c=i; while(c%2 == 0){ c/=2; an[2]++; } for(int n=3;n*n<=c;n+=2){ while(c%n==0){ c /= n; an[n]++; } } if(c>1){ an[c]++; } } for(int i=0;i<an.length;i++){ ans = ans*an[i]; ans =ans%((int)Math.pow(10, 9)+7); } System.out.println(ans); } }
Submission Info
Submission Time | |
---|---|
Task | C - Factors of Factorial |
User | curi |
Language | Java8 (OpenJDK 1.8.0) |
Score | 0 |
Code Size | 664 Byte |
Status | WA |
Exec Time | 99 ms |
Memory | 21972 KB |
Judge Result
Set Name | Sample | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 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 | 92 ms | 19924 KB |
sample_02.txt | AC | 92 ms | 21588 KB |
sample_03.txt | WA | 94 ms | 19924 KB |
subtask_1_certain_01.txt | AC | 91 ms | 21972 KB |
subtask_1_certain_02.txt | AC | 93 ms | 21460 KB |
subtask_1_certain_03.txt | WA | 91 ms | 21844 KB |
subtask_1_certain_04.txt | WA | 92 ms | 20820 KB |
subtask_1_rand_01.txt | WA | 92 ms | 20564 KB |
subtask_1_rand_02.txt | WA | 91 ms | 19924 KB |
subtask_1_rand_03.txt | WA | 99 ms | 21204 KB |