DIGNUM - Digital LED Number
Given a digital LED pattern of a number. You have to find the number and print it. All inputs will be valid as shown.
Input consists of LED patterns. Each pattern is given in set of fixed number of lines. You have to read input till EOF.
Print the number corresponding to each pattern.
_ _ _ _ _ _
_| _| _|| ||_||_
|_ _||_ |_| | _|
_ _ _
||_ |_||_ || |
||_| ||_| ||_|
_ _ _ _ _
| | | _| ||_|
Testfiles are clean - expected having to do some defensive input coding but it wasn't needed. Nice problem.
My 150th.....and really a nice one, avoid TLE by using while(gets(a)) :D
line ends with '\n' or EOF (-1). I was allocating 60KB for the input line, but you can write to be custom (use std::string for example).
EOF marks the end of the entire input? but then what marks the end of each line of input...or what is the limit of number of digits in one line?