传统题 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.

2024寒假入门组刷题营(十二)

未参加
状态
已结束
规则
ACM/ICPC
题目
8
开始于
2024-2-12 13:30
结束于
2024-2-12 15:30
持续时间
2 小时
主持人
参赛人数
10