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>
#include<string.h> 
#define ll unsigned long long
ll factor[300]; 
ll memory[300];
int primefac(ll num){
    int i = 0,sum,n=0;
    while(*(factor+i) != 0){
        sum =1;
        while(num % *(factor+i)==0){
            num /= *(factor+i);
            memory[*(factor+i)] +=1;
        }
        i++;
    }
    return sum;
}


int elast(ll number){    
    ll tmp=0;
    int flag=0;
    *factor = 2;
    for(int i=3;i <= number;i++){
        flag=0;
        for(int j=0;j <= tmp ;j++){
            if(i % (*(factor+j)) == 0){
                flag=1;
                break;
            }
        }
        if(flag)continue;
        tmp += 1;
        *(factor+tmp) = i;
    }
        return tmp+2;
}

ll nCr(int n,int r){
  ll val=1;
  int i;
  if(r==0)return 1;
  for(i=0;i<n-r;i++){
		val *= (n-i);
		val /= (i+1);
	}
  return val;
}

int main(){
    ll three=0,nago=0,nigo=0,igo=0;
    ll five=0,N,i,j,sum=0;
    memset(factor ,0, sizeof(factor));
    memset(memory,0,sizeof(memory));
    scanf("%llu",&N);
    elast(N);
    for(i=1;i<N;i++){
      primefac(i+1);
    }
    for(i=0;i<N;i++){
      if(memory[i]+1>=75)nago++;
      if(memory[i]+1>=25)nigo++;
      if(memory[i]+1>=15)igo++;
      if(memory[i]+1>=5){
        five++;
        three++;
      }
      else if(memory[i]+1>=3){
        three++;
      }
    }
    if(three>=2){
     sum += nCr(five,2)*(three-2);
     sum +=nago;
     sum += nigo*(three-1);
     sum += igo*(five-1);
    }
    printf("%llu",sum);

    return 0;
}