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 Rust (1.15.1) (judge verdict: Wrong Answer)

// Try AtCoder
//author: Leonardone @ NEETSDKASU

fn main() {
	let mut stdin = String::new();
    std::io::Read::read_to_string(
    	&mut std::io::stdin(),
        &mut stdin).unwrap();
    let mut stdin = stdin.split_whitespace();
    let mut get = || stdin.next().unwrap();
    macro_rules! get {
    	($t:ty) => (get().parse::<$t>().unwrap());
        () => (get!(i64));
    }
    
    let n =  get!(usize);
    
    let mut xs = vec![];
    let mut f = vec![false; n+1];
    for i in 2..n+1 {
    	if f[i] {
        	continue;
        }
        xs.push(i);
    	for j in 2..n {
        	if i*j <= n {
            	f[i*j] = true;
            }
        }
    }
    
    if xs.len() < 3 {
    	println!("0");
        return;
    }
    use std::collections::HashSet;
    let mut ys = vec![];
    for _ in 0..11 {
    	ys.push(HashSet::new());
    }
    
    ys[0].insert(1);
    for i in 1..n+1 {
    	for j in 1..ys.len() {
        	let j = ys.len()-j-1;
            let mut zs = vec![];
            for &y in ys[j].iter() {
            	let mut t = y*i;
                let mut c = 0;
                let mut d = 0;
                for k in 0..xs.len() {
                	let mut s = 0;
                	while t % xs[k] == 0 {
                    	s += 1;
                        c += 1;
                        t /= xs[k];
                    }
                    if s > 0 {
                    	d += 1;
                    }
                }
                if c > 10 || d > 3 {
                	continue;
                }
            	zs.push(y*i);
            }
            for &z in zs.iter() {
            	ys[j+1].insert(z);
            }
        }
    }
	let mut ans = 0;
    for &y in ys[7].iter() {
    	let mut t = y;
        let mut s = vec![0; xs.len()];
        let mut c = 0;
        let mut c2 = 0;
        let mut c4 = 0;
    	for i in 0..xs.len() {
        	while t % xs[i] == 0 {
            	s[i] += 1;
            	t /= xs[i];
                c += 1;
            }
            if s[i] == 2 {
            	c2 += 1;
            }
            if s[i] == 4 {
            	c4 += 1;
            }
        }
        if c2 == 1 && c4 == 2 {
        	ans += 1;
		}
    }
    println!("{}", ans);
}