fork download
  1. (println (map (fn j[x](apply max-key second(map(fn[w][w(- w(let[y(reduce +(map #(* % %)(set(flatten((fn f[q](let[c(filter(fn[r](=(mod q r)0))(range 2 q))](if(empty? c)q(map f c))))w)))))](if(= y 0)(* w w)y)))])(range 2(inc x))))) [3 10 50 1000]))
Success #stdin #stdout 2.66s 335488KB
stdin
Standard input is empty
stdout
([2 -2] [8 4] [48 35] [1000 971])