aboutsummaryrefslogtreecommitdiff
path: root/challenge-109/lubos-kolouch/python/ch-2.py
blob: 7e545b449919e5a43a77f317a809e4288728736f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from itertools import permutations

numbers = [1, 2, 3, 4, 5, 6, 7]

for perm in permutations(numbers):
    a, b, c, d, e, f, g = perm
    if sum([a, b]) == sum([b, c, d]) == sum([d, e, f]) == sum([f, g]):
        print(f"a = {a}\nb = {b}\nc = {c}\nd = {d}\ne = {e}\nf = {f}\ng = {g}\n")
        break