NBUT 1219 Time 2010辽宁省赛

时间:2024-06-27 00:04:32

Time limit   1000 ms

Memory limit   131072 kB

Digital clock use 4 digits to express time, each digit is described by 3*3 characters (including”|”,”_”and” “).now given the current time, please tell us how can it be expressed by the digital clock.


Input

There are several test cases.
Each case contains 4 integers in a line, separated by space.
Proceed to the end of file.


Output

For each test case, output the time expressed by the digital clock such as Sample Output.


Sample Input

1 2 5 6
2 3 4 2

Sample Output

    _  _  _
| _||_ |_
||_ _||_|
_ _ _
_| _||_| _|
|_ _| ||_

Hint

The digits showed by the digital clock are as follows:
_ _ _ _ _ _ _ _
| _| _||_||_ |_ ||_||_|| |
||_ _| | _||_| ||_| _||_| 签到题,理清楚就好,代码如下
 #include <iostream>
#include<stdio.h>
using namespace std;
int num[];
char s1[][]={
{' ','_',' '},{' ',' ',' '},{' ','_',' '},{' ','_',' '},
{' ',' ',' '},{' ','_',' '},{' ','_',' '},{' ','_',' '},
{' ','_',' '},{' ','_',' '}
};
char s2[][]={
{'|',' ','|'},{' ',' ','|'},{' ','_','|'},{' ','_','|'},
{'|','_','|'},{'|','_',' '},{'|','_',' '},{' ',' ','|'},
{'|','_','|'},{'|','_','|'}
};
char s3[][]={
{'|','_','|'},{' ',' ','|'},{'|','_',' '},{' ','_','|'},
{' ',' ','|'},{' ','_','|'},{'|','_','|'},{' ',' ','|'},
{'|','_','|'},{' ','_','|'}
};
int main()
{
while(~scanf("%d",&num[]))
{
for(int i=;i<;i++)scanf("%d",&num[i]); for(int i=;i<;i++)
for(int j=;j<;j++)
{ printf("%c",s1[num[i]][j]);
}
printf("\n");
for(int i=;i<;i++)
for(int j=;j<;j++)
{
printf("%c",s2[num[i]][j]);
}
printf("\n");
for(int i=;i<;i++)
for(int j=;j<;j++)
{
printf("%c",s3[num[i]][j]);
}
printf("\n"); } return ;
}