Integer to Binary with Variables

Python Medium 2 views
Back to Questions

Problem Description

Read one integer n. 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