Google Python挑战赛:不服,就来!

这是一个来自谷歌的秘密招聘挑战()),如果你收到了谷歌的邀请,你应该感到高兴 。谷歌的许多开发人员都是通过而被聘用的 。
【Google Python挑战赛:不服,就来!】获得 邀请也是一件神秘的事情,不是每个人都能接受这个挑战 。没有人确切知道邀请资格的标准 。
当你收到邀请时,它上面写着:
“You’reour . Up for a ?”
接受邀请后,你会看到一个看起来很酷的IDE,你可以在请求后打开右侧的代码编辑器并导航到解决方案文件.py 。
交互界面模仿了 UNIX Shell:你可以通过命令来请求()一个新的 、 提交()代码、验证()代码正确与否 。

Google Python挑战赛:不服,就来!

文章插图
一旦你有了一个潜在的解决方案你可以验证它,你可通过测试来看看你的最终解决方案能否被接受 。
Google Python挑战赛:不服,就来!

文章插图
整个挑战有3个level,level 1有1道题目,level 2有2道,level 3有3道 。
Google Python挑战赛:不服,就来!

文章插图
让我们看看今天的这道题目吧(重点标记出来了):
has had anweek: shethe first test run of her, shesix keyof the Bunny , and she beat herhigh score in . To , she'scake for- even theof ! Butamongis , and if you don'tequalof cake for , you'll get in big .
The cake is round, andwith M&Ms in athe edge. But while the rest of the cake is , the M&Ms are not: there are, and everymust getthe sameof M&Ms.hates waste and will notany , so you also want to make sure you can serve thecake.
To help you best cut the cake, you havetheofof the M&Ms on the cake into a : each( a and z)to acolor, and theof M&Ms is given(theform athe outer edge of the cake).
Write a(s) that, given a non-emptyless than 200intheof M&Ms,theof equal parts that can be cut from the cakeany .