Interview icon indicating copy to clipboard operation
Interview copied to clipboard

第141题(2020-01-31):假设有130个苹果,你我轮流拿,每次可拿1-5个,如何保证你拿到最后一个苹果?

Open qappleh opened this issue 6 years ago • 4 comments

qappleh avatar Feb 03 '20 12:02 qappleh

先手拿4个. 每次对手拿x个, 我都拿6-x个. 这样最后肯定会剩下6个, 无论对方怎么拿, 我方一定可以拿最后一下.

ustchcl avatar Jun 22 '20 10:06 ustchcl

如果对手先手拿了4个呢

zmheang avatar Sep 17 '21 14:09 zmheang

如果对手先手拿了4个呢

那就输定了

ustchcl avatar Sep 18 '21 07:09 ustchcl

原题目里是先手

ustchcl avatar Sep 18 '21 07:09 ustchcl