Google Python挑战赛:不服,就来!
这是一个来自谷歌的秘密招聘挑战( )),如果你收到了谷歌的邀请,你应该感到高兴。谷歌的许多开发人员都是通过而被聘用的。
获得 邀请也是一件神秘的事情,不是每个人都能接受这个挑战。没有人确切知道 邀请资格的标准。
当你收到邀请时,它上面写着:
“You’re our . Up for a ?”
接受邀请后,你会看到一个看起来很酷的IDE,你可以在请求后打开右侧的代码编辑器并导航到解决方案文件.py。
交互界面模仿了 UNIX Shell:你可以通过命令来请求( )一个新的 、 提交( )代码、验证( )代码正确与否。
一旦你有了一个潜在的解决方案你可以验证它,你可通过测试来看看你的最终解决方案能否被接受。
整个挑战有3个level,level 1有1道题目,level 2有2道,level 3有3道。
让我们看看今天的这道题目吧(重点标记出来了):
has had an week: she the first test run of her , she six key of the Bunny , and she beat her high score in . To , she's cake for - even the of ! But among is , and if you don't equal of cake for , you'll get in big .
The cake is round, and with M&Ms in a the edge. But while the rest of the cake is , the M&Ms are not: there are , and every must get the same of M&Ms. hates waste and will not any , so you also want to make sure you can serve the cake.
To help you best cut the cake, you have the of of the M&Ms on the cake into a : each ( a and z) to a color, and the of M&Ms is given (the form a the outer edge of the cake).
Write a (s) that, given a non-empty less than 200 in the of M&Ms, the of equal parts that can be cut from the cake any .