Advertisement
JoelSjogren

Untitled

Feb 23rd, 2014
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. #!/usr/bin/python
  2. from itertools import product
  3. 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)))
  4. def f(X):
  5.     a = sum(i[0] for i in X)
  6.     b = sum(i[1] for i in X)
  7.     return a * b
  8. print min(f(I) for I in product(*myset) if 0 < f(I))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement