Possible Duplicate:
Code Golf: Seven Segments
The task: Write the smallest possible program (least number of characters) that takes input in the hh:mm format and outputs this as a digital clock (seven-segment display).
Sample input: 19:27
Sample output:
_ _ _
| |_| . _| |
| _| . |_ |
Sample input: 11:11
Sample output:
| | . | |
| | . | |
The numbers should look like this:
_ _ _ _ _ _ _ _
| _| _| |_| |_ |_ | |_| |_| | |
| |_ _| | _| |_| | |_| _| |_|
The colon is represented by a dot on the second and third line of output. Numbers must be separated by a column of spaces, the same goes with the colon. A special case is the first and last number - to make this harder, you are not allowed to have trailing spaces.
Any language is allowed. Please use the standard answer format as in the other code golf questions. And the prize? Fame ;)
Note: i'm not the author of this challenge. It was presented to me by a friend from a university where I studied. I do not claim that HE is the author of this, but he is the first person who told me about this.
Hint: a clever way of storing the numbers appearance could be the key to success.
Update: From comments below i decided to add one small constraint. Since the challenge is called "digital clock" it is now required to have fixed width numbers. So all of them must occupy 3 collumns and 3 rows. It should look as in a digital clock, so for example number one occuppies the right most column. I've edited the sample outputs.