Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Recursive Generator solution in Clear category for Mathematically Lucky Tickets by flpo
import itertools
from operator import add, mul, sub, truediv
operations = add, mul, sub, truediv
def checkio(number):
def results(n):
yield int(n)
for i in range(1, len(n)):
for x, y in itertools.product(results(n[:i]), results(n[i:])):
yield from (op(x, y) for op in operations) if y else (x,)
return 100 not in results(number)
Sept. 1, 2017
Comments: