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 <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <vector>
#include <string>
#include <queue>
#include <deque>
#include <list>
#include <stack>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <algorithm>

#define int long long
#define MOD 1000000007

#define rep(i, n) for (int i = 0; i < (n); i++)
#define REP(i, a, n) for (int i = (a); i <= (n); i++)
#define all(a) (a).begin(), (a).end()
#define mp(a, b) make_pair((a), (b))

using namespace std;

int dx[4] = { 1, 0, -1, 0 };
int dy[4] = { 0, -1, 0, 1 };

const int MAX_PRIME = 1000010;
bool isPrime[MAX_PRIME];

void calcPrimes() {
	for (int i = 2; i < MAX_PRIME; i++) isPrime[i] = true;
	for (int i = 2; i < MAX_PRIME; i++) {
		if (!isPrime[i]) continue;
		for (int j = i * i; j < MAX_PRIME; j += i) isPrime[j] = false;
	}
}

signed main() {
	calcPrimes();

	int N;
	cin >> N;

	vector<int> primes;
	REP(i, 2, 100) if (isPrime[i]) primes.push_back(i);

	vector<int> cnt(primes.size());

	REP(i, 1, N) {
		int num = i;
		rep(j, primes.size()) {
			int tmp = 0;
			while (num % primes[j] == 0) {
				tmp++;
				num /= primes[j];
			}
			cnt[j] += tmp;
		}
	}

	rep(i, primes.size()) {
		cerr << primes[i] << ":" << cnt[i] << endl;
	}

	int ret = 0;
	rep(i, primes.size()) {
		rep(j, primes.size()) {
			rep(k, primes.size()) {
				if (i == j || j <= k || k == i) continue;
				if (cnt[i] >= 2 && cnt[j] >= 4 && cnt[k] >= 4) ret++;
			}
		}
	}

	rep(i, primes.size()) {
		rep(j, primes.size()) {
			if (i == j) continue;
			if (cnt[i] >= 4 && cnt[j] >= 14) ret++;
			if (cnt[i] >= 2 && cnt[j] >= 24) ret++;
		}
	}

	rep(i, primes.size()) {
		if (cnt[i] >= 74) ret++;
	}

	cout << ret << endl;
}