Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Find the max and min of `sum` of all permutations of [1..9] satisfying the following condition:
- ```
- sum
- == a[1] + a[2] + a[3]
- == a[3] + a[4] + a[5]
- == a[5] + a[6] + a[7]
- == a[7] + a[8]
- where sum = a[0] + a[1]
- ```
- A permutation satisfying that condition is `a = [9,4,1,8,3,2,5,6,7]`, and sum is `13`.
Add Comment
Please, Sign In to add comment