返回题库

Taxman 游戏:最大得分

Taxman

专题
Brainteaser / 脑筋急转弯
难度
L4

题目详情

黑板上写着 1..10。你每次选一个数,税官会拿走所有能整除该数的数。

你只能选择那些“仍至少有一个因子尚未被税官拿走”的数。直到没有可选数为止。若最后还有未被拿走的数,则税官把它们全部拿走。

你的得分是你选到的数之和。问:最优策略下你的最大得分是多少?

We start with the numbers 1101 - 10 on a board. You pick a number. The taxman then takes all the numbers that divide it evenly. We do this until there are no numbers left. However, you can only pick numbers that have at least one factor that hasn't been taken yet. If there are any unclaimed numbers at the end, the taxman takes them. Your score is the total of the numbers that you take. Following optimal strategy, what is your max possible score?

解析

最优选择序列可以达到拿到 6,7,8,9,106,7,8,9,10,总和为 40。

因此最大得分为 40。


Original Explanation

Notice that we can only take one prime off the board since all the primes are divisible only by 11 and themselves. Thus for our first pick, let's choose 77 (the largest prime on the board). The taxman then takes 11 and the board becomes 22, 33, 44, 55, 66, 88, 99, and 1010. We can't choose 22, 33, or 55 since they are prime and don't have any more factors. We should never choose 44 because we then can't take 88 later. In this case, the best choice to take is 99 since it is one of the larger numbers and only has one factor left (33). Now the board becomes 22, 44, 55, 66, 88, and 1010. Out of this set, 66 is the only number with only one factor so let's take it. Now the taxman takes 22. The board is now 44, 55, 88, and 1010. Now it doesn't matter what order we take 88 and 1010, the taxman will get 44 and 55. Thus the numbers we have are 66, 77, 88, 99, and 1010 which gives you a score of 4040 and the taxman has 11, 22, 33, 44, 55 which gives them a score of 1515. You win with a score of 4040!