Pythagorean quadruples: Difference between revisions

m
→‎{{header|R}}: Syntax highlighting.
m (→‎{{header|R}}: Syntax highlighting.)
Line 1,725:
=={{header|R}}==
The best solution to this problem - using lots of for loops - is practically language agnostic. The R way of doing this is far less efficient, taking about 10 minutes on my machine, but it's the obvious way to do this in R.
<lang Rrsplus>squares <- d <- seq_len(2200)^2
aAndb <- outer(squares, squares, '+')
aAndb <- aAndb[upper.tri(aAndb, diag = TRUE)]
331

edits