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: Wrong Answer)

use std::io::stdin;
use std::collections::HashMap;

#[allow(dead_code)]
fn input_ints() -> Vec<i64> {
    let mut st = String::new();
    match stdin().read_line(&mut st) {
        Ok(_) => st.split_whitespace().map(|s| s.parse().unwrap()).collect(),
        Err(_) => Vec::<i64>::new(),
    }
}

#[allow(dead_code)]
fn input_strs() -> Vec<String> {
    let mut st = String::new();
    match stdin().read_line(&mut st) {
        Ok(_) => st.split_whitespace().map(|s| s.to_string()).collect(),
        Err(_) => Vec::<String>::new(),
    }
}

#[allow(unused_variables)]
fn solve(){
    let inp = input_ints();
    let n = inp[0];

    let mut prime = HashMap::<i64, i64>::new();
    prime.insert(2,1);

    for i in 3..n+1 {
        let mut x = i;
        let mut flg = true;
        while flg {
            for j in 2..i+1 {
                if x == 1 {
                    flg = false;
                    break;
                }
                if x % j == 0 {
                    x /= j;
                    let num = prime.entry(j).or_insert(0);
                    *num += 1;
                    break;
                }
            }
        }
    }

    println!("{}",prime.iter().fold(1, |acc, (k, v)| acc * (v+1) % 1000000007));
}

fn main() {
    solve();
}