This commit is contained in:
2026-01-21 20:35:30 +03:00
parent 535079b255
commit 416e31a5e8
9 changed files with 2967 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
from itertools import permutations
def task2() -> None:
x = list(range(1, 17))
for perm in permutations(x):
if (
perm[0] + perm[4] == 19
and perm[1] + perm[5] == 17
and perm[2] + perm[6] == 12
and perm[3] + perm[7] == 18
and perm[8] + perm[12] == 8
and perm[9] + perm[13] == 31
and perm[10] + perm[14] == 16
and perm[11] + perm[15] == 15
):
print(perm)
def main() -> None:
task2()
if __name__ == "__main__":
main()