# "Pythagorean triple fixed" by tails. # not golfed. 51,2>{:s,1>{:t; # for (s,t) s.t. 1 <= t < s <= 50 s.*t.*- :x; # x = s*s-t*t 2s*t* :y; # y = 2*s*t s.*t.*+ :z; # z = s*s+t*t x y < x y if :w; # w = min(x,y) 100 w/,{2*):d; # for d = 1, 3, 5, ... 2*(100/w)+1 <- too big eh? d 9% d 25% * 0> { # exclude some values from d to avoid dup. x d* :a; # (a,b,c) = d*(x,y,z) y d* :b; z d* :c; a 101 < {[a b c]}* # found b 101 < {[b a c]}* # found }* }/ }/}% $ # sort {" "*n}% # format