C - Factors of Factorial Editorial /

Time Limit: 2 sec / Memory Limit: 256 MB

配点 : 300300

問題文

整数 NN が与えられます。 N!N! の正の約数の個数を 109+710^9+7 で割った余りを求めてください。

制約

  • 1N1031≦N≦10^3

入力

入力は以下の形式で標準入力から与えられる。

NN

出力

N!N! の正の約数の個数を 109+710^9+7 で割った余りを出力せよ。


入力例 1Copy

Copy
3

出力例 1Copy

Copy
4

3!3! =6=6 です。66 の正の約数は 1,2,3,61,2,3,644 個なので、44 を出力します。


入力例 2Copy

Copy
6

出力例 2Copy

Copy
30

入力例 3Copy

Copy
1000

出力例 3Copy

Copy
972926972

Score : 300300 points

Problem Statement

You are given an integer NN. Find the number of the positive divisors of N!N!, modulo 109+710^9+7.

Constraints

  • 1N1031≤N≤10^3

Input

The input is given from Standard Input in the following format:

NN

Output

Print the number of the positive divisors of N!N!, modulo 109+710^9+7.


Sample Input 1Copy

Copy
3

Sample Output 1Copy

Copy
4

There are four divisors of 3!3! =6=6: 11, 22, 33 and 66. Thus, the output should be 44.


Sample Input 2Copy

Copy
6

Sample Output 2Copy

Copy
30

Sample Input 3Copy

Copy
1000

Sample Output 3Copy

Copy
972926972


2025-04-28 (Mon)
18:38:24 +00:00