All problems

Decimal to Binary

easyPythonMath

The same electronics kit works the other way round: a learner types the number they want and the app shows which switches to flip. The switch row is that number written in binary — only 0s and 1s, each place worth twice the place to its right. Tools often print binary with a 0b marker in front of it, and the switch display has no room for that.

Task: Read a number and print the row of 0s and 1s that stands for it.

Input

A single line holding one integer n, with 0 ≤ n ≤ 1,000,000.

Output

One line holding only the characters 0 and 1 — no 0b marker in front, and no leading zeros. When n is 0 the line holds a single 0.

Example:

Input:
11

Output:
1011

Sign in to solve this problem

Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.

Sign in

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…