832 - EECS_I2P(I)2015_Chen_Lab3 Scoreboard

Time

2015/10/14 08:30:00 2015/10/14 09:50:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
10763 binary
10764 test123

10763 - binary   

Description

Given a positive integer N, transform it into its unsigned binary representation (e.g. 10 => 1010). Your program needs to check the each bit of binary representation A . Accroding to the left bit ,if the left bit is 0 you don't do anything .if the left bit is 1 then 1 ->0 or 0->1(the left-most bit accroding to the right-most bit)  So you can  transform A into a another binary representation B.

Example:

1011 -> 0110

Input

The input consist of an integer N (2 <= N <= 1024)

Output

Output the binary representation of N and transform A into a another binary representation B. 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




10764 - test123   

Description

Enter a three-digit number A(its elements contain1~9 , and does not contain 0) . For example:789 . Your programm  will reverse the numerical  order (789 -> 987) , it is B . And then add the A and B (789+987) . Output the sum .

Input

Enter a three-digit number A(its elements contain1~9 , and does not contain 0) .For example:789.

Output

Output the A + B result.Note that you do not need to print ‘\n’ at the end of the output.

Sample Input  Download

Sample Output  Download

Tags

how to write



Discuss