JP's Blog

  • GitHub * Flickr * Resume
  • Reviews
  • Programming
  • Home Automation
  • Photography
  • Maker
  • Writing
  • Research
  • Search
  • RSS

AoC 2017 Day 15: Two Generators

2017-12-15

Source: Dueling Generators

Part 1: Create a pair of generators A and B where:

  • A_n = 16807 A_{n-1} \mod 2147483647
  • B_n = 48271 B_{n-1} \mod 2147483647

How many of the first 40 million values have matching values for the low 16 bits of each generator?

read more...


  • ««
  • «
  • 1
  • 2
  • »
  • »»
  • All posts: By Date
  • All posts: By Tag
  • RSS: All
  • RSS: programming/topics

All posts unless otherwise mentioned are licensed under Creative Commons License

Any source code unless otherwise mentioned is licensed under the 3 clause BSD license