Sums and constraints

Hi there,
straight to the problem:

- We can only use numbers from 1 to 4.
- We have a sum p to reach, as large as we want
- We have a max number of addends s, as large as we want
- We have to calculate the min addend and the max addend we have to use to reach the sum, if it is ever possible to be reached.