#P10955. Integer Partition Count under Modulo
Integer Partition Count under Modulo
Integer Partition Count under Modulo
Given a positive integer N, partition it into the sum of at least two positive integers. In other words, find all ways to represent N as a sum of two or more positive integers, where the order of summands does not matter. For instance, even if the same number appears multiple times in a partition, the order is irrelevant.
The answer is defined as the number of distinct partitions (with at least two parts) modulo \(2147483648\). Note that the trivial partition in which N itself is the only summand is not allowed.
A hint: if p(N) denotes the total number of partitions of N (including the singleton partition), the answer is \(p(N)-1\) (when N is greater than 1) and 0 when N equals 1.
inputFormat
The input consists of a single line containing a positive integer N.
outputFormat
Output a single integer representing the number of ways to partition N into at least two positive integers, taken modulo \(2147483648\).
sample
1
0