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 (GCC 5.4.1) (judge verdict: Accepted)

#include<stdio.h>
#include<string.h>
#include<math.h>
#include<stdlib.h>
#include<limits.h>

#define rep(i,begin,end) for(int i=begin; i<end; i++)
#define revrep(i,begin,end) for(int i=begin; i>end; i--)
#define lld long long int

int combination(int n, int r){
    if(r==0||r==n){
        return 1;
    }
    if(r==1){
        return n;
    }
    return combination(n-1,r-1)+combination(n-1,r);
}

int main(){
    int n;
    scanf("%d", &n);
    int t[101];
    rep(i, 0, 101){
        t[i] = 0;
    }
    rep(i, 2, n+1){
        int buf = i;
        while(buf % 2 == 0){
            t[2]++;
            buf /= 2;
        }
        for(int i=3; i*i<=buf; i+=2){
            while(buf % i == 0){
                t[i]++;
                buf /= i;
            }
        }
        if(buf > 1){
            t[buf]++;
        }
    }
    int cnt_2 = 0, cnt_4 = 0, cnt_14 = 0, cnt_24 = 0, cnt_74 = 0;
    int ans = 0;
    rep(i, 0, 101){
        if(t[i] >= 2){
            cnt_2++;
        }
        if(t[i] >= 4){
            cnt_4++;
        }
        if(t[i] >= 14){
            cnt_14++;
        }
        if(t[i] >= 24){
            cnt_24++;
        }
        if(t[i] >= 74){
            cnt_74++;
        }
    }
    if(cnt_2 >= 1 && cnt_4 >= 2){
        ans += (cnt_2-2) * combination(cnt_4, 2);
    }
    if(cnt_4 >= 1 && cnt_14 >= 1){
        ans += (cnt_4-1) * cnt_14;
    }
    if(cnt_2 >= 1 && cnt_24 >= 1){
        ans += (cnt_2-1) * cnt_24;
    }
    ans += cnt_74;
    printf("%d", ans);

    return 0;
}