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;
typedef long long ll;
vector<int> pr;
void sieve(int n){
    bool prime[n+1];
    memset(prime, true, sizeof(prime));;
    prime[0] = false;
    prime[1] = false;
    for(int i = 2; i * i <= n; i++){
        if(prime[i]){
            for(int j = 2 * i; j <= n; j += i)
                prime[j] = false;
        }
    }
    for(int i = 2; i <= n; i++){
        if(prime[i])
            pr.push_back(i);
    }
    return;
}
int main() {
    ll n;
    cin >> n;
    if(n == 1){
        cout << 0;
        return 0;
    }
    sieve(n);
    
    ll count[pr.size()] = {0};
    for(int i = 2; i <= n; i++){      
        int num = i;
        for(int j = 0; j < pr.size(); j++){
            while(num % pr[j] == 0){
                count[j]++;
                num /= pr[j];
            }
        }
    }
    
    ll c = 0;
    for(int i = 0; i < pr.size(); i++){
        if(count[i] >= 74)
        c++;
    }
    
    ll ans = c;
    for(int i = 0; i < pr.size(); i++){
        for(int j = 0; j < pr.size(); j++){
            if(i == j)
            continue;
            if(count[i] >= 2 && count[j] >= 24)
                ans++;
            if(count[i] >= 4 && count[j] >= 14)
                ans++;
        }
    }
    unordered_map<int, int> mp;
    for(int i = 0; i < pr.size(); i++){
        for(int j = 0; j < pr.size(); j++){
            for(int k = 0; k < pr.size(); k++){
                if(i == j || i == k || j == k)
                continue;
                if(count[i] >= 2 && count[j] >= 4 && count[k] >= 4 && mp[pr[k]*pr[j]] != pr[i]){
                    ans++;
                    mp[pr[k]*pr[j]] = pr[i];
                }
            }
        }
    }
    cout << ans;
    return 0;
}