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 Go (1.14.1) (judge verdict: Accepted)

package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func main() {
	scanInit()

	n := nextInt()
	if n == 1 {
		fmt.Println(0)
		return
	}

	m := map[int]int{}
	for i := 2; i <= n; i++ {
		fact := getFactor(i)
		for k, e := range fact {
			m[k] += e
		}
	}

	cle := make([]int, 0)
	for _, v := range m {
		cle = append(cle, v)
	}
	sort.Ints(cle)

	cnt := 0
	end := len(cle)

	// 2-4-4
	for i := 0; i < end; i++ { //2
		if cle[i] < 2 {
			continue
		}
		for j := 0; j < end; j++ { //4-1
			if i == j || cle[j] < 4 {
				continue
			}
			for k := 0; k < end; k++ { //4-2
				if j == k || i == k || cle[k] < 4 {
					continue
				}
				cnt++
			}
		}
	}
	cnt /= 2 // 4-1と4-2 で重複して数えているため

	// 4-14
	for i := 0; i < end; i++ { //4
		if cle[i] < 4 {
			continue
		}
		for j := 0; j < end; j++ { //14
			if i == j || cle[j] < 14 {
				continue
			}
			cnt++
		}
	}

	// 2-24
	for i := 0; i < end; i++ { //2
		if cle[i] < 2 {
			continue
		}
		for j := 0; j < end; j++ { //24
			if i == j || cle[j] < 24 {
				continue
			}
			cnt++
		}
	}

	// 74
	for i := 0; i < end; i++ { //74
		if cle[i] < 74 {
			continue
		}
		cnt++
	}

	fmt.Println(cnt)

	//cnt2 := num(75, m) +
	//	num(25, m)*(num(3, m)-1) +
	//	num(15, m)*(num(5, m)-1) +
	//	num(5, m)*(num(5, m)-1)*(num(3, m)-2)/2
	//fmt.Println(cnt2)
}
func num(x int, m map[int]int) int {
	cnt := 0
	for _, v := range m {
		if v >= x-1 {
			cnt++
		}
	}
	return cnt
}

// 素因数分解列挙Map作成
func getFactor(a int) (m map[int]int) {
	m = map[int]int{}
	for k := 2; a != 1; k++ {
		for ; a%k == 0; a /= k {
			m[k]++
		}
	}
	return m
}

// ---- readfunc
func scanInit() {
	const cap = 200 * 1024 // default=64*1024
	var buf = make([]byte, cap)
	sc.Buffer(buf, cap)
	sc.Split(bufio.ScanWords)
	return
}
func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}
func nextStr() string {
	sc.Scan()
	return sc.Text()
}