n = [0, 3, 5, 6]
a = n + n.reverse().collect { 15 - it }
b = (0..15).toList() - a
[a, " ", b].each { print it }
println()
(0..3).each { p ->
ai = a.collect { it ** p }.sum()
bi = b.collect { it ** p }.sum()
[ai,bi].each { d -> print "${d}".padLeft(5) }
println()
}
biA9IFswLCAzLCA1LCA2XQphID0gbiArIG4ucmV2ZXJzZSgpLmNvbGxlY3QgeyAxNSAtIGl0IH0KYiA9ICgwLi4xNSkudG9MaXN0KCkgLSBhClthLCAiICIsIGJdLmVhY2ggeyBwcmludCBpdCB9CnByaW50bG4oKQooMC4uMykuZWFjaCB7IHAgLT4KICBhaSA9IGEuY29sbGVjdCB7IGl0ICoqIHAgfS5zdW0oKQogIGJpID0gYi5jb2xsZWN0IHsgaXQgKiogcCB9LnN1bSgpCiAgW2FpLGJpXS5lYWNoIHsgZCAtPiBwcmludCAiJHtkfSIucGFkTGVmdCg1KSB9CiAgcHJpbnRsbigpCn0=
[0, 3, 5, 6, 9, 10, 12, 15] [1, 2, 4, 7, 8, 11, 13, 14]
8 8
60 60
620 620
7200 7200