Last active
June 22, 2021 16:41
-
-
Save keddad/dd355327f186f73f279dbb40e5971f23 to your computer and use it in GitHub Desktop.
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
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