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)

using System;
using System.Collections.Generic;
using System.Linq;
using static Input;

public class Prog
{
    private const int INF = 1000000007;
    private const long INFINITY = 9223372036854775807;
    private struct Pair { public int x, y; public Pair(int xx, int yy) { x = xx; y = yy; } }
    private static int[] dx = { 1, 0, -1, 0 };
    private static int[] dy = { 0, -1, 0, 1 };
    public static void Main()
    {
        int N = NextInt();
        SieveOfEratosthenes SOE = new SieveOfEratosthenes(100);
        SOE.Run();
        Dictionary<int, int> d = new Dictionary<int, int>();
        for (int i = 2; i <= N; i++)
        {
            int x = i;
            while (x != 1)
            {
                foreach (var v in SOE.list)
                {
                    if (x % v == 0)
                    {
                        if (!d.ContainsKey(v)) d[v] = 0;
                        d[v]++;
                        x /= v; break;
                    }
                }
            }
        }
        int ans = 0;
        var e = d.OrderByDescending(v => v.Value);
        int M = e.Count();
        for (int i = 0; i < M; i++)
            for (int j = i + 1; j < M; j++)
                for (int k = 0; k < M; k++)
                {
                    if (i == j || j == k || k == i) continue;
                    if (e.ElementAt(i).Value >= 4 && e.ElementAt(j).Value >= 4 && e.ElementAt(k).Value >= 2) ans++;
                }
        for (int i = 0; i < M; i++)
            for (int j = 0; j < M; j++)
            {
                if (i == j) continue;
                if (e.ElementAt(i).Value >= 14 && e.ElementAt(j).Value >= 4) ans++;
            }
        for (int i = 0; i < M; i++)
            for (int j = 0; j < M; j++)
            {
                if (i == j) continue;
                if (e.ElementAt(i).Value >= 24 && e.ElementAt(j).Value >= 2) ans++;
            }
        for (int i = 0; i < M; i++)
            if (e.ElementAt(i).Value >= 74) ans++;
        Console.WriteLine(ans);
        //foreach (var v in d) Console.WriteLine(v.Key + " " + v.Value);
    }
}

public class SieveOfEratosthenes
{
    public HashSet<int> list { get; private set; } = new HashSet<int>();
    private static bool[] memo;
    private int M, root;
    public SieveOfEratosthenes(int N)
    {
        M = (int)Math.Ceiling((double)N / 2);
        root = (int)Math.Ceiling((Math.Sqrt(N) + .1)) / 2;
        memo = new bool[M];
    }
    public void Run()
    {
        memo[0] = false;
        for (int i = 1; i < M; i++) memo[i] = true;
        list.Add(2);
        for (int i = 1; i < root; i++)
        {
            if (!memo[i]) continue;
            for (int j = 2 * i * (i + 1); j < M; j += (2 * i + 1)) memo[j] = false;
        }
        for (int i = 0; i < M; i++) if (memo[i]) list.Add(i * 2 + 1);
    }
    public bool IsPrime(int N)
    {
        return list.Contains(N);
    }
}

public class Input
{
    private static Queue<string> q = new Queue<string>();
    private static void Confirm() { if (q.Count == 0) foreach (var s in Console.ReadLine().Split(' ')) q.Enqueue(s); }
    public static int NextInt() { Confirm(); return int.Parse(q.Dequeue()); }
    public static long NextLong() { Confirm(); return long.Parse(q.Dequeue()); }
    public static char NextChar() { Confirm(); return char.Parse(q.Dequeue()); }
    public static string NextString() { Confirm(); return q.Dequeue(); }
    public static double NextDouble() { Confirm(); return double.Parse(q.Dequeue()); }
    public static int[] LineInt() { return Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); }
    public static long[] LineLong() { return Console.ReadLine().Split(' ').Select(long.Parse).ToArray(); }
    public static string[] LineString() { return Console.ReadLine().Split(' ').ToArray(); }
    public static double[] LineDouble() { return Console.ReadLine().Split(' ').Select(double.Parse).ToArray(); }
}