Problem:
Score : 400 points

Problem Statement

You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many Shichi-Go numbers (literally "Seven-Five numbers") are there?

Here, a Shichi-Go number is a positive integer that has exactly 75 divisors.

Note

When a positive integer A divides a positive integer B, A is said to a divisor of B.
For example, 6 has four divisors: 1, 2, 3 and 6.

Constraints

1 \leq N \leq 100

N is an integer.

Input

Input is given from Standard Input in the following format:

N

Output

Print the number of the Shichi-Go numbers that are divisors of N!.

Sample Input 1

9

Sample Output 1

0

There are no Shichi-Go numbers among the divisors of 9! = 1 \times 2 \times ... \times 9 = 362880.

Sample Input 2

10

Sample Output 2

1

There is one Shichi-Go number among the divisors of 10! = 3628800: 32400.

Sample Input 3

100

Sample Output 3

543

Solution in C# (Mono 4.6.2.0) (judge verdict: Wrong Answer)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;

namespace AtCoder
{
    class Program
    {
        static void Main(string[] args)
        {
            //[summary]D - 756
            int n = int.Parse(Console.ReadLine());
            BigInteger upper = GetUpperLimit(n);

            var numbers = GetShichigoByThreeNum(upper).ToList();

            var numbers2 = GetShichigoByTwoNum(upper, 14, 4).ToList();
            var numbers3 = GetShichigoByTwoNum(upper, 24, 2).ToList();
            numbers.AddRange(numbers2);
            numbers.AddRange(numbers3);

            var dic = new Dictionary<BigInteger, string>();
            int count = 0;

            foreach(var num in numbers)
            {
                if (upper % num == 0)
                {
                    if (!dic.ContainsKey(num))
                    {
                        dic.Add(num, null);

                        //Console.WriteLine(num);
                        count++;
                    }
                }
            }

            Console.WriteLine(count);
        }

        static IEnumerable<BigInteger> GetShichigoByTwoNum(BigInteger upper,int x, int y)
        {
            for (int a = 2; a < 100; a++)
            {
                if (IsPrimeNumber(a))
                {
                    BigInteger powA = (BigInteger)Math.Pow(a, x);

                    for (int b = 2; b < 100; b++)
                    {
                        if (a != b && IsPrimeNumber(b))
                        {
                            BigInteger powB = (BigInteger)Math.Pow(b, y);
                            BigInteger result = powA * powB;

                            if (result > upper)
                            {
                                break;
                            }
                            else
                            {
                                yield return result;
                            }
                        }
                    }
                }
            }
        }

        static IEnumerable<BigInteger> GetShichigoByThreeNum(BigInteger upper)
        {
            const int maxNum = 100;

            for(int a = 2; a < maxNum; a++)
            {
                if (IsPrimeNumber(a))
                {
                    BigInteger powA = (BigInteger)Math.Pow(a, 2);

                    for (int b = 2; b < maxNum; b++)
                    {
                        if (a != b && IsPrimeNumber(b))
                        {
                            BigInteger powB = (BigInteger)Math.Pow(b, 4);

                            for (int c = 2; c < maxNum; c++)
                            {
                                if (a != c && b != c && IsPrimeNumber(c))
                                {
                                    BigInteger powC = (BigInteger)Math.Pow(c, 4);
                                    BigInteger result = powA * powB * powC;

                                    if (result > upper)
                                    {
                                        break;
                                    }
                                    else
                                    {
                                        yield return result;
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }

        static bool IsPrimeNumber(int num)
        {
            var primeNumbers = new List<int> {
                2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79,
                83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167,
                173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263,
                269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367,
                373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463,
                467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587,
                593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683,
                691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811,
                821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929,
                937, 941, 947, 953, 967, 971, 977, 983, 991, 997 };

            if (primeNumbers.Contains(num))
            {
                return true;
            }
            else
            {
                return false;
            }
        }

        static BigInteger GetUpperLimit(int n)
        {
            BigInteger result = 1;

            for(int i = 2; i <= n; i++)
            {
                result *= i;
            }

            return result;
        }
    }
}