Problem list
Log in
#r03335 · Online Judge > GoldOJ

Integer Partitions

Gold V 2.0 s 256 MB

Print the number of ways to write $N$ as an unordered sum of positive integers, modulo $1{,}000{,}000{,}007$. For example $N=5$ has $7$ partitions.

Input

One integer $N$ ($1 \le N \le 1000$).

Output

Print the number of partitions of $N$ modulo $1{,}000{,}000{,}007$.

Example 1

Input
5
Output
7
Source
Online Judge > GoldOJ
Appears in
Not part of a ladder, contest or set yet.
Accepted 0 Submissions 0 Acceptance 0% Solvers 0

Discussion

Threads about this problem. Spoilers are collapsed; wrap hints in ||double bars||.

No discussion yet. Start a thread if something here needs explaining.

Recent submissions Open with filters
Code