Light Mode
Dark Mode
Whats's wrong?

My Code:

def stones(pile, moves):
    results = [True] + [False] * pile
    for count in range(1, pile + 1):
        possible = [x for x in moves if count - x >= 0]
        results[count] = all(results[count - i] for i in possible)
    return results

I try do it using hints, but my result always True, what I doing wrong?

Created: Sept. 23, 2018, 4:52 p.m.
Updated: April 9, 2019, 10:03 a.m.
0
35
User avatar
fed.kz