| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 10067 | I2P homework2b |
|
| 11119 | binary addition |
|
| 11120 | Float addition |
|
Description
Suppose that we have an encoding scheme defined by the following mapping:
1->'A', 2->'B', 3->'C', ..., 9->'I'
Given a three-digit number N as the input, use the above mapping to encode N.
Input
A three-digit integer N
Output
The encoding result
Note that you do not need to print ‘\n’ at the end of the output.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
Given a positive integer N, transform it to its unsigned binary representation (e.g. 10 => 1010). Your program needs to
output the binary representation of N+1 and the number of carries during the addition in binary representation.
For example, if the input is 11 (in decimal), your program needs to output 1100, because it is the binary representation of 11+1=12. Also your program needs to output 2, because during the binary addition of 11+1, there are two carries generated.
1011 (11 in binary)
+ 0001 (1 in binary)
---------------------------------
1100 (12 in binary)
Input
The input consist of an integer N (0 <= N <= 1022)
Output
The "unsigned" binary representation of N+1 and the number of carries during the binary addition of N+1. Those two numbers are separated by a space. Note that you do not need to print ‘\n’ at the end of the output.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
To represent a decimal number clearly and formally, one must insert commas (,) for the thousands separators, and a period (.) to separate the integer part from the fractional part.
For example, the standard format of number "123456789.012" should be represented as "123,456,789.012".
Now you have 2 such numbers in standard format, and you want to calculate the summation of them.
Input
There are 2 lines in each case, and each line contains a number T in the standard format, where 1,000,000.000 ≤ T ≤ 499,999,999.000 with fractional part.
Output
For each case, you should output one line that contains the summation of the input numbers, which is a floating number with three digits after the decimal point but without any commas.
Note that there is no need to add '\n' at the end of output