Integer to Binary with Variables

Programming Interview Medium 4 views
Back to Questions

Problem Description

You get {x}. Output its binary without using bin(). Use repeated division and variables.

Input Format

One integer n (non-negative).

Output Format

Binary string.

Sample Test Case

Input:
13
Output:
1101

Constraints

0

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next