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;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

class Program
{
    static void Main(string[] args)
    {
        int mod = 1000000000 + 7;
        var N = ConsoleUtil.IntReadLine();
        

        var primes = GetPrimeNumbers().TakeWhile(n => n <= N).ToArray();
        var counter = new int[primes.Length];

        for(int i = 1; i <= N; i++)
        {
            Count(i, primes, counter);
        }

        int ans = 1;
                
        for(int i = 0; i < counter.Length; i++)
        {
            ans *= (counter[i] + 1);
            ans %= mod;
        }

        Console.WriteLine(ans);
    }

    static void Count(int n, int[] primes, int[] counter)
    {
        for(int i = 0; i < primes.Length; i++)
        {
            int nCpy = n;
            int prime = primes[i];

            while(nCpy % prime == 0)
            {
                nCpy /= prime;
                counter[i]++;
            }
        }
    }

    static IEnumerable<int> GetPrimeNumbers()
    {
        List<int> primes = new List<int>() { 2 };

        yield return 2;

        for (int i = 3; i < int.MaxValue; i++)
        {
            bool isPrime = true;
            int Sqrt = (int)Math.Sqrt(i) + 1;

            foreach (var prime in primes)
            {
                if (prime > Sqrt)
                {
                    break;
                }
                if (i % prime == 0)
                {
                    isPrime = false;
                    break;
                }
            }

            if (isPrime)
            {
                primes.Add(i);
                yield return i;
            }
        }
    }
}



static class ConsoleUtil
{
    public static string[] StrArrayReadLine(char sepalator)
    {
        string str = Console.ReadLine();
        return str.Split(sepalator).ToArray();
    }
    public static string[] StrArrayReadLine()
    {
        string str = Console.ReadLine();
        if (str.Contains(','))
        {
            return str.Split(',').ToArray();
        }
        {
            return str.Split(' ').ToArray();
        }
    }
    
    public static int[] IntArrayReadLine()
    {
        return StrArrayReadLine().Select(s => int.Parse(s)).ToArray();
    }
    public static int[] IntArrayReadLine(char sepalator)
    {
        return StrArrayReadLine(sepalator).Select(s => int.Parse(s)).ToArray();
    }

    public static int IntReadLine() => int.Parse(Console.ReadLine());
}