Skip to content

Instantly share code, notes, and snippets.

@P-a-t-r-i-c-k
P-a-t-r-i-c-k / main.py
Created May 19, 2021 15:25
AoC 2017 day 15 in Python 3.7
#!/usr/bin/env python3
from numba import jit
from numpy import bitwise_and as np_and
@jit(nopython=True)
def generator_part1(previous:int, mult:int) -> int:
while True:
previous = (previous * mult) % 2147483647
yield previous