Skip to content

Instantly share code, notes, and snippets.

@pedrosorio
Last active December 4, 2016 23:00
Show Gist options
  • Save pedrosorio/7382afa5a816f241903fefc8671f7f4a to your computer and use it in GitHub Desktop.
Save pedrosorio/7382afa5a816f241903fefc8671f7f4a to your computer and use it in GitHub Desktop.
Advent of code day 3 part 2
print len([tri for tri in map(sorted, zip(*(iter([item for sublist in map(list, zip(*[map(int, line.strip().split()) for line in open("input_1.txt").readlines()])) for item in sublist]),) * 3)) if tri[0] + tri[1] > tri[2]])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment