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 System.Text;
using System.Threading.Tasks;

namespace Atcoder
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] box = new int[100];
            int N = int.Parse(Console.ReadLine());
            ;
            for (int c = 2; c <= N; c++)
            {
                if (isPrime(c))
                {
                    box[c]++;
                    continue;
                }
                else
                {
                    int bigone = c;
                    while (isPrime(bigone) == false)
                    {

                        int div = candivideby(bigone);
                        box[div]++;
                        bigone = bigone / div;
                    }
                    box[bigone]++;
                }

            }
            ;
            int output = 0;
            //75候補
            List<int> upto74 = new List<int>();
            List<int> upto24 = new List<int>();
            List<int> upto14 = new List<int>();
            List<int> upto4 = new List<int>();
            List<int> upto2 = new List<int>();

            for (int i = 0; i < 51; i++)
            {
                if (box[i] >= 74) upto74.Add(i);
                if (box[i] >= 24) upto24.Add(i);
                if (box[i] >= 14) upto14.Add(i);
                if (box[i] >= 4) upto4.Add(i);
                if (box[i] >= 2) upto2.Add(i);
            }
            ;
            output = upto74.Count;
            for (int i = 0; i < upto24.Count; i++)
            {
                int choice = upto24[i];
                for (int j = 0; j < upto2.Count; j++)
                {
                    if (choice != upto2[j]) output++;
                }
            }

            for (int i = 0; i < upto14.Count; i++)
            {
                int choice = upto14[i];
                for (int j = 0; j < upto4.Count; j++)
                {
                    if (choice != upto4[j]) output++;
                }
            }

            for (int i = 0; i < upto2.Count; i++)
            {
                int choice = upto2[i];
                int combination = upto4.Count;
                if (upto4.Contains(choice))
                {
                    combination--;
                }
                output += (combination) * (combination - 1) / 2;
            }

            ;
            Console.WriteLine(output);
        }
        static int candivideby(int n)
        {
            int[] primes = new 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 };
            for (int i = 0; i < primes.Length; i++)
            {
                if (n % primes[i] == 0) return primes[i];
            }
            return 1;
        }

        static bool isPrime(int n)
        {
            int[] primes = new 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};
            if (primes.Contains(n)) return true;
            else return false;

        }

    }
}