乐乐和聪聪轮流从中拿1个或2个
- 时间:2020-05-14 13:11:46
- 分类:数学世界
- 阅读:120 次
数学题:箱子里装了16个球,乐乐和聪聪轮流从中拿1个或2个,谁拿到最后一个球谁就获胜,如果聪聪先拿,第一次应该拿几个才能确保获胜?如果箱子里有20个球呢?说说理由。
数学题解答:16个球,聪聪应该先拿1个,可以确保获胜。因为,当他拿一个后,还剩下15个球。此时如果乐乐拿1个,他就拿2个;如果乐乐拿2个,他就拿1个。总之,聪聪拿的与乐乐拿的合起来是3个。而15里面正好5个3,这样便可以确保聪聪拿到最后一个球。
拿的方法就是,聪聪拿过之后,剩下的球的数量是3的倍数,便可以确保聪聪获胜。这样如果是20个球,你一定知道是怎么拿的了吧?
推荐阅读:How to Split a String in C++? The Best Instagram Feed WordPress Plugins to Use Trie Class Data Structure in Python How to Monitor the CPU Temperature of Raspberry PI using Python Listen to what an SEO expert has to say about its benefits Depth First Search Algorithm to Compute the Smallest String Star Algorithm to Check if All Points are On the Same Line Prefix Sum Algorithm to Count Number of Nice Subarrays How to Append Another List to a Existing List in Python? (Differ Linear Algorithm to Check If All 1’s Are at Least Length K
- 评论列表
-
- 添加评论