Problem:
Score : 300 points

Problem Statement

You are given an integer N.
Find the number of the positive divisors of N!, modulo 10^9+7.

Constraints

1≤N≤10^3

Input

The input is given from Standard Input in the following format:

N

Output

Print the number of the positive divisors of N!, modulo 10^9+7.

Sample Input 1

3

Sample Output 1

4

There are four divisors of 3! =6: 1, 2, 3 and 6. Thus, the output should be 4.

Sample Input 2

6

Sample Output 2

30

Sample Input 3

1000

Sample Output 3

972926972

Solution in C (GCC 5.4.1) (judge verdict: Wrong Answer)

#include <stdio.h>
#include <math.h>
int primecheck(int n);
int main(void)
{
    int n,i,k=3;
    scanf("%d", &n);
    int prime[500];
    for(i=0; i<500; i++) prime[n]=0;
    prime[0]=2;
    prime[1]=3;
    prime[2]=5;
    for(i=7; i<=1000; i++)
    {
        if(primecheck(i)==1)
        {
            prime[k]=i;
            k++;
        }
    }
    long long int num[k];
    for(i=0; i<k; i++) num[i]=0;
    for(int j=1; j<=n; j++)
    {
        int temp=j;
        for(i=0; i<k; i++)
        {
            while(temp%prime[i]==0)
            {
                temp=temp/prime[i];
                num[i]++;
            }
        }
    }
    long long int ans=1,ret,big=1;
    for(i=0; i<k; i++)
    {
        ans*=(num[i]+1);
    }
    for(i=0; i<9; i++) big*=10;
    big+=7;
    ret=ans%big;
    printf("%lld", ret);
    return 0;
}
int primecheck(int n)
{
    if(n%2==0) return 0;
    else if(n%3==0) return 0;
    else if(n%5==0) return 0;
    else
    {
        for(int i=7; i<n; i+=2)
        {
            if(n%i==0) return 0;
        }
    }
    return 1;
}