Advertisement
zvoulgaris

Square Triple

Feb 14th, 2020
2,640
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Julia 0.38 KB | None | 0 0
  1. # Square Triple drill
  2.  
  3. function st(Q::Array{Int64, 1})
  4.     N = length(Q)
  5.  
  6.     for i = 1:(N-2)
  7.         if Q[i] == 0; continue; end
  8.  
  9.         for j = (i+1):(N-1)
  10.             if Q[j] == 0; continue; end
  11.  
  12.             for k = (j+1):N
  13.                 if (Q[k] != 0) && (Q[i] * Q[j] == Q[k]^2); println(Q[[i,j,k]]); println(Q[[j,i,k]]); end
  14.             end
  15.         end
  16.     end
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement