#B. B - log2(N)

    传统题 1000ms 256MiB

B - log2(N)

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

B - log2(N)

Score : $200$ points

Problem Statement

Given a positive integer $N$, find the maximum integer $k$ such that $2^k \le N$.

Constraints

  • $N$ is an integer satisfying $1 \le N \le 10^{18}$.

Input

Input is given from Standard Input in the following format:

NN

Output

Print the answer as an integer.


6
2
  • $k=2$ satisfies $2^2=4 \le 6$.
  • For every integer $k$ such that $k \ge 3$, $2^k > 6$ holds.

Therefore, the answer is $k=2$.


1
0

Note that $2^0=1$.


1000000000000000000
59

The input value may not fit into a $32$-bit integer.

2025寒假ATC码力训练营第六次练习

未参加
状态
已结束
规则
IOI
题目
5
开始于
2025-1-24 13:00
结束于
2025-1-24 14:30
持续时间
1.5 小时
主持人
参赛人数
6