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 <bits/stdc++.h>
 using namespace std;
typedef long long int ll ;
typedef long double ld;

#define MOD 1000000007ll
#define all(v) v.begin() , v.end()
#define allr(v) v.rbegin(), v.rend()
#define for0(i,n) for(__typeof(n) i = 0; i < n ; i++) 
#define forab(i,a,b) for(__typeof(a) i = a ; i < b ; i++) 
#define forba(i,b,a) for(__typeof(a) i = b ; i > a ; i--) 
#define forc(c,it) for(__typeof(c.begin()) it = c.begin(); it != c.end(); it++)
#define pb     push_back
#define mp     make_pair
#define MAX 1005

int n;
ll ans;
vector<bool> isprime(MAX , true);
vector<int> primes;

void sieve()
{
	isprime[1] = false;
	int sq = sqrt(MAX) + 2;

	for(int i = 2 ; i < sq ; i++)
	{
		if(isprime[i])
		{
			for(int j = i*i ; j < MAX ; j = j + i)
				isprime[j] = false;
		}
	}

	for(int i = 2 ; i < MAX ; i++)
	{
		if(isprime[i])
			primes.pb(i);
	}
}

ll power(int n , int p)
{
	ll ans = 0;
	int x = p;

	while((n / x) > 0)
	{
		ans = ans + (n / x);
		x = x * p;
	}

	return ans;
}


int main(int argc, char const *argv[])
{
  scanf("%d" , &n);
  sieve();
  ans = 1;

  forc(primes , it)
  {
  	if(*it > n)
  		break;
  	ll x = power(n , *it);
  	ans = (ans * (x+1))%MOD;
  }

  printf("%lld" , ans);

  return 0;
}