n = [0, 3, 5, 6]
a = n + n.reverse.map {|x| 15 - x}
b = (0..15).to_a - a
[a, ' ', b].each{|x| print x}
print "\n"
(0..3).each do |p|
ai = a.map{|x| x ** p}.inject(:+)
bi = b.map{|x| x ** p}.inject(:+)
[ai,bi].each{|x| printf "%5d", x}
print "\n"
end
biA9IFswLCAzLCA1LCA2XQphID0gbiArIG4ucmV2ZXJzZS5tYXAge3x4fCAxNSAtIHh9CmIgPSAoMC4uMTUpLnRvX2EgLSBhClthLCAnICcsIGJdLmVhY2h7fHh8IHByaW50IHh9CnByaW50ICJcbiIKKDAuLjMpLmVhY2ggZG8gfHB8CiAgYWkgPSBhLm1hcHt8eHwgeCAqKiBwfS5pbmplY3QoOispCiAgYmkgPSBiLm1hcHt8eHwgeCAqKiBwfS5pbmplY3QoOispCiAgW2FpLGJpXS5lYWNoe3x4fCBwcmludGYgIiU1ZCIsIHh9CiAgcHJpbnQgIlxuIgplbmQ=
[0, 3, 5, 6, 9, 10, 12, 15] [1, 2, 4, 7, 8, 11, 13, 14]
8 8
60 60
620 620
7200 7200