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::*;
use std::str::FromStr;

pub 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 is_prime(a: i64) -> bool {
    if a == 1 {
        return false;
    }
    for i in 2..a {
        if a % i == 0 {
            return false;
        }
    }
    return true;
}

fn main() {
    let n: i64 = read();
    let mut prime: Vec<i64> = vec![];
    for i in 1..n + 1 {
        if is_prime(i) {
            prime.push(i);
        }
    }
    // println!("{:?}", prime);
    let mut a: Vec<i64> = vec![0; prime.len()];
    for i in 0..prime.len() {
        let pi = prime[i];
        let mut current = pi;
        while current <= n {
            a[i] += n / current;
            current *= current;
        }
    }
    let mut sum = 1;
    for i in a {
        sum *= i + 1;
    }
    println!("{}", sum);
}