Goldbach partition by samuil

(a=(2..300).to_a).each{|n|a.reject!{|k|k%n==0&&k!=n}};a-=[2];a.product(a).reject{|a,b|a>b}.group_by{|a,b|a+b}.sort.each{|k,v|puts"#{k}: "+v.map{|k|k*"+"}*" " if k<301}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return top