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)


#pragma GCC optimize ("O3")

#include <bits/stdc++.h>
#define FOR(i, m, n) for (int i = (m); i < (n); ++i)
#define REP(i, n) FOR(i, 0, n)
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define bcnt __builtin_popcountll

using namespace std;

typedef long long ll;
typedef pair<ll,ll> Pll;
typedef pair<int,int> Pin;

ll INF = 1e16;
int inf = 1e9;
ll MOD = 1e9+7;

template<typename T>
ostream& operator << (ostream& os, const vector<T>& vec) {
    os << "{ ";
    REP(i, vec.size()) {
        os << vec[i] << " ";
    }
    os << "}";

    return os;
}

ll pow_mod(ll a, ll p) {
    ll res = 1;
    while(p) {
        if (p & 1) res = (res * a) % MOD;
        a = (a * a) % MOD;
        p >>= 1;
    }

    return res;
}


ll mod_inv(ll a, ll m) {
    ll b = m, u = 0, v = 1;
    while(a) {
        ll t = b / a;
        swap(b -= t * a, a);
        swap(u -= t * v, v);
    }

    return (u % m + m) % m;
}

ll gcd(ll a, ll b) {
    if(b == 0) return a;
    return gcd(b, a%b);
}

void d_err() {
    cerr << endl;
}

template <typename H, typename... T>
void d_err(H h, T... t) {
    cerr << h << " ";
    d_err(t...);
}


#ifdef LOCAL
#define debug(...)  cerr << "[" << #__VA_ARGS__ << "]: ", d_err(__VA_ARGS__);
#else
#define debug(...) 83;
#endif


int main(){
    cin.tie(0);
    ios_base::sync_with_stdio(false);
    
    int N;
    cin >> N;

    int m = int(floor(sqrt(N))) + 1;
    int s[m];
    REP(i ,m) s[i] = i;
    for (int i = 2; i <= m; ++i) {
        if (s[i] != i) continue;

        for (int j = i+i; j <= m; j += i) {
            s[j] = i;
        }
    }

    vector<int> _p;
    FOR(i, 2, m) {
        if (s[i] == i) _p.pb(i);
    }

    map<int, int> p;
    FOR(i, 1, N+1) {
        int n = i;
        REP(j, _p.size()) {
            if (n == 1) break;

            int cnt = 0;
            while(n % _p[j] == 0) {
                n /= _p[j];
                ++p[_p[j]];
            }
        }

        if (n != 1) ++p[n];
    }
    
    cout << fixed << setprecision(20);

    int cnt[p.size()+1][76];
    REP(i, p.size()+1) REP(j, 76) cnt[i][j] = 0;
    cnt[0][1] = 1;

    int pi = 0;
    for(auto it=p.begin(); it != p.end(); ++it) {
        int pp = it->fi;
        int c = it->se;
        ++pi;

        REP(i, 76) {
            if (cnt[pi-1][i] == 0) continue;
            REP(j, c+1) {
                int cc = i * (j + 1);
                if (cc > 75) break;
                cnt[pi][cc] += cnt[pi-1][i];
            }
        }
    }

    cout << cnt[pi][75] << endl;

}