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 <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <vector>
#include <queue>

#define AS(a) (sizeof(a)/sizeof(a[0]))
using namespace std;
long long int MOD = 1000000007;



int main() {
  int N;
  cin >> N;
  vector <int> prime_list;
  for(int i = 2; i <= N; i++) {
    bool np = false;
    for(int j = 2; j < i; j++) {
      if(i % 2 == 0) {
        np = true;
        break;
      }
    }
    if(!np) {
      prime_list.push_back(i);
    }
  }

  int pp[prime_list.size()];
  for(int i = 0; i < prime_list.size(); i++) {
    pp[i] = 0;
  }
  for(int i = 2; i <= N; i++) {
    int tmp = i;
    while(tmp != 1) {
      for(int j = 0; j < prime_list.size(); j++) {
        if(tmp % prime_list[j] == 0) {
          pp[j]++;
          tmp /= prime_list[j];
          break;
        }
      }
    }
  }
  long long int sum = 1;
  for(int i = 0; i < prime_list.size(); i++) {
    sum = (sum * (pp[i]+1)) % MOD;
  }
  cout << sum << endl;

}