| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 10579 | Binary Addition |
|
| 10768 | wave |
|
| 12013 | multiplication |
|
Description
Please compute the sum of two given n-bit binary numbers.
Input
The first line of the input file contains a positive integer t indicating the number of test cases. The first line of each test case is a positive integer n denoting the length of bits. The second and third lines are the two n-bit binary numbers. The first bit of each binary number is always 0, which guarantees that the sum of the two binary numbers can still be expressed as an n-bit binary number.
Case1 : t<=100, n<=100
Case2 : t<=200, n<=1000
Case3 : t<=300, n<=5000
Case4 : t<=400, n<=10000
Output
For each test case, your program should print the sum in the same format as the binary numbers given in input.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
A character wave consistss of lines of characters, which has a parameter, length L. The number of characters in the first line is 1, and is increased by one in the every following lines. After the number of character reaches L, it starts to descrease until the number of characters become 1 again. For example, the following is a character wave of length 3.
#
##
###
##
#
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
Cookie multiplication
Jane has two types of cookies (of number N and M, respectively), and she uses a magic spell to produce more cookies (N * M in total).
However, there are many cookies. Jane asks you to help her calculate the number of new cookies she can make.
Input
3 integers K, N, M in order.
N , M means the number of cookies.
If the digits of new cookies is smaller than K,
please left pad with zeros up to K digits.
Data range:
0 <= N, M <= 2^32-1
1 <= K <= 1000000
Output
Output a single line with the number N * M, and a '\n' at the end.
Hint: overflow , printf skill
printf()
If you don't know how to search more information, you can look at this reference.
It really helps.
http://www.cplusplus.com/reference/cstdio/printf