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 <stdlib.h>
#include <math.h>

short p[100];
short pNum;

void makePrimeList(short n);

int main(void)
{
	char n,i,j,k,tmp;
	short b[100]={};
	int ans=0;
	scanf("%hhd",&n);

	makePrimeList(n);
	
	for (i=2;i<=n;i++) {
		for (j=0;j<pNum;j++) {
			if (i < p[j]) break;
			
			tmp = i;
			while (tmp > 1) {
				if (tmp % p[j] != 0) break;
				tmp = tmp / p[j];
				b[j]++;
			}
		}
	}

	// a^2 b^4 c^4
	for (i=0;i<pNum;i++) {
		if (b[i]>=4) {
			for (j=i+1;j<pNum;j++) {
				if (b[j]>=4) {
					for (k=0;k<pNum;k++) {
						if (b[k]>=2 && i!=k && j!=k) ans += 1;
					}
				}
			}
		}
	}

	// a^2 b^24
	for (i=0;i<pNum;i++) {
		if (b[i]>=24) {
			for (j=0;j<pNum;j++) {
				if (b[j]>=2 && i!=j) ans += 1;
			}
		}
	}

	// a^4 b^14
	for (i=0;i<pNum;i++) {
		if (b[i]>=14) {
			for (j=0;j<pNum;j++) {
				if (b[j]>=4 && i!=j) ans += 1;
			}
		}
	}

	// a^74
	for (i=0;i<pNum;i++) {
		if (b[i]>=74) ans += 1;
	}

	printf("%d\n",ans);
	return 0;
}

void makePrimeList(short n)
{
	short i,j,*tmpP;
	tmpP = (short *)malloc(sizeof(short) * n);
	tmpP[0] = 1;
	for (i=1;i<n;i++) tmpP[i] = 0;

	pNum = 0;
	for (i=2;i<=sqrt(n);i++) {
		if (tmpP[i-1]==1) continue;
		
		p[pNum] = i;
		pNum++;
		for (j=i;j<=n;j+=i) {
			tmpP[j-1] = 1;
		}
	}

	for (i=(int)sqrt(n);i<=n;i++) {
		if (tmpP[i-1]==1) continue;

		p[pNum] = i;
		pNum++;
	}

	return;
}