-module(chen).
-export([pythag/1]).
pythag(N)->
[{A,B,C}||
A<- lists:seq(1,N),
B<- lists:seq(1,N),
C<- lists:seq(1,N),
A+B+C=<N,
AA+BB=:=C*C
].
2022-11-30 18:30:07
-module(chen).
-export([pythag/1]).
pythag(N)->
[{A,B,C}||
A<- lists:seq(1,N),
B<- lists:seq(1,N),
C<- lists:seq(1,N),
A+B+C=<N,
AA+BB=:=C*C
].