Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- from itertools import product
- myset = (((-315, -315),), ((70, 70), (140, 140)), ((126, 126), (42, 168), (168, 42), (84, 84)), ((120, 30), (30, 120), (150, 150), (60, 60), (180, 90), (90, 180)))
- def f(X):
- a = sum(i[0] for i in X)
- b = sum(i[1] for i in X)
- return a * b
- print min(f(I) for I in product(*myset) if 0 < f(I))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement