fork download
  1. import strutils
  2. const n = 3
  3. echo "n=", n
  4. for i in 0..<1 shl n:
  5. echo toBin(i xor (i shr 1),n)
Success #stdin #stdout 0s 2432KB
stdin
Standard input is empty
stdout
n=3
000
001
011
010
110
111
101
100