In the story of the same name, Robin Hood is known for stealing back money from the unjust king who
levied abusive taxes on the poor. One evening, Robin Hood stole several bags of coins from the king's
treasury. Each bag contained either 16, 17, 23, 24, 39, or 40 coins. When he emptied the bags he had
stolen, he found that he had exactly 100 coins.

What bags did he take?

**ANSWER**:

*He took 2 bags with 16 coins and 4 bags with 17 coins*.

**EXPLANATION**: The table below shows the maximum number of each bag that could have been taken:

If you add up all the possible totals from the different combinations of 16-coin bags and 17 coin bags,
you get the following 25 possible totals:

0

16

17

32

33

34

48

49

50

51

61

64

66

67

68

81

82

83

84

85

96

97

98

99

100 (2 bags of 16 coins and 4 bags of 17 coins)

If you add up all the possible totals from the different combinations of 23-coin bags, 24-coin bags,
39-coin bags, and 40-coin bags, you get the following 25 possible totals:

0

23

24

46

47

48

62

63

64

69

70

71

72

78

79

80

85

86

87

88

92

93

94

95

96

Finally, if you add up all the different pairs of totals from each of those 2 lists, only one gives a
total of 100 coins (2 bags of 16 coins and 4 bags of 17 coins).

Do you have a

suggestion for this puzzle (e.g. something that should
be mentioned/clarified in the question or solution, bug, typo, etc.)?