# mango thieves

One night 3 naughty boys stole a basketful of mangoes from a garden,hid the loot and went off to sleep.before retiring they did some quick counting and found that the fruits were less than hundred in number.
during the night one boy awoke,counted the mangoes and found that he could divide the mangoes into 3 equal parts if he first took one for himself.he then took one mangoe,ate it up,and took 1/3 of the rest,hid them separately and went back to sleep.
shortly thereafter another boy awoke,counted the mangoes and he again found that if he took one for himself the loot could be divided into 3 equal parts.he ate up one mango,bagged 1/3 of the remainder,hid them separately and went back to sleep.
in the morning when they all woke up,and counted their mangoes,they found that the remaining mangoes again totalled 1 more than could be divided into 3 equal parts.
how many mangoes did the boys steal?
###### Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
N = original number

After first boy, 2/3 (N-1) remain
After second boy, 2/3 { 2/3 (N-1) -1} remain
After the final division, they have 2/3 ( 2/3 { 2/3 (N-1) -1} -1)  = 2/27 (2 {2 (N-1) -3} -9) = 2/27 (2 {2N - 5} - 9) = 2/27 (4N - 19)

We therefore need a number N less than 100 such that 4N - 19 can be divided by 27 evenly.  The first three possiblities are 27, 54, and 81.

4N-19 = 27 means 4N = 46, N is not an integer, so this is excluded
4N-19 = 54 means 4N = 73, which is excluded
4N-19 = 81 means 4N = 100; N = 25

The first boy eats one, leaving 24, hides 8, and returns the 16 remaining.
The hext boy eats one, leaving 15, hides 5, and returns the 10 remaining.
They awaken to find ten, one more than the 9  they could split evenly.

It is possible that there are more solutions with larger values of N less than 100; I did not explore them.
0

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Author Commented:
thanku
0
###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Puzzles / Riddles

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.