Created
October 5, 2022 09:08
-
-
Save asukaminato0721/e5c9ef0edb39507107cf25142bdbd3e8 to your computer and use it in GitHub Desktop.
good data structure + simple algorithm.
This file contains hidden or 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
num2str = { | |
k: v.split("\n")[1:] | |
for k, v in { | |
1: """ | |
| | |
|""", | |
2: """ | |
_ | |
_| | |
|_ """, | |
3: """ | |
_ | |
_| | |
_|""", | |
4: """ | |
|_| | |
|""", | |
5: """ | |
_ | |
|_ | |
_|""", | |
6: """ | |
_ | |
|_ | |
|_|""", | |
7: """ | |
_ | |
| | |
|""", | |
8: """ | |
_ | |
|_| | |
|_|""", | |
9: """ | |
_ | |
|_| | |
_|""", | |
0: """ | |
_ | |
| | | |
|_|""", | |
}.items() | |
} | |
s = list(map(int, filter(str.isdigit, input()))) | |
for i in range(3): | |
for j in s: | |
print(f"{num2str[j][i]:<4}", end="") | |
print() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment