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 Ruby (2.3.3) (judge verdict: Accepted)

#n, m = gets.chomp.split.map(&:to_i)
#ary = []; n.times { cakes << gets.chomp.split.map(&:to_i).to_a } 
#def cb(i);	i==1 ? 1 : -1;end
n = gets.chomp.to_i
primes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47]
a = {}
a[2]=0
a[3]=0
a[5]=0
a[7]=0
a[11]=0
a[13]=0
a[17]=0
a[19]=0
a[23]=0
a[29]=0
a[31]=0
a[37]=0
a[41]=0
a[43]=0
a[47]=0
ans = 0

2.step(n, 1) { |i|
  memo = i
  primes.each do |prime|
  	while (memo % prime == 0) do
  	  memo = memo/prime
  	  a[prime] += 1
  	end
  	break if memo == 1
  end
}

over74 = a.select {|aa, v| v >73 }
over24 = a.select {|aa, v| v >23 }
over14 = a.select {|aa, v| v >13 }
over4 = a.select {|aa, v| v > 3 }
twos  = a.select {|aa, v| v == 2 || v== 3}
ofs = over4.size

ans += ofs*(ofs-1)*(ofs-2)/2
ans += ofs*(ofs-1)/2 * twos.size # 5 5 3 , 3が^2の時、と3が^5のときで分ける
ans += over14.size * ofs - over14.size
ans += over24.size * (twos.size + ofs) - over24.size
ans += over74.size

puts ans