Level: LCG lvl 1
import random class prng_lcg: a = 672257317069504227 c = 7382843889490547368 m = 9223372036854775783 def __init__(self, seed): self.state = seed def next(self): self.state = (self.state * self.a + self.c) % self.m return self.state def generate(): rng = prng_lcg(random.randint(1, 2**63)) return [rng.next() for _ in range(3)]