fork download
  1. A=63; r=[]; a=A; b=1
  2. while(t=Math.sqrt(a*a-a*b+b*b))%1!=0
  3. b+=1
  4. end
  5. r << [a, b, t.round]
  6. a-=b; b=1
  7. while(t=Math.sqrt(a*a-a*b+b*b))%1!=0
  8. b+=1
  9. end
  10. r << [r[0][2], b+r[0][1], t.round]
  11. r << [A-r[0][1], r[1][2], A-r[1][1]]
  12. p r
Success #stdin #stdout 0.02s 7412KB
stdin
Standard input is empty
stdout
[[63, 15, 57], [57, 28, 43], [48, 43, 35]]