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>

void PrimeTable(int);
void PrimeFuctrization(int);

int PrimeNumber[1000]={};
int Exponent[1000]={};

int main(){
	int N;
	int i,ans=1;
	
	scanf("%d",&N);
	PrimeTable(N);
	for(i=2;i<=N;i++){
		PrimeFuctrization(i);
	}
	for(i=0;i<=10;i++){
		if(Exponent[i]) ans=((ans*(Exponent[i]+1))%1000000007);
	}
	printf("%d\n",ans);;
	return 0;
}

void PrimeTable(int N){
	int i,j,k=0,flag;
	for(i=2;i<=N;i++){
		flag=0;
		for(j=2;j*j<=i;j++){
			if(!(i%j)){
				flag=1;
				break;
			}
		}
		if(!flag){
			PrimeNumber[k]=i;
			k++;
		}
	}
}

void PrimeFuctrization(int N){
	int i,j,last,power;
	for(i=0;i<=N;i++){
		if(!PrimeNumber[i]){
		last=i-1;
		break;
		}
	}
	for(i=0;i<=last;i++){
		if(!(N%PrimeNumber[i])){
			for(j=1;pow(PrimeNumber[i],j)<=N;j++){
				power=pow(PrimeNumber[i],j);
				if(!(N%power)){
					Exponent[i]++;
				}
			}
		}
	}
}