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>
#include <vector>
#define REP(i, n) for (int i = 0; i < (int)(n); ++i)
#define REP2(i, m, n) for (int i = (m); i < (int)(n); ++i)
#define REPR(i, n) for (int i = (n)-1; i >= 0; --i)
#define REPx(x, a) for(auto x : a)
#define ALL(a) a.begin(), a.end()
#define SORT(a) sort(ALL(a))
#define SORTG(a) sort(ALL(a), greater<int>())
#define REVERSE(a) reverse(ALL(a))
#define bit_search(bit, n) REP(bit, 1<<(n))
#define bit_check(bit, i) (bit>>i) & 1
#define setpre(n) fixed << setprecision((n))
#define UNIQUE(a) do {SORT(a); (a).erase(unique(ALL((a))), (a).end());} while(0)
#define ENDL cout << endl;
using namespace std;
using ll = long long;
using PII = pair<int, int>;
using VPII = vector<PII>;
using VI = vector<int>;
using VVI = vector<VI>;
using Vll = vector<ll>;
using VVll = vector<Vll>;
using VC = vector<char>;
using VS = vector<string>;
using VB = vector<bool>;
const int INF = 1e9;

VPII res;

void prime_factorize(auto N, auto &result)
{
  int s = 2;
  while (N != 1)
  {
    int e = 0;
    while (N % s == 0)
    {
      N /= s;
      e++;
    }
    if (e != 0) result.push_back(PII(s, e));
    s++;
  }
}

void pff(auto N)
{
  REP2(i, 1, N+1)
  {
    VPII result;
    prime_factorize(i, result);
    REP(i, result.size())
    {
      bool flg = false;
      REP(j, res.size())
      {
        if (result.at(i).first == res.at(j).first)
        {
          res.at(j).second += result.at(i).second;
          flg = true;
          break;
        }
      }
      if (!flg) res.push_back(result.at(i));
    }
  }
}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N;
  cin >> N;
  pff(N);
  int k = 0, l = 0, m = 0, n = 0, o = 0, p = 0, q = 0;
  REPx(x, res)
  {
    int b = x.second;
    if (2 <= b && b < 4) k++;
    if (b >= 4) l++;
    if (2 <= b && b < 24) m++;
    if (b >= 24) n++;
    if (4 <= b && b < 14) o++;
    if (b >= 14) p++;
    if (b >= 74) q++;
  }
  int ans = 0;
  if (l == 2) ans += k * l * (l-1) / 2;
  else if (l >= 3) ans += k * l * (l-1) / 2 + l * (l-1) * (l-2) / 2;
  ans += m * n + n * (n-1);
  ans += o * p + p * (p-1);
  ans += q;
  cout << ans << endl;

  return 0;
}