aoc-2018-python

Advent of Code 2018 Solutions in Python
git clone https://git.sinitax.com/sinitax/aoc-2018-python
Log | Files | Refs | README | sfeed.txt

part2 (1644B)


      1--- Part Two ---
      2
      3Now that your FFT is working, you can decode the real signal.
      4
      5The real signal is your puzzle input repeated 10000 times. Treat this new signal as a single input
      6list. Patterns are still calculated as before, and 100 phases of FFT are still applied.
      7
      8The first seven digits of your initial input signal also represent the message offset. The message
      9offset is the location of the eight-digit message in the final output list. Specifically, the
     10message offset indicates the number of digits to skip before reading the eight-digit message. For
     11example, if the first seven digits of your initial input signal were 1234567, the eight-digit
     12message would be the eight digits after skipping 1,234,567 digits of the final output list. Or, if
     13the message offset were 7 and your final output list were 98765432109876543210, the eight-digit
     14message would be 21098765. (Of course, your real message offset will be a seven-digit number, not a
     15one-digit number like 7.)
     16
     17Here is the eight-digit message in the final output list after 100 phases. The message offset given
     18in each input has been highlighted. (Note that the inputs given below are repeated 10000 times to
     19find the actual starting input lists.)
     20
     21
     22 - 03036732577212944063491565474664 becomes 84462026.
     23
     24 - 02935109699940807407585447034323 becomes 78725270.
     25
     26 - 03081770884921959731165446850517 becomes 53553731.
     27
     28
     29After repeating your input signal 10000 times and running 100 phases of FFT, what is the eight-digit
     30message embedded in the final output list?
     31
     32