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++14 (GCC 5.4.1) (judge verdict: Accepted)

#include "bits/stdc++.h"
using namespace std;

long long nCr(int n, int r) {
    long long ans = 1;
    for (int i = n; i > n - r; --i) {
        ans = ans * i;
    }
    for (int i = 1 ; i < r + 1; ++i) {
        ans = ans / i;
    }
    return ans;
}

int main() {
    int N;
    cin >> N;

    vector<int> num(N + 1);
    for (int i = 0; i < N + 1; i++) {
        num[i] = 0;
    }

    for (int i = 2; i <= N; i++) {
        int t = i;
        for (int j = 2; j <= N; j++) {
            int cnt = 0;
            while (t % j == 0) {
                t /= j;
                cnt++;
            }
            num[j] += cnt;
        }
    }

    int A75 = 0;
    int A25 = 0;
    int A15 = 0;
    int A5 = 0;
    int A3 = 0;

    for (int i = 0; i < N + 1; i++) {
        if (num[i] >= 2 && num[i] < 4) {
            A3++;
        }
        else if (num[i] >= 4 && num[i] < 14) {
            A5++;
        }
        else if (num[i] >= 14 && num[i] < 24) {
            A15++;
        }
        else if (num[i] >= 24 && num[i] < 74) {
            A25++;
        }
        else if (num[i] >= 74) {
            A75++;
        }
    }

    int ans = A75;
    if (A25 + A75 >= 2) {
        ans += nCr(A25 + A75, 2) * 2;
    }
    ans += (A25 + A75) * (A3 + A5 + A15);
    if (A15 + A25 + A75 >= 2) {
        ans += nCr(A15 + A25 + A75, 2) * 2;
    }
    ans += (A15 + A25 + A75) * A5;
    if (A5 + A15 + A25 + A75 >= 3) {
        ans += nCr(A5 + A15 + A25 + A75, 3) * 3;
    }
	ans += nCr(A5 + A15 + A25 + A75, 2) * A3;

    cout << ans << endl;
}