A binary eye is an odd set of digits, with all of its digits except the center one set to 1 or 0, and the center one set to the opposite of the others. Thus, there are two binary eyes for a given odd number of digits:
x | eyes |
---|---|
1 | 1,0 |
3 | 101,010 |
5 | 11011,00100 |
7 | 1110111,0001000 |
9 | 111101111,000010000 |
Make the smallest program possible, in any language, that prints out x number of binary eyes.
For example, with an input of two, the program would output
1,0 and 101,010.
With 3 it should output that and the next, and with 4 the next as well, and so on.
with 5 it should output the complete table above.
You can also have it just continue giving outputs, as long as it outputs only correct outputs, and at least the number of outputs asked for.
n=1
output0,1
instead of1,0
? \$\endgroup\$2n
bits with the same separator between each of them? For example, for n=5[1,1,0,1,1,0,0,1,0,0]
or"1101100100"
? \$\endgroup\$