Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def make_gen(a, b, mod=1 << 16):
- def gen(x):
- res = long(x)
- while(True):
- res = (a * res + b) % mod
- yield res
- return gen
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement