Skip to content

Instantly share code, notes, and snippets.

@arpruss
Created Jan 10, 2021
Embed
What would you like to do?
digits = """xxx
x.x
x.x
x.x
xxx
.x.
xx.
.x.
.x.
xxx
xxx
..x
.x.
x..
xxx
xxx
..x
.xx
..x
xxx
x.x
x.x
xxx
..x
..x
xxx
x..
xxx
..x
xxx
xxx
x..
xxx
x.x
xxx
xxx
..x
.x.
.x.
.x.
xxx
x.x
xxx
x.x
xxx
xxx
x.x
xxx
..x
xxx"""
lines = [l.replace("x","1").replace(".","0") for l in digits.split("\n")]
for i in range(10):
out = ""
for j in range(5):
out = "00" + lines[i*6+j] + out
print(i,int(out,2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment