Created
January 10, 2021 19:44
-
-
Save arpruss/ce80417f07131449252795051bf39717 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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