Pascal :
var m,i,n,j:integer; y:boolean; begin readln(n); y:=true; for i:=1 to n do for j:=i+1 to n do for m:=j+1 to n do begin if i*i+j*j=m*m then begin writeln(i,' ' ,j,' ',m);y:=false; end; end; if y=true then write('No'); end.
By signing up a 算道OJ universal account, you can submit code and join discussions in all online judging services provided by us.
Using your 算道OJ universal account