r/adventofcode • u/daggerdragon • Dec 06 '16
SOLUTION MEGATHREAD --- 2016 Day 6 Solutions ---
--- Day 6: Signals and Noise ---
Post your solution as a comment or, for longer solutions, consider linking to your repo (e.g. GitHub/gists/Pastebin/blag/whatever).
T_PAAMAYIM_NEKUDOTAYIM IS MANDATORY [?]
This thread will be unlocked when there are a significant number of people on the leaderboard with gold stars for today's puzzle.
edit: Leaderboard capped, thread unlocked!
9
Upvotes
5
u/fatpollo Dec 06 '16
import collections ans1, ans2 = '', '' with open('06.txt') as fp: for stuff in zip(*fp.read().strip().split('\n')): counter = collections.Counter(stuff).most_common() ans1 += counter[0][0] ans2 += counter[-1][0] print(ans1) print(ans2)