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());
            int[] count = new int[1001]; // count[x] 素数xが何個あるか

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

            // (count[2]+1) * (count[3]+1) * (count[5]+1) ... +1は *1のぶん
            int ans = 1;
            for (int i = 2; i < count.Length; i++)
            {
                if (count[i] == 0) continue;
                ans *= (count[i] + 1);
            }

            Console.WriteLine(ans % 1000000007);
        }

        // 素因数分解
        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;
        }
    }
}