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: Accepted)

// デバッグ実行：Ctrl+F5

using System;
using System.Collections.Generic;
class Program
{
    static void Main(string[] args)
    {
        String line;
        line = Console.ReadLine();
        int N = int.Parse(line);
        var dict = new Dictionary<int, int>();
        int count = 0;
        for(int i = 2; i <= N; i++)
        {
            var list = Soinsu(i);
            foreach(int yakusu in list)
            {
                if (dict.ContainsKey(yakusu))
                {
                    dict[yakusu]++;
                }
                else
                {
                    dict[yakusu] = 1;
                }
            }
        }
        List<int> keys = new List<int>(dict.Keys);
        // 探索
        // 75 → 3 * 5 * 5より、
        // 約数2個以上と4個以上と4個以上の組み合わせ
        for(int i = 0; i < keys.Count; i++)
        {
            if (dict[keys[i]] >= 2)
            {
                for (int j = 0; j < keys.Count; j++)
                {
                    if (i != j && dict[keys[j]] >= 4)
                    {
                        for (int k = j + 1; k < keys.Count; k++)
                        {
                            if (i != k && dict[keys[k]] >= 4)
                            {
                                count++;
                            }
                        }
                    }
                }
            }
        }

        // 75 → 15 * 5より、
        // 約数14個以上と4個以上の組み合わせ
        for (int i = 0; i < keys.Count; i++)
        {
            if (dict[keys[i]] >= 4)
            {
                for(int j = 0; j < keys.Count; j++)
                {
                    if (i != j && dict[keys[j]] >= 14)
                    {
                        count++;
                    }
                }
            }
        }

        // 75 → 25 * 3より、
        // 約数24個以上と2個以上の組み合わせ
        for (int i = 0; i < keys.Count; i++)
        {
            if (dict[keys[i]] >= 2)
            {
                for (int j = 0; j < keys.Count; j++)
                {
                    if (i != j && dict[keys[j]] >= 24)
                    {
                        count++;
                    }
                }
            }
        }

        // 75より、
        // 約数74個以上の組み合わせ
        foreach (KeyValuePair<int,int> value in dict)
        {
            if (value.Value >= 74)
            {
                count++;
            }
        }

        Console.WriteLine(count);
    }
    
    static IEnumerable<int> Soinsu(int N)
    {
        int i = 2;
        int now = N;
        while(i <= N)
        {
            if(now % i == 0)
            {
                now /= i;
                yield return i;
            }
            else
            {
                i++;
            }
        }
    }
}