Suppose I am given a set of $N$ Natural Numbers, I have to find if it is possible to pick any $K$ numbers from the set such that the sum of the $K$ numbers equals to $S$. All $K$ numbers should be distinct.
For example,
N=5 , K=3 , S=10
One of the ways = 5+3+2
N=5 , K=3 , S=18
No Ways