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)

// This code is generated by [cargo-atcoder](https://github.com/tanakh/cargo-atcoder)
// Original source code:
/*
fn main() {
    proconio::input! {
        n: usize,
    }
    let mut hs = vec![];
    hs.push(std::collections::HashMap::new());
    for i in 2usize..=n {
        let mut hh = std::collections::HashMap::new();
        let mut tmp = i;
        'outer: loop {
            for j in 2..=tmp {
                if tmp % j == 0 {
                    *hh.entry(j).or_insert(0usize) += 1;
                    tmp /= j;
                    continue 'outer;
                }
            }
            break;
        }
        hs.push(hh);
    }
    let mut divisors = std::collections::HashMap::new();
    for i in 1..=n {
        for (j, k) in &hs[i - 1] {
            *divisors.entry(j).or_insert(0) += k;
        }
    }
    let ans = divisors
        .values()
        .map(|i| i + 1)
        .fold(1usize, |sum, i| (sum * i) % 1_000_000_007);
    println!("{}", ans);
}
*/

fn main() {
    let exe = "/tmp/bin179B3B09";
    std::io::Write::write_all(&mut std::fs::File::create(exe).unwrap(), &decode(BIN)).unwrap();
    std::fs::set_permissions(exe, std::os::unix::fs::PermissionsExt::from_mode(0o755)).unwrap();
    std::process::exit(std::process::Command::new(exe).status().unwrap().code().unwrap())
}

fn decode(v: &str) -> Vec<u8> {
    let mut ret = vec![];
    let mut buf = 0;
    let mut tbl = vec![64; 256];
    for i in 0..64 { tbl[TBL[i] as usize] = i as u8; }
    for (i, c) in v.bytes().filter_map(|c| { let c = tbl[c as usize]; if c < 64 { Some(c) } else { None } }).enumerate() {
        match i % 4 {
            0 => buf = c << 2,
            1 => { ret.push(buf | c >> 4); buf = c << 4; }
            2 => { ret.push(buf | c >> 2); buf = c << 6; }
            3 => ret.push(buf | c),
            _ => unreachable!(),
        }
    }
    ret
}

const TBL: &'static [u8] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
const BIN: &'static str = "<base64-encoded ELF executable removed>";