Time limit 1000/1000/1000/1000 ms. Memory limit 65000/65000/65000/65000 Kb.
Problem description
Make a program that gets a decimal number and prints its binary equivalent
as output.
To convert a decimal number to its binary equivalent you can use the "short
division by 2 remainder" method. This method relies only on division by two.
For example, let's convert the decimal number 156 to binary. Write the
decimal number on the first line.
156
Divide it by 2 and write the integer answer (quotient) under it, and write the remainder (0 or 1) to the right of it.
156 0
78
Continue downward, dividing each new quotient by two and writing the
remainders to the right of them. Stop when the quotient is 0.
156
78
39
19
9
4
2
1
0
|
0
0
1
1
1
0
0
1 |
Starting with the bottom-most remainder 1, read the sequence of 1's and 0's
upwards to the top. You should have 10011100. This is the binary equivalent of
the decimal number 156.
Input
A single integer N (0 ≤ N < 264).
Output
Print binary equivalent of given decimal number.
Example
| stdin |
stdout |
|
6 |
110 |
| 156 |
10011100 |
Для отправки решений необходимо выполнить вход.
|