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 Python (3.4.3) (judge verdict: Accepted)

# 因数を昇順に全列挙
from collections import Counter
import math
def com(n,r):
    return math.factorial(n) // (math.factorial(n-r) * math.factorial(r))
fac_list = []
def factoring(n):
    for i in range(2,n+1):
        if n % i == 0:
            fac_list.append(i)
            n = n // i
            break
    if n == 1:
        return fac_list
    else:
        return factoring(n)
# (素因数,指数)
n = int(input())
c = list(Counter(factoring(math.factorial(n))).values())
# 指数 (2,4,4),(2,24),(4,14),(74) の場合の数
l = [0]*5 # [2,4,14,24,74]
for e in c:
    if e >= 74:
        index = 4
    elif e >= 24:
        index = 3
    elif e >= 14:
        index = 2
    elif e >= 4:
        index = 1
    elif e >= 2:
        index = 0
    else:
        continue
    l[index] += 1
sum_l = sum(l)
num_74 = l[4]
if sum_l - l[0] - 1 > 0:
    num_4_14 = (l[2] + l[3] + l[4])*(sum_l - l[0] - 1)
else:
    num_4_14 = 0
if sum_l - 1 > 0:
    num_2_24 = (l[3] + l[4])*(sum_l - 1)
else:
    num_2_24 = 0
if sum_l - l[0] >= 2:
    num_2_4_4 = com(sum_l-l[0],2)*(sum_l - 2)
else:
    num_2_4_4 = 0
ans = num_74 + num_4_14 + num_2_24 + num_2_4_4
print(ans)