define range = (1..^250)var p5 =Hash()var sum2 =Hash()for i in (range) { p5{i**5} = ifor j in (range) { sum2{i**5+ j**5} = [i, j] }}var sk = sum2.keys.map{ Num(_) }.sortforpin (p5.keys.map{ Num(_) }.sort) { var s = sk.first {|s|p> s && sum2.exists(p-s) } \\ next var t = (sum2{s} + sum2{p-s} -> map{|n|"#{n}⁵" }.join(' + ')) say "#{t} = #{p5{p}}⁵"break}