Untitled

 avatar
unknown
python
a year ago
288 B
6
Indexable
def f(s, move):
    if s >= 64:
        return move % 2 == 0
    if move == 0:
        return 0

    games = [f(s + 1, move - 1), f(s + 2, move - 1), f(s * 3, move - 1)]
    return any(games) if (move - 1) % 2 == 0 else all(games)


print([s for s in range(1, 64) if f(s, 3)])
Editor is loading...
Leave a Comment