Skip to content

Instantly share code, notes, and snippets.

Last active December 1, 2020 16:47
What would you like to do?
def naiveFind3():
data = list()
with open(file, 'r') as infile:
for line in infile:
for i in range(len(data)):
for j in range(i, len(data)):
for k in range(j, len(data)):
if data[i] + data[j] + data[k] == 2020:
success(data[i], data[j], data[k])
print("Finished loop, no triples found that sum to 2020")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment