With the code I wrote, the first possible solution for number of apples bought: 79
Friend 3 ate a total of 18 apples.
Friend 2 ate a total of 24 apples.
Friend 1 ate a total of 33 apples.
The donkey ate 4 apples.
Friend 1 is a pig.
I'm not entirely convinced I got it right, so I look forward to confirmation one way or the other via other approaches.
Friend 3 ate a total of 18 apples.
Friend 2 ate a total of 24 apples.
Friend 1 ate a total of 33 apples.
The donkey ate 4 apples.
Friend 1 is a pig.
I'm not entirely convinced I got it right, so I look forward to confirmation one way or the other via other approaches.