#B3900. Digit Display Recognition
Digit Display Recognition
Digit Display Recognition
A display panel shows digits from \(\{\verb!0!,\verb!1!,\ldots,\verb!9!\}\) where each digit is represented by a fixed ASCII art as shown in the figure below.
The representation of each digit is given in a 7x5 grid as follows:
Digit | ASCII Art |
---|---|
0 |
xxxxx x...x x...x x...x x...x x...x xxxxx |
1 |
....x ....x ....x ....x ....x ....x ....x |
2 |
xxxxx ....x ....x xxxxx x.... x.... xxxxx |
3 |
xxxxx ....x ....x xxxxx ....x ....x xxxxx |
4 |
x...x x...x x...x xxxxx ....x ....x ....x |
5 |
xxxxx x.... x.... xxxxx ....x ....x xxxxx |
6 |
xxxxx x.... x.... xxxxx x...x x...x xxxxx |
7 |
xxxxx ....x ....x ....x ....x ....x ....x |
8 |
xxxxx x...x x...x xxxxx x...x x...x xxxxx |
9 |
xxxxx x...x x...x xxxxx ....x ....x xxxxx |
Given the complete content displayed on the screen (which consists of 7 lines; each digit occupies exactly 5 columns and digits are written side by side without any delimiters), your task is to recognize the digits and output the corresponding number string.
Note: In any formulas, use LaTeX formatting (for example, using \( ... \)).
inputFormat
The input consists of 7 lines. Each line is a string that represents one row of the ASCII art display. The display shows one or more digits, each occupying 5 columns. The digits are placed side by side without any spaces.
outputFormat
Output the digit string represented by the given ASCII art.
sample
xxxxx
x...x
x...x
x...x
x...x
x...x
xxxxx
0