Here is how I did it:
Let x be the number of coconuts to start with. We are given that it is a whole number.
After Sailor 1 gives one to the monkey and takes a third. Then the number of coconuts remaining is (x-1) - (x-1) (1/3) = 2(x-1)/3.
Sailor 2 gives 1 coconut to the monkey, so there are 2(x-1)/3 - 1 = (2x-5)/3. He takes a third and leaves [(2x-5)/3](2/3) = (4x-10)/9.
Sailor 3 gives 1 to the monkey. so now (4x-10)/9 -1 = (4x-19)/9 are left. He takes a third, leaving behind [(4x-19)/9](2/3) = (8x-38)/27. This is the number of coconuts in the pile that the sailors found next morning. Let (8x-38)/27 = y, say, which gives 8x = 27y + 38.
Now what do we know about this number y? We are given that it is less than 10 AND it is a whole number divisible by 3 (because each sailor took a third and nothing was left). Therefore possible
values for this number are 0, 3, 6 and 9. But we are also given that the initial pile had a whole number of coconuts. Hence, the problem reduces to finding that y from which 8x = 27y + 38, gives an x as a whole number.
You will see that the only y that gives x as a whole number is y = 6!!! Then 8x = 200, so x = 25, as obtained by Philllip B. Any comments?
Dattaprabhakar (Dr. G.)