Submission #1066233


Source Code Expand

#include <stdio.h>
int main(void){
    int loop1,loop2;
    int n;
    scanf("%d",&n);
    //素因数分解
    if(n==1){
        printf("1\n");
        return 0;
    }
    int enz[1001]={0};
    for(loop1=2;loop1<=n;loop1++){
        int temp=loop1;
        int a=2;
        while(temp>=a*a){
            if(temp%a==0){
                enz[a]++;
                temp=temp/a;
            }else{
                a++;
            }
        }
        enz[temp]++;
    }
    long long int ans=1;
    for(loop1=2;loop1<1000;loop1++){
        if(enz[loop1]!=0){
            ans*=(enz[loop1]+1);
            ans%=1000000007;
        }
    }
    printf("%lld\n",ans);
    return 0;
}

Submission Info

Submission Time
Task C - Factors of Factorial
User infer496
Language C (GCC 5.4.1)
Score 300
Code Size 709 Byte
Status AC
Exec Time 1 ms
Memory 128 KB

Compile Error

./Main.c: In function ‘main’:
./Main.c:5:5: warning: ignoring return value of ‘scanf’, 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
AC × 3
AC × 7
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 1 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 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