In the land of Binaria, the currency consists of coins worth 1¢ , 2¢ , 4¢ , 8¢ , 16¢ , 32¢ and 64¢ . Bina has two of each coin. How many combinations of her coins have a combined value of 50¢ ?
me personally i just brute forced it but it didnt work
We can solve this by realizing that 50¢ can be represented as the sum of 32¢ and 18¢.
For the 32¢ portion, Bina has two 32¢ coins, so there's only 1 choice (use both 32¢ coins).
For the remaining 18¢, Bina can use:
One 16¢ coin and one 2¢ coin (2 choices)
Two 8¢ coins (1 choice)
Nine 2¢ coins (1 choice)
So in total, there are 1 (32¢) + 2 (16¢+2¢) + 1 (8¢+8¢) + 1 (2¢+2¢+...+2¢) = 5 different combinations that add up to 50¢.