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++14 (GCC 5.4.1) (judge verdict: Accepted)

#include <cstdlib>
#include <cmath>
#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <cstring>
#include <string>
#include <map>
#define MOD 1000000007
#define INF 1000000000
typedef long long ll;
using namespace std;
typedef pair<int,int> P;
// 9/3
//約数を返す関数
#define N 1001
int is_prime[N+1];
int sum_prime[N+1];
void erasto(){
    for(int x=0;x<N;x++)is_prime[x]=1;
    is_prime[0]=0;
    is_prime[1]=0;
    for(int x=2;x*x<=N;x++){
        if(is_prime[x]!=0){
            for(int y=x*x;y<N;y+=x){
                is_prime[y]=0;
            }
        }
    }
    for(int x=1;x<=N;x++){
        sum_prime[x]=sum_prime[x-1]+is_prime[x];
        
    }
}

int main(void){
    int n;
    cin>>n;
    erasto();
    ll ans=1;
    for(int i=1;i<=n;i++){
        if(is_prime[i]){
            int tmp=0;
            for(int k=1;pow(i,k)<=n;k++){
                tmp+=n/pow(i,k);
            }
            //cout<<i<<" "<<tmp<<endl;
            //if(tmp==0)cout<<i<<endl;
            ans*=(tmp+1);
            ans%=MOD;
            //cout<<i<<" "<<ans<<endl;
        }
    }
    cout<<ans<<endl;
    return 0;
}