Skip to main content
2 of 3
added 215 characters in body
kennytm
  • 7k
  • 20
  • 48

Python 3, 55 bytes (Cracked)

PCRE / Python / Golang flavor.

def [triangles=(1,SNAKE)]{27}:print[]SNAKE(--:>or[]{48} 

(Be reminded that Full match is required. Assume ^ and $ when testing.)

Sample output:

[1, 2, 3, 4] [8, 7, 6, 5] [9, 10, 11, 12] [16, 15, 14, 13] 

Original solution:

def r(N,S=1,A=1,K=range,E=list):print(E(K(S,S+N))[::A])or(S+N>N*N)or(r(N,S+N,-A,K,E)) 

Should have trimmed 4 bytes :p

kennytm
  • 7k
  • 20
  • 48