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:
/*
#![allow(non_snake_case)]
#![allow(unused_imports)]
 
use proconio::{input, fastout};
use proconio::marker::*;
use whiteread::parse_line;
use std::collections::*;

pub fn prime_factorize(mut n: usize) -> Vec<(usize, usize)> {
    let mut res: Vec<(usize, usize)> = Vec::new();

    let mut i: usize = 2;

    while i * i <= n {
        if n % i == 0 {
            let mut ex: usize = 0;

            while n % i == 0 {
                ex += 1;
                n = n / i;
            }
            res.push((i, ex));
        }
        i += 1;
    }

    if n != 1 {res.push((n, 1))}

    res
}

fn fact_prime_factorize(n: usize) -> HashMap<usize, usize> {
    let mut map: HashMap<usize, usize> = HashMap::new();
    for nn in 1..=n {
        let res = prime_factorize(nn);
        for (i, ex) in res.iter() {
            *map.entry(*i).or_insert(0) += ex;
        }
    }
    map
}

pub mod mod_int {
    use std::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Sub, SubAssign};
    const MOD: usize = 1e9 as usize + 7;
    #[derive(Clone, Copy, Debug)]
    pub struct ModInt<T: Copy + Clone + Add + AddAssign + Mul + MulAssign + Sub + SubAssign>(pub T);
    #[warn(unused_macros)]
    macro_rules !mod_int_impl {($($t :ty ) *) =>($(impl Add <ModInt <$t >>for ModInt <$t >{type Output =ModInt <$t >;fn add (self ,other :ModInt <$t >) ->ModInt <$t >{self +other .0 } } impl Add <$t >for ModInt <$t >{type Output =ModInt <$t >;fn add (self ,rhs :$t ) ->ModInt <$t >{let mut tmp =rhs +self .0 ;if tmp >=self ::MOD as $t {tmp =tmp -self ::MOD as $t ;} ModInt (tmp ) } } impl Sub <ModInt <$t >>for ModInt <$t >{type Output =ModInt <$t >;fn sub (self ,rhs :ModInt <$t >) ->ModInt <$t >{self -rhs .0 } } impl Sub <$t >for ModInt <$t >{type Output =ModInt <$t >;fn sub (self ,rhs :$t ) ->ModInt <$t >{let rhs =if rhs >=self ::MOD as $t {rhs %self ::MOD as $t } else {rhs } ;let value =if self .0 <rhs {self .0 +self ::MOD as $t } else {self .0 } ;ModInt (value -rhs ) } } impl AddAssign <ModInt <$t >>for ModInt <$t >{fn add_assign (&mut self ,rhs :ModInt <$t >) {*self =*self +rhs ;} } impl AddAssign <$t >for ModInt <$t >{fn add_assign (&mut self ,rhs :$t ) {*self =*self +rhs ;} } impl SubAssign <ModInt <$t >>for ModInt <$t >{fn sub_assign (&mut self ,rhs :ModInt <$t >) {*self =*self -rhs ;} } impl SubAssign <$t >for ModInt <$t >{fn sub_assign (&mut self ,rhs :$t ) {*self =*self -rhs ;} } impl Div <$t >for ModInt <$t >{type Output =ModInt <$t >;fn div (self ,mut rhs :$t ) ->ModInt <$t >{if rhs >=MOD as $t {rhs %=MOD as $t ;} self *ModInt (rhs ) .pow ((MOD -2 ) as usize ) } } impl Div <ModInt <$t >>for ModInt <$t >{type Output =ModInt <$t >;fn div (self ,rhs :ModInt <$t >) ->ModInt <$t >{self /rhs .0 } } impl DivAssign <$t >for ModInt <$t >{fn div_assign (&mut self ,rhs :$t ) {*self =*self /rhs } } impl DivAssign <ModInt <$t >>for ModInt <$t >{fn div_assign (&mut self ,rhs :ModInt <$t >) {*self =*self /rhs } } impl Mul <ModInt <$t >>for ModInt <$t >{type Output =ModInt <$t >;fn mul (self ,rhs :ModInt <$t >) ->ModInt <$t >{self *rhs .0 } } impl Mul <$t >for ModInt <$t >{type Output =ModInt <$t >;fn mul (self ,rhs :$t ) ->ModInt <$t >{ModInt (self .0 *rhs %self ::MOD as $t ) } } impl MulAssign <ModInt <$t >>for ModInt <$t >{fn mul_assign (&mut self ,rhs :ModInt <$t >) {*self =*self *rhs ;} } impl MulAssign <$t >for ModInt <$t >{fn mul_assign (&mut self ,rhs :$t ) {*self =*self *rhs ;} } impl ModInt <$t >{pub fn new (x :$t ) ->Self {ModInt (x %self ::MOD as $t ) } pub fn pow (self ,e :usize ) ->ModInt <$t >{let mut result =ModInt ::<$t >::new (1 ) ;let mut cur =self ;let mut e =e ;while e >0 {if e &1 ==1 {result *=cur ;} cur *=cur ;e >>=1 ;} result } } ) *) }
    mod_int_impl !(usize i32 i64 u32 u64 ) ;
}

#[fastout]
fn main() {
    input!{ n: usize, }
    type ModInt = mod_int::ModInt<usize>;
    let map = fact_prime_factorize(n);

    let ans = map.values().fold(ModInt::new(1), |acc, x| acc * ModInt::new(*x+1));



    // dbg!(&map);

    println!("{}", ans.0);
}
*/

fn main() {
    let exe = "/tmp/binF9AA278E";
    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>";