N but 2013

Source: Internet
Author: User
  • Here are a LCD (Liquid Crystal Display) on ezreal's arm. The LCD is composed of liquid crystal, and the LCD is 16 lines and 48 rows. How did it work?

     

    The CPU will send a series of bytes to the LCD. A byte means to eight bits. when the LCD has ed the byte, it will show a page vertically. and each byte will display from bottom to top.

     

    For example, 0x01 0x9c 0xed will be shown as below:

     

    *.*....**.**.*...*..*.**

     

    Now give you 64 bytes, you shoshould print it to the LCD from left to right and top to bottom. 32 columns in abig row (containing 8 rows ).

  • Input
  • First line contains an integer T (t <100), means the test case.
    For each case, there are 2 lines which contain 64 hexadecimal numbers, and it is less than 0xff.
  • Output
  • For each test case, print the LCD's status.
  • Sample Input
  • 101 9C ED DD 1A 2B CF CD C3 00 19 D0 5A 9F 56 13 E5 40 E5 46 E3 BD 4F A4 39 AF D8 2D 6F D4 54 361C B5 3C 24 9F 85 01 75 10 4B A0 00 77 44 77 7D 3B 82 57 47 DD DA DA 61 E5 FD F7 B7 1D E5 D3 A7
  • Sample output
  • *.**.****.*..*.**.*.***.**.**.......***.*...****...**.*..*..*..*.***..**.....**.*.**.***.*.*****.*******..*.**.......**.*****....*.**.....******.....*..*.*..***..*..*..........*.*.**.***.**..*..**..***..**.*.*****.*...*.***..***..***..*.*..*.*.**.*.**..*...*..****.*..*.***.***..*********....*....*..*.*.****.**...**..********.*....****..***...******.**.*.*....*.....**...***..*..*...***.*..**...*.***.*.***..****.*..***...*..*.*.***......*****.*.*.......*.*..****..*********..**..*..**....*......*..***.****.***

 

# Include <stdio. h>
Main ()
{Char X [40] [40];
Char y [40] [40];
Int A, B, n, I, j, M;
Scanf ("% d", & N );
For (m = 0; m <n; m ++)
{
For (I = 1; I <= 32; I ++)
{Scanf ("% x", & );
For (j = 0; j <= 7; j ++)
{If (A & (1 <j) x [J] [I] = '*';
Else X [J] [I] = '.';
}}
For (I = 1; I <= 32; I ++ ){
Scanf ("% x", & );
For (j = 8; j <= 15; J ++)
{
If (A & (1 <(j-8 )))
X [J] [I] = '*';
Else X [J] [I] = '.';
}
} For (j = 0; j <= 7; j ++)
{
For (I = 1; I <= 32; I ++)
{
Printf ("% C", X [J] [I]);
} Printf ("\ n ");}
For (j = 8; j <= 15; J ++ ){
For (I = 1; I <= 32; I ++)
{
Printf ("% C", X [J] [I]);
} Printf ("\ n ");}
}
}

Note program input skills.

There are also hexadecimal % x input C

Or CIN> hex> n c ++

All of them are saved in binary format.

Another 1: "1 is to move one to the left"

0 & 0 = 0 0 & 1 = 0 1 & 0 = 0 1 & 1 = 1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.