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: Runtime Error)

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

class Program
{ 
    static void Main(string[]args)
    {
        Magatro m = new Magatro();
        m.Scan();
        m.Solve();
    }
}

public class Scanner
{
    private StreamReader Sr;
    private string[] S;
    private int Index;

    private const char Separator=' ';

    public Scanner()
    {
        Index = 0;
        S = new string[0];
        Sr = new StreamReader(Console.OpenStandardInput());
    }

    private string[] Line()
    {
        return Sr.ReadLine().Split(Separator);
    }

    public string Next()
    {
        string result;
        if (Index >= S.Length)
        {
            S = Line();
            Index = 0;
        }
        result = S[Index];
        Index++;
        return result;
    }
    public int NextInt()
    {
        return int.Parse(Next());
    }
    public double NextDouble()
    {
        return double.Parse(Next());
    }
    public long NextLong()
    {
        return long.Parse(Next());
    }
    public string[] StringArray(int index = 0)
    {
        Index = S.Length;
        return S.Skip(index).ToArray();
    }
    public int[] IntArray(int index = 0)
    {
        return StringArray(index).Select(int.Parse).ToArray();
    }

    public bool ScanToEnd(ref string s)
    {
        if (Sr.EndOfStream)
        {
            return false;
        }
        else
        {
            s = Sr.ReadLine();
            return true;
        }
    }
}

public class Magatro
{
    private int N;

    private int[][] array;
    int Mod = 1000000007;

    public void Scan()
    {
        Scanner sc = new Scanner();
        N = sc.NextInt();
    }

    public void Solve()
    {
        array = new int[N + 1][];
        // for (int i = 0; i <= N; i++)
        //  {
        //     array[i] = new int[N+1];
        // }
        array[2] = new int[N + 1];
        array[2][2]++;
        for (int i = 3; i <= N; i++)
        {
            int cp = i;
            int loop = (int)Math.Sqrt(cp);
            bool flag = false;
            for (int j = 2; j <= loop+1; j++)
            {
                if (cp % j == 0)
                {
                    int s = cp / j;
                    array[i] = array[s].ToArray();
                    array[i][j]++;
                    flag = true;
                    break;
                }
            }
            if (!flag)
            {
                array[i] = new int[N + 1];
                array[i][i]++;
            }
        }
        int[] cnt = new int[1001];
        for(int i = 2; i <= N; i++)
        {
            for(int j = 0; j <= N; j++)
            {
                cnt[j] += array[i][j];
            }
        }
        long ans = 1;
        for(int i = 0; i <= N; i++)
        {
            ans =(ans* (cnt[i] + 1))%Mod;
        }
        Console.WriteLine(ans);
    }
}