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# (.NET Core 3.1.201) (judge verdict: Wrong Answer)

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;

namespace AtCoder.D
{
    public class Program
    {
        public static void Main() { var r = GetResult(); Debug.WriteLine(r); Console.Write(r); }

        private static object GetResult()
        {
            var N = ReadLong();
            var factorCount = new long[100];
            for (int i = 2; i <= N; i++)
            {
                foreach (var item in MyMath.GetPrimeFactors(i))
                {
                    factorCount[item]++;
                }
            }

            var count = 0L;

            //2,4,4 (75=3*5*5)
            {
                //var f2 = factorCount.Count(x => x >= 2 && x < 4);
                //var f4 = factorCount.Count(x => x >= 4);
                //count += f2 * f4 * (f4 - 1) / 2;
                //count += f4 * (f4 - 1) * (f4 - 2) / 6;
                for (int i = 0; i < 100; i++)
                {
                    for (int j = i + 1; j < 100; j++)
                    {
                        for (int k = j + 1; k < 100; k++)
                        {
                            if ((factorCount[i] >= 2 && factorCount[j] >= 4 && factorCount[k] >= 4)
                                || (factorCount[i] >= 4 && factorCount[j] >= 2 && factorCount[k] >= 4)
                                || (factorCount[i] >= 4 && factorCount[j] >= 4 && factorCount[k] >= 2))
                            {
                                count++;
                            }
                        }
                    }
                }
            }

            //2,24 (75=3*25)
            {
                //var f2 = factorCount.Count(x => x >= 2 && x < 24);
                //var f24 = factorCount.Count(x => x >= 24);
                //count += f2 * f24;
                //count += f24 * (f24 - 1) / 2;
                for (int i = 0; i < 100; i++)
                {
                    for (int j = i + 1; j < 100; j++)
                    {
                        if ((factorCount[i] >= 2 && factorCount[j] >= 24)
                            || (factorCount[i] >= 24 && factorCount[j] >= 2))
                        {
                            count++;
                        }
                    }
                }
            }

            //4,14 (75=5*15)
            {
                //var f4 = factorCount.Count(x => x >= 4 && x < 14);
                //var f14 = factorCount.Count(x => x >= 14);
                //count += f4 * f14;
                //count += f14 * (f14 - 1) / 2;
                for (int i = 0; i < 100; i++)
                {
                    for (int j = i + 1; j < 100; j++)
                    {
                        if ((factorCount[i] >= 4 && factorCount[j] >= 14)
                            || (factorCount[i] >= 14 && factorCount[j] >= 4))
                        {
                            count++;
                        }
                    }
                }
            }

            //74 (75=75)
            {
                //count += factorCount.Count(x => x >= 74);
                for (int i = 0; i < 100; i++)
                {
                    if (factorCount[i] >= 74)
                    {
                        count++;
                    }
                }
            }

            return count;
        }

        #region Console.Read

        public static string ReadText() { return Console.ReadLine(); }
        public static List<string> ReadTexts() { return Console.ReadLine().Split(' ').ToList(); }
        public static long ReadLong() { return long.Parse(Console.ReadLine()); }
        public static (long, long) Read2Longs() { var ls = ReadLongs(); return (ls[0], ls[1]); }
        public static (long, long, long) Read3Longs() { var ls = ReadLongs(); return (ls[0], ls[1], ls[2]); }
        public static (long, long, long, long) Read4Longs() { var ls = ReadLongs(); return (ls[0], ls[1], ls[2], ls[3]); }
        public static (long, long, long, long, long) Read5Longs() { var ls = ReadLongs(); return (ls[0], ls[1], ls[2], ls[3], ls[4]); }
        public static List<long> ReadLongs() { return Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToList(); }

        #endregion
    }
    public static class MyMath
    {
        /// <summary>
        /// 最大公約数を求める
        /// </summary>
        public static long Gcd(long a, long b)
        {
            // 引数を入替えて自分を呼び出す
            if (a < b) return Gcd(b, a);

            while (b != 0)
            {
                var remainder = a % b;
                a = b;
                b = remainder;
            }

            return a;
        }
        /// <summary>
        /// 最小公倍数を求める
        /// </summary>
        public static long Lcm(long a, long b)
        {
            return a / Gcd(a, b) * b;
        }
        /// <summary>
        /// 素数かどうかを判定する
        /// </summary>
        public static bool IsPrime(long n)
        {
            if (n == 0 || n == 1) return false;

            for (long i = 2; i * i <= n; i++)
            {
                if (n % i == 0) return false;
            }

            return true;
        }
        /// <summary>
        /// 素因数をすべて求める
        /// </summary>
        public static IEnumerable<long> GetPrimeFactors(long n)
        {
            for (long a = 2; a * a <= n; ++a)
            {
                if (n % a != 0) continue;

                // 割れる限り割り続ける
                while (n % a == 0)
                {
                    // ★TODO：数までカウントしたい場合はここで返す
                    yield return a;
                    n /= a;
                }

                // ★TODO：重複を許さない場合はここで返す
                //yield return a;

            }

            // 最後に残った数について
            if (n != 1) yield return n;
        }
        /// <summary>
        /// 約数をすべて求める
        /// 注意：並び替えるのを忘れずに！！！
        /// </summary>
        public static IEnumerable<long> GetDivisors(long n)
        {
            var sqrt = Math.Sqrt(n);
            for (long d = 1; d < sqrt; d++)
            {
                if (n % d == 0)
                {
                    yield return d;
                    yield return n / d;
                }
            }

            // 平方根が整数の場合は約数となる
            if (sqrt == (long)sqrt)
            {
                yield return (long)sqrt;
            }
        }
    }
}