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.42.0) (judge verdict: Wrong Answer)

use std::collections::HashMap;
use std::io::*;
use std::str::FromStr;

//https://qiita.com/tubo28/items/e6076e9040da57368845
fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

fn factorial_2_prime_factorize(n: usize) -> HashMap<usize, usize> {
    let mut factors = HashMap::new();
    for i in 2..n + 1 {
        let mut a = 2;
        let mut temp_i = i;
        while a * a <= temp_i {
            while temp_i % a == 0 {
                let exp = factors.entry(a).or_insert(0);
                *exp += 1;
                temp_i /= a;
            }
            a += 1;
        }
        if temp_i != 1 {
            let exp = factors.entry(temp_i).or_insert(0);
            *exp += 1;
        }
    }
    factors
}
fn main() {
    let n: usize = read();
    let enums = factorial_2_prime_factorize(n);
    let mut ans = 1;
    for (_, v) in enums {
        ans *= v + 1;
    }
    println!("{}", ans);
}