1. 程式人生 > >【數論】Factors of Factorial @upcexam6503

【數論】Factors of Factorial @upcexam6503

問題 G: Factors of Factorial

時間限制: 1 Sec  記憶體限制: 128 MB
提交: 57  解決: 33
[提交][狀態][討論版][命題人:admin]

題目描述

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

Constraints
1≤N≤103

輸入

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

輸出

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

樣例輸入

3

樣例輸出

4

提示

There are four divisors of 3! =6: 1, 2, 3 and 6. Thus, the output should be 4.


水題,差點沒做出來,就很尬。

階乘拆成質因子乘積,根據每種質因子可以取的數量,由乘法原理得到答案

程式碼略