Is there are exactly one partition, given length of partition and maximum number? It is Restricted Integer Partitions, but with maximum number.
Question
Three positive integers are given. First number is number to divide, second number is length of partition, and third number is maximum number. First number is always largest, and bigger than other two.
For example, 5, 2, 3. Then, make partition of 5 which have 2 parts, and maximum number you can use is 3. Note that you don't have to use 3 : maximum number can be 2 or 1.
In this case, there is only one partition : 3, 2.
Partition is unordered : which means 3 + 2 and 2 + 3 is same.
But in case like 7, 3, 3, there are two partition : 3, 3, 1 and 3, 2, 2.
To make it sure, You can use third number as largest number, but you don't have to use it. So 5, 4, 3 is true.
Question is : Is there are more than one partition, given length and maximum number?
Output is True or 1 or whatever you want when there is only one partition, and False or 0 or whatever you want where there are more than one partition, or no partition.
Winning condition
This is code golf, so code with shortest byte wins.
Examples
Input -&gt; Output
7, 6, 2 -&gt; True (2+1+1+1+1+1) : 1 partitions
5, 4, 4 -&gt; True (2+1+1+1) : 1 partitions
5, 4, 3 -&gt; True (2+1+1+1) : 1 partitions
5, 4, 2 -&gt; True (2+1+1+1) : 1 partitions
5, 3, 2 -&gt; True (2+2+1) : 1 partitions
7, 2, 3 -&gt; False no partitions
7, 2, 2 -&gt; False no partitions
7, 2, 1 -&gt; False no partitions
9, 5, 3 -&gt; False (3+3+1+1+1), (3+2+2+1+1), (2+2+2+2+1) : 3 partitions
6, 3, 3 -&gt; False (3+2+1), (2+2+2) : 2 partitions
Python 2, 38 bytes



lambda n,k,m:m&gt;n-k&lt;2or-1&lt;k*m-n&lt;2+2/m*k


Try it online!

Characterizes the cases where there's only one legal partition.

Consider the partitions of \$n\$ into exactly \$k\$ parts each between \$1\$ and \$m\$ inclusive. There's only two ways to for there to be only one such partition.


The number \$n\$ is close to as small as possible (\$n=k\$ or \$n=k+1)\$ or as large as possible (\$n=mk-1\$ or \$n=mk)\$ for such a partitions. This leave only enough "wiggle room" for only one partition in each case:


\$n=1+1+\cdots +1+1\$.
\$n=2+1+\cdots+1+1\$.
\$n=m+m+\cdots+m+(m-1)\$.
\$n=m+m+\cdots+m+m\$. 

We allow only \$m=2\$ maximum, forcing a unique partition made of 1's and 2's. Such a partition requires \$k \leq n \leq 2k\$.


The challenge lets us assume that \$n&gt;k\$, so we can omit the \$n=k\$ case and \$k \leq n\$ check, and, as feersum observed, can let us check \$n=k+1\$ as \$n&lt;k+2\$.  The \$m=1\$ case makes it impossible to make a partition with \$n&gt;k\$, so we make sure it's always rejected. This gives the condition


  \$n \in \{ k+1, mk-1, mk\}\$and \$ m&gt;1\$, or \$n \leq 2k \$ and \$m=2\$