google-foobar

Google Foobar challenge Power Hungry - failing test no. 3 [hidden] out of 5 test cases?

不打扰是莪最后的温柔 提交于 2020-06-09 04:51:49
问题 I am doing google foobar challenge power hungry. I am failing in one test case out of 5 test cases which are hidden. Here is my code - def answer(b): from itertools import combinations arr = [] for i in range(1,len(b)+1): comb = combinations(b,i) for j in list(comb): mul = 1 for x in j: mul *= x if mul > 1000: break else: arr.append(mul) return str(max(arr)) Task is mentioned below - Power Hungry Commander Lambda's space station is HUGE. And huge space stations take a LOT of power. Huge space

lovely-lucky-lambs last test case not passing

[亡魂溺海] 提交于 2020-02-23 07:18:21
问题 I am being very late to the google foobar party. I am stuck at level 2, and only the last test case is pending. But I am completely clueless of what this question is expecting in this last test case. I googled the question and looks like they've updated the test case and the constraint of lambs < 10 has been removed. Question is: Lovely Lucky LAMBs Being a henchman isn't all drudgery. Occasionally, when Commander Lambda is feeling generous, she'll hand out Lucky LAMBs (Lambda's All-purpose