DRAWCALC - DRAWING NUMBERS

Mr. Sridhar wanted to create a calculator. He did all the logical part. Now he wants your help for designing the digits and display it in the calculator's screen. You are given a whole number n. Just print the number in digital form.

All the digits must be represented by a 5×5 character array as shown in the figure.

The judge used for this problem is exact Judge. (So you must not print any extra spaces or extra new lines). You must not print a new line character after the last test case.

The characters allowed to create the 5×5 array are '-', '|' and ' '.  Do not print any extra leading or trailing spaces. You must print a space between every two digits.

The character at [i][j] for any digit (0 to 9) is same as the character at [i][j] given in the image. (See sample cases for better understanding).

Input Constraints:

1<= test cases <= 100

1 <= n<10^13 (n does not contain any leading zeroes)

Sample Input:

4
341
782
5569
1003

Sample Output:

----- -   -     -
    | |   |     |
|---| |---|     |
    |     |     |
-----     -     -
----- ----- -----
    | |   |     |
    | |---| |---|
    | |   | |    
    - ----- -----
----- ----- ----- -----
|     |     |     |   |
|---| |---| |---| |---|
    |     | |   |     |
----- ----- ----- -----
    - ----- ----- -----
    | |   | |   |     |
    | |   | |   | |---|
    | |   | |   |     |
    - ----- ----- -----

Added by:cegprakash
Date:2013-03-01
Time limit:2s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: BF GOSU

hide comments
2023-02-27 22:30:47 Simes
>> You must not print a new line character after the last test case.
What a pointless pain that was.

Reply: Read the statement. The judge used for this problem is exact Judge. (So you must not print any extra spaces or extra new lines).

Last edit: 2023-09-08 16:15:59
2018-06-19 12:10:10
Print numbers ending with 2, 5, 6 like in the example since removing trailing spaces as per statement leads to WA (eg. don't use .rstrip() in Python).
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.