One Christmas night, 3 kids were sleeping in their room. Their father came and kept a bag full of chocolates in the center of room with a card that says: "Sweets for my three sweet kids."

  1. At midnight, the first kid wakes up, and sees the bag of chocolates. He takes exactly one third of the chocolates in the bag, hides them under his pillow, and leaves the remaining chocolates in the bag.

  2. After some time the second kid wakes up. He does the same with the chocolates that were left by the first kid.

  3. Then, the third kid wakes up after some time and does the same as well.

Finally, at morning they all wake up, looked at each other and said "Look, we got chocolates!" They divided the chocolates equally again.

So, what is the least number of chocolates their father would have kept in the bag?


Each time at night a kid divided the chocolates, there was no remainder. The same happened in morning, it all divided equally.

  • $\begingroup$ No trickery? When each kid woke up, the previous kid was asleep? $\endgroup$ – Brent Hackers Jun 10 '16 at 11:22

Let's say $X$ is the number of chocolates.
This means.

$X mod 3 = 0$.
how the first kid divided them

$\frac{2}{3} * X mod 3 = 0$
the second kid had only $\frac{2}{3}$ of the total chocolates to divide.
He takes $\frac{1}{3}$ of $\frac{2}{3} * X$ so the last kid counts
$\frac{4}{9} * X$ chocolates.
This means $\frac{4}{9} * X mod 3 = 0$.

The third kid takes $\frac{1}{3}$ of $\frac{4}{9}$ of X...so $\frac{4}{27}$ of chocolates.
S0 on the last morning there are left ($\frac{4}{9} - \frac{4}{27}) * X = \frac{8}{27} * X$.
And this $\frac{8}{27} * X mod 3 = 0$.
This means $\frac{8}{27} * X = 3k$.
in order for x to be integer, $3K$ must be divisible by 8.
The smallest possible $k$ is 8, so $\frac{8}{27} * X = 24$.

Solving the equation we get X =


How it all happened.
The fist kid wakes up:

Divides 81 chocolates into 3 piles of 27.
He hides his 27 and puts 54 back.

Second kid wakes up.

Divides 54 chocolates into 3 piles of 18.
puts his 18 under the pillow and puts back 36.

The last kid wakes up

Divides 36 chocolates into 3 piles of 12.
puts his 12 under the pillow and puts back 24.

They all wake up and

divide 24 chocolates. 8 each.


They divide the chocolates

4 times => 3*3*3*3 => 81
The last division must at least have 3 chocolates to divide it equaliy to all children. The rest just follows plain simple.

  • $\begingroup$ nope.. the last division cant be 3, 3, 3 $\endgroup$ – Wasiq Shahrukh Jun 10 '16 at 11:25
  • $\begingroup$ the answer is correct but the deduction is wrong. $\endgroup$ – Marius Jun 10 '16 at 12:04
  • $\begingroup$ @WasiqShahrukh I didn't say that every child got 3 chocolates... There must be at least 3 chocolates for all of them at the last division $\endgroup$ – Wa Kai Jun 10 '16 at 12:16
  • $\begingroup$ @Marius Why is the deduction wrong? There are 4 divisions with 3 as the divisor. How much chocolates every child got, wasn't the question. $\endgroup$ – Wa Kai Jun 10 '16 at 12:19
  • $\begingroup$ @WaKai See my answer below as well. OP hasn't worded the question very well. Once the first child divides them into three, he takes one third and leaves two thirds, which is then divided by the second child, who also leaves two thirds for the third child. $\endgroup$ – Inazuma Jun 10 '16 at 13:44

There are two interpretations of the problem, not made quite clear by OP. This one assumes that the first child splits the chocolates up onto thirds and the next child only uses one of these thirds.

81 (i.e. $3^4$) chocolates
First division - 27 each
Second division - 9 each
Third division - 3 each
Morning - 1 each.

The second interpretation, is when the first kid wakes up and splits them into thirds, the second kid takes two thirds and so on... then:

81 chocolates to start
First division - 27/54 split
Second division - 18/36 split
Third division - 12/24 split
Morning - 8 each
(but really the first kid has 35 in total, the second kid has 26, and the third kid has 20).
We cannot go any lower since there is no common divisor with a factor of 3.

Coincidentally, they are the same number.

  • 1
    $\begingroup$ Wow.. too fast for me. I was typing up my answer when this popped up. Well done! $\endgroup$ – CipherBot Jun 10 '16 at 11:21
  • 1
    $\begingroup$ @CipherBot 27 each is right but not 9 each and 3 and 1 $\endgroup$ – Wasiq Shahrukh Jun 10 '16 at 11:22
  • $\begingroup$ @WasiqShahrukh Is it the first interpretation or second interpretation in my answer? $\endgroup$ – Inazuma Jun 10 '16 at 11:26
  • $\begingroup$ @WasiqShahrukh You need to make your questions clearer. I have answered both interpretations. $\endgroup$ – Inazuma Jun 10 '16 at 11:36
  • $\begingroup$ @Inazuma yup that's correct :) its is understodd if the first kid takes the 1/3rd then obviously 2nd will divide the remaining 2/3rd into other 3 parts and so on.. $\endgroup$ – Wasiq Shahrukh Jun 10 '16 at 11:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.