• + 0 comments

    For those interested, the technique needed to solve this exercises is close to the implementation of math.comb in the Python standard library (albeit using modulo 2⁶⁴ which comes for free if using unsigned integers). You can watch Raymond Hettinger's keynote "Numerical Marvels Inside Python" for more explanations.