Binary Length

Computer Mathematics Easy 3 views
Back to Questions

Problem Description

Given n>0, print how many bits are needed to write n in binary.

Input Format

One integer n.

Output Format

One integer bits.

Sample Test Case

Input:
9
Output:
4

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next