Problem:
Score : 300 points

Problem Statement

You are given an integer N.
Find the number of the positive divisors of N!, modulo 10^9+7.

Constraints

1≤N≤10^3

Input

The input is given from Standard Input in the following format:

N

Output

Print the number of the positive divisors of N!, modulo 10^9+7.

Sample Input 1

3

Sample Output 1

4

There are four divisors of 3! =6: 1, 2, 3 and 6. Thus, the output should be 4.

Sample Input 2

6

Sample Output 2

30

Sample Input 3

1000

Sample Output 3

972926972

Solution in Rust (1.15.1) (judge verdict: Accepted)

use std::str::FromStr;
use std::fmt::Debug;
use std::cmp;
#[allow(dead_code)]
fn read_as_vec<T>() -> Vec<T>
where T: FromStr, <T as FromStr>::Err : Debug{
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    s.trim().split_whitespace().map(|c| T::from_str(c).unwrap()).collect()

}

#[allow(dead_code)]
fn read_as_string() -> String{
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    s.trim().to_string()
}

fn main(){
    let n: u64 = read_as_vec()[0];

    let mut divisors = vec![0;(n+1) as usize];

    for i in 1..n+1{
        let mut x = i;
        for i in 2..(x as f64).sqrt().ceil() as u64 + 1{
            while x%i == 0{
                x /= i;
                divisors[i as usize] += 1;
            }
        }
        if x > 1{
            divisors[x as usize] += 1;
        }
    }
    let mut ans: u64 = 1;
    for div in divisors{
        ans = (ans * (div+1))%1_000_000_007;
    }

    println!("{}", ans);
}