Toggle navigation
HUSTOJ
F.A.Qs
ProblemSet
Source/Category
Status
Ranklist
Contest
Login
Language
中文
ئۇيغۇرچە
English
فارسی
ไทย
한국어
Problem2340--log2(N)
2340: log2(N)
[Creator :
]
Time Limit :
1.000
sec
Memory Limit :
128 MB
Submit
Solved: 6
Submit Num: 12
Statistics
Description
Time Limit: 2 sec / Memory Limit: 1024 MB
Score :
200
2
0
0
points
Problem Statement
Given a positive integer
N
N
, find the maximum integer
k
k
such that
2^k \le N
2
k
≤
N
.
Constraints
N
N
is an integer satisfying
1 \le N \le 10^{18}
1
≤
N
≤
1
0
1
8
.
Input
Input is given from Standard Input in the following format:
N
N
Output
Print the answer as an integer.
Sample Input
Copy
6
Sample Output
Copy
2
HINT
k
=
2
satisfies
2^2=4 \le 6
2
2
=
4
≤
6
.
For every integer
k
k
such that
k \ge 3
k
≥
3
,
2^k > 6
2
k
>
6
holds.
Therefore, the answer is
k=2
k
=
2
.
Source/Category
AtCoder