mango thieves

Posted on 2006-04-15
Medium Priority
Last Modified: 2006-11-18
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?
Question by:shilpi84

Accepted Solution

samb39 earned 2000 total points
ID: 16462875
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

They start with 25 mangoes.
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.

Author Comment

ID: 16462942

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Moore’s Law has proven itself time and time again since it was first introduced. So what’s next? Will Moore’s law continue to remain relevant, or will new technology take over and bring us the next big advancement in computing?
Over time, the online landscape has altered considerably, but that’s nothing compared to the up-and-coming trends that will shape the web design industry in the coming year. Keep reading to find out which trends will shape B2B web design in 2018.
Loops Section Overview
Screencast - Getting to Know the Pipeline
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question