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# (Mono 4.6.2.0) (judge verdict: Accepted)

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;

class Prog
{
    public Prog() { }
    public static int Main()
    {
        new Prog().calc();
        return 0;
    }

    Scanner cin;
    int mod = 1000000007;

    public void calc()
    {
        cin = new Scanner();
        int N = cin.nextInt();
        int[] cnts = new int[N + 1];

        for (int n = 1; n <= N; n++)
        {
            int tmp = n;

            for (int p = 2; p <= N; p++)
            {
                while (tmp % p == 0)
                {
                    tmp /= p;
                    cnts[p]++;
                }
            }
        }

        long ans = 1;
        for (int i = 2; i <= N; i++)
        {
            ans *= (cnts[i] + 1);
            ans %= mod;
        }

        Console.WriteLine(ans);

    }

    private bool isprime(int n)
    {
        if (n <= 1) return false;
        if (n == 2) return true;
        for(int i = 2;i<= Math.Sqrt(n); i++)
        {
            if (n % i == 0) return false;
        }
        return true;
     }

}


class Scanner
{
    string[] s;
    int i;

    char[] cs = new char[] { ' ' };

    public Scanner()
    {
        s = new string[0];
        i = 0;
    }

    public string next()
    {
        if (i < s.Length) return s[i++];
        string st = Console.ReadLine();
        while (st == "") st = Console.ReadLine();
        s = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
        i = 0;
        return s[i++];
    }

    public int nextInt()
    {
        return int.Parse(next());
    }

    public long nextLong()
    {
        return long.Parse(next());
    }

    public double nextDouble()
    {
        return double.Parse(next());
    }

}