Created
December 3, 2016 07:26
-
-
Save Ape/f76a63362db4d72b8086ed8ff3ea27f5 to your computer and use it in GitHub Desktop.
AoC 2016 Day 3 Part 2 with Numpy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import numpy as np | |
data = np.loadtxt(sys.stdin).T.reshape(-1, 3).T | |
data.sort(axis=0) | |
print(np.sum(sum(data[:2]) > data[2])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment