aoc-2021-rust

Advent of Code 2021 Solutions in Rust
git clone https://git.sinitax.com/sinitax/aoc-2021-rust
Log | Files | Refs | README | sfeed.txt

part2 (1004B)


      1--- Part Two ---
      2
      3It seems like the individual flashes aren't bright enough to navigate. However, you might have a
      4better option: the flashes seem to be synchronizing!
      5
      6In the example above, the first time all octopuses flash simultaneously is step 195:
      7
      8After step 193:
      95877777777
     108877777777
     117777777777
     127777777777
     137777777777
     147777777777
     157777777777
     167777777777
     177777777777
     187777777777
     19
     20After step 194:
     216988888888
     229988888888
     238888888888
     248888888888
     258888888888
     268888888888
     278888888888
     288888888888
     298888888888
     308888888888
     31
     32After step 195:
     330000000000
     340000000000
     350000000000
     360000000000
     370000000000
     380000000000
     390000000000
     400000000000
     410000000000
     420000000000
     43
     44If you can calculate the exact moments when the octopuses will all flash simultaneously, you should
     45be able to navigate through the cavern. What is the first step during which all octopuses flash?
     46
     47