User blog comment:Deedlit11/Bignum Bakeoff appetizer/@comment-2033667-20140915173148

def main: w = [99] m = 1 while w:		k = -1 for i, n in enumerate(w): if n < w[-1]: k = i		w = w[:-1] if w[-1] == 0 else w[:k + 1] + (w[k + 1:-1] + [w[-1] - 1]) * m		m += 1 return m