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 lint;
typedef pair<int, int> P;
#define REP(i, x, n) for(int i = x ; i < n ; ++i)
#define rep(i, n) REP(i, 0, n)
#define repr(i, n) for(int i = n - 1 ; i >= 0 ; --i)
#define ALL(x) (x).begin(), (x).end()
#define SORT(x) sort(ALL(x))

const int IINF = 1e9 + 10;
const lint LLINF = (lint)1e18 + 10;
const lint MOD = (lint)1e9 + 7;
const int dx4[] = {1, 0, -1, 0}, dy4[] = {0, 1, 0, -1};
const int dx8[] = {1, 1, 0, -1, -1, -1, 0, 1}, dy8[] = {0, -1, -1, -1, 0, 1, 1, 1};

int main(){
    int n;
    cin >> n;
    map<int, lint> mp;
    REP(i, 2, n + 1){
        int tmp = i;
        for(int j = 2 ; j * j <= tmp ; ++j){
            lint cnt = 0;
            while(tmp % j == 0){
                tmp /= j;
                ++cnt;
            }
            mp[j] += cnt;
        }
        if(tmp > 1){
            ++mp[tmp];
        }
    }
    lint ans = 0;
    for(auto x : mp){
        if(x.second >= 74){
            ++ans;
        }
        for(auto y : mp){
            if(x.first == y.first){
                continue;
            }
            if(x.second >= 2 && y.second >= 24){
                ++ans;
            }
            if(x.second >= 4 && y.second >= 14){
                ++ans;
            }
            for(auto z : mp){
                if(x.first == z.first || y.first >= z.first){
                    continue;
                }
                if(x.second >= 2 && y.second >= 4 && z.second >= 4){
                    ++ans;
                }
            }
        }
    }
    cout << ans << endl;
    return 0;
}