Skip to content

Instantly share code, notes, and snippets.

@keddad
Last active June 22, 2021 16:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keddad/dd355327f186f73f279dbb40e5971f23 to your computer and use it in GitHub Desktop.
Save keddad/dd355327f186f73f279dbb40e5971f23 to your computer and use it in GitHub Desktop.
with open("in.txt", "rt") as f:
data = list(map(int, f.readlines()))
cnt = 0
for i in range(len(data)):
for j in range(i + 5, len(data)):
if (data[i] + data[j]) % 2 == 1 and (data[i] * data[j]) % 13 == 0:
cnt += 1
print(cnt)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment