Puzzle 13 - Alibaba's cave

Solution to puzzle 12:

I am using brute force algorithm here.

  • Let us start from the divisibility of 5.
  • If two cards remain after dealing them for 5, the largest value less than 52 will be 47
  • If there are 47 cards and they are dealt to 3 people, 2 cards are left
  • If they are dealt to 4 people 47 - 44 = 3 cards are left
  • So 47 is the correct answer.

Puzzle 13 : Alibaba's cave

This puzzle is from mrbartonmaths

Ali Baba found a cave full of gold and diamonds. A bag full of gold weighs 200 kilograms, a bag full of diamonds weighs 40 kilograms. Ali Baba can carry only 100 kilograms at a time. A kilogram of gold costs $20, and a kilogram of diamonds costs $60. What is the greatest amount of money Ali Baba can earn for the gold and diamonds he can carry out at once (in one attempt in one bag)?

Comments

Popular posts from this blog

Puzzle 9 : The 4 coins problem

Puzzle 35 - Open sesame

Puzzle 66 - solution