Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for Mathematically Lucky Tickets by _Chico_
from itertools import product
def possible_results(data):
yield int(data)
for i in range(1, len(data)):
for (x,y) in product(
possible_results(data[:i]), possible_results(data[i:])
):
yield from (x+y, x-y, x*y)
if y:
yield x/y
def checkio(data):
return all(result != 100 for result in possible_results(data))
June 1, 2021