Decimal to Binary

TCS NQT Coding Easy

Given a decimal number N, compute its binary equivalent.

Examples:

Input: N = 7

Output: 111

Input: N = 33

Output: 100001

Input: N = 0

Output: 0

Constraints

  • 0 ≤ N ≤ 106