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: Wrong Answer)

using System;
using System.Collections.Generic;

namespace kozaiyApp
{
    public class FactorsOfFactorial
    {
        static void Main()
        {
            int N = int.Parse(Console.ReadLine());
            Dictionary<int, int> count = new Dictionary<int, int>(); // 素数xが何個あるか
            int mod = 1000000007;

            for (int i = 1; i <= N; i++) // N!... 1*2*3*4*...N
            {
                List<int> factorList = PrimeFactor(i); // 素因数分解
                foreach (var f in factorList) // 素数をカウント
                {
                    // Dictionaryに記録
                    if (count.ContainsKey(f))
                    {
                        count[f] += 1;
                    }
                    else
                    {
                        count.Add(f, 1);
                    }
                }
            }

            int ans = 1;
            foreach (var c in count)
            {
                if (c.Key == 1) continue;
                ans *= (c.Value + 1) % mod;
                ans %= mod;
            }

            Console.WriteLine(ans);
        }

        // 素因数分解
        static List<int> PrimeFactor(int n)
        {
            List<int> result = new List<int>();
            for (int i = 2; i * i <= n; i++)
            {
                while (n % i == 0)
                {
                    result.Add(i);
                    n /= i;
                }
            }
            result.Add(n);
            return result;
        }
    }
}