Skip to main content
added 259 characters in body
Source Link
ngm
  • 4.3k
  • 7
  • 29

R, 3527 bytes

expand.grid(-1:1,-1:1)[-5,]

Try it online!

30 and 35 bytes:

cbind(-1:1,rep(-1:1,e=3))[-5,]
expand.grid(rep(list(-1:1),2))[-5,]

Try it online!

R, 35 bytes

expand.grid(rep(list(-1:1),2))[-5,]

Try it online!

R, 27 bytes

expand.grid(-1:1,-1:1)[-5,]

Try it online!

30 and 35 bytes:

cbind(-1:1,rep(-1:1,e=3))[-5,]
expand.grid(rep(list(-1:1),2))[-5,]
Source Link
ngm
  • 4.3k
  • 7
  • 29

R, 35 bytes

expand.grid(rep(list(-1:1),2))[-5,]

Try it online!