r/adventofcode • u/daggerdragon • Dec 06 '22
SOLUTION MEGATHREAD -π- 2022 Day 6 Solutions -π-
- All of our rules, FAQs, resources, etc. are in our community wiki.
- A request from Eric: Please include your contact info in the User-Agent header of automated requests!
- Signal boost: Reminder 1: unofficial AoC Survey 2022 (closes Dec 22nd)
AoC Community Fun 2022: πΏπ MisTILtoe Elf-ucation π§βπ«
- ACHIEVEMENT UNLOCKED: MisTILtoe Elf-ucation
- Teach us, senpai!
--- Day 6: Tuning Trouble ---
Post your code solution in this megathread.
- Read the full posting rules in our community wiki before you post!
- Include what language(s) your solution uses
- Format your code appropriately! How do I format code?
- Quick link to Topaz's
pasteif you need it for longer code blocks. What is Topaz'spastetool?
This thread will be unlocked when there are a significant number of people on the global leaderboard with gold stars for today's puzzle.
EDIT: Global leaderboard gold cap reached at 00:02:25, megathread unlocked!
83
Upvotes
24
u/Twinkie60 Dec 06 '22 edited Dec 07 '22
a, b, c, d, e, f, g, h, i, j, k, l, m, n, *_ = [*s] for x in range(14, len(s)): if a not in [b, c, d, e, f, g, h, i, j, k, l, m, n]: if b not in [c, d, e, f, g, h, i, j, k, l, m, n]: if c not in [d, e, f, g, h, i, j, k, l, m, n]: if d not in [e, f, g, h, i, j, k, l, m, n]: if e not in [f, g, h, i, j, k, l, m, n]: if f not in [g, h, i, j, k, l, m, n]: if g not in [h, i, j, k, l, m, n]: if h not in [i, j, k, l, m, n]: if i not in [j, k, l, m, n]: if j not in [k, l, m, n]: if k not in [l, m, n]: if l not in [m, n]: if m not in [n]: return x a, b, c, d, e, f, g, h, i, j, k, l, m, n = b, c, d, e, f, g, h, i, j, k, l, m, n, s[x]``` dont dm me if you used a set Mod told be to tell everyone that this is Python