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: Runtime Error)

using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading.Tasks;
using static System.Console;
using static System.Math;
class Z { static void Main() => new K(); }
class K
{
	int F => int.Parse(Str);
	long FL => long.Parse(Str);
	int[] G => Strs.Select(int.Parse).ToArray();
	long[] GL => Strs.Select(long.Parse).ToArray();
	string Str => ReadLine();
	string[] Strs => Str.Split(new char[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
	const int MOD = 1000000007;
	public K()
	{
		SetOut(new StreamWriter(OpenStandardOutput()) { AutoFlush = false });
		Solve();
		Out.Flush();
	}
	int P;
	List<int> ps;
	void Solve()
	{
		var N = F;
		ps = GetPrimes(N); P = ps.Count;
		var fact = new Dictionary<int, int>();
		for (var n = 2; n <= N; n++) fact = Multiply(fact, Factorize(n, ps));
		var s = 0;
		foreach (var x in Calc1(74)) if (IsMultiple(fact, x)) s++;
		foreach (var x in Calc2(24, 2)) if (IsMultiple(fact, x)) s++;
		foreach (var x in Calc2(14, 4)) if (IsMultiple(fact, x)) s++;
		foreach (var x in Calc3(4, 2)) if (IsMultiple(fact, x)) s++;
		WriteLine(s);
	}
	IEnumerable<Dictionary<int, int>> Calc1(int e)
	{
		foreach (var p in ps) yield return new Dictionary<int, int> { [p] = e };
	}
	IEnumerable<Dictionary<int, int>> Calc2(int e, int f)
	{
		foreach (var p in ps) foreach (var q in ps) if (p != q) yield return new Dictionary<int, int> { [p] = e, [q] = f };
	}
	IEnumerable<Dictionary<int, int>> Calc3(int e, int f)
	{
		foreach (var p in ps) foreach (var q in ps) if (p < q) foreach (var r in ps) if (r != p && r != q) yield return new Dictionary<int, int> { [p] = e, [q] = e, [r] = f };
	}
	public static List<int> GetPrimes(int n)
	{
		var m = (n - 1) >> 1;
		var ps = new List<int>((int)(n / Log(n))) { 2 };
		var ng = new bool[m];
		ng[0] = false;
		for (var p = 0; p < m; p++)
			if (!ng[p])
			{
				var x = 2 * p + 3;
				ps.Add(x);
				for (var k = 3 * p + 3; k < m; k += x) ng[k] = true;
			}
		return ps;
	}
	public static Dictionary<int, int> Factorize(int n, List<int> primes)
	{
		var d = new Dictionary<int, int>();
		for (var j = 0; j < primes.Count; j++)
		{
			var i = primes[j];
			if (i * i > n) break;
			if (n % i == 0)
			{
				d.Add(i, 0);
				while (n % i == 0) { n /= i; d[i]++; }
			}
		}
		if (n > 1) d.Add(n, 1);
		return d;
	}
	public static Dictionary<int, int> Multiply(Dictionary<int, int> x, Dictionary<int, int> y)
	{
		var z = new Dictionary<int, int>();
		foreach (var t in x) z[t.Key] = t.Value + (y.ContainsKey(t.Key) ? y[t.Key] : 0);
		foreach (var t in y) if (!x.ContainsKey(t.Key)) z[t.Key] = t.Value;
		return z;
	}
	public static bool IsMultiple(Dictionary<int, int> x, Dictionary<int, int> y)
	{
		foreach (var t in y) if (!x.ContainsKey(t.Key) || x[t.Key] < t.Value) return false;
		return true;
	}
}