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>
#define rep(i,n) for (long long i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<ll,ll>;
const ll MOD = 1000000007;
const ll INF = 10000000000000;
#define all(v) v.begin(), v.end()

vector<ll> Prime(10000,0);
void sosu(ll n){
  Prime.at(0)=2;
  ll t=1;
  for(ll i=3;i<n;i++){
    rep(j,t){
      if(i%Prime.at(j)==0){
        break;
      }
      if(j==t-1){
        Prime.at(t)=i;
        t++;
      }
    }
  }
}

int main(){
  ll N,a=0,b=0,c=0,d=0,e=0;
  cin >> N;
  sosu(N);
  vector<ll> W(N,0);
  rep(i,N){
    ll t=0,k=i+1;
    while(Prime.at(t)!=0){
      while(k%Prime.at(t)==0){
        W.at(t)++;
        k/=Prime.at(t);
      }
      t++;
    }
  }
  ll t=0;
  while(Prime.at(t)!=0){
    if(W.at(t)>=74){
      e++;
    }
    if(W.at(t)>=24){
      d++;
    }
    if(W.at(t)>=14){
      c++;
    }
    if(W.at(t)>=4){
      b++;
    }
    if(W.at(t)>=2){
      a++;
    }
    t++;
  }
  cout << e+d*(a-1)+c*(b-1)+(b*(b-1)*(a-2))/2 << endl;
}