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

/**
*	created: 10.08.2020 17:36:11
**/
#include <bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp>
// using bint = boost::multiprecision::cpp_int;
using namespace std;
#define int long long
#define rep(i,n) for (int i = 0; i < (int)(n); i++)
#define rep2(i,s,n) for (int i = (s); i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define pcnt(bit) __builtin_popcountll(bit)
template<class T> bool chmax(T &a, const T &b) {if (a < b) {a = b; return 1;} return 0;}
template<class T> bool chmin(T &a, const T &b) {if (b < a) {a = b; return 1;} return 0;}
const long double pi = acos(-1.0);
const int MAX = 1000010;
const int INF = 1LL << 60;
const int MOD = 1000000007;
// const int MOD = 998244353;

// 素因数分解してmapに格納
map<int,int> mp;

void prime(int n) {
    if (n == 1) return;
    for (int i = 2; i*i<= n; i++) {
        if (n % i == 0) {
            prime(i);
            prime(n/i);
            return;
        }
    }
    mp[n]++;
    return;
}

signed main() {

    cin.tie(0);
    ios_base::sync_with_stdio(false);

    int n; cin >> n;
    rep2(i,2,n+1) prime(i);
    int cnt74 = 0, cnt2 = 0, cnt24 = 0, cnt4 = 0, cnt14 = 0;
    for (auto p : mp) {
        int m = p.second;
        if (m >= 74) {cnt74++; cnt2++; cnt24++; cnt4++; cnt14++;}
        else if (m >= 24) {cnt2++; cnt24++; cnt4++; cnt14++;}
        else if (m >= 14) {cnt2++; cnt4++; cnt14++;}
        else if (m >= 4) {cnt2++; cnt4++;}
        else if (m >= 2) cnt2++;
    }
    int ans = cnt74 + cnt14*(cnt4-1) + cnt24*(cnt2-1) + cnt4*max(cnt4-1,0ll)*(cnt2-2)/2;
    cout << ans << endl;
    return 0;
}