#abc336b. B - CTZ
B - CTZ
Score: points
问题描述
对于正整数 ,令 表示 的二进制表示末尾的 连续零 数量(最大值)。 如果 的二进制表示以 结尾,则 。
给定一个正整数 ,输出 。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
For a positive integer , let be the (maximal) number of consecutive zeros at the end of the binary notation of .
If the binary notation of ends with a , then .
You are given a positive integer . Print .
Constraints
- is an integer.
Input
The input is given from Standard Input in the following format:
Output
Print .
Sample Input 1
2024
Sample Output 1
3
is 11111101000
in binary, with three consecutive 0
s from the end, so .
Thus, print .
Sample Input 2
18
Sample Output 2
1
is 10010
in binary, so .
Note that we count the trailing zeros.
Sample Input 3
5
Sample Output 3
0
update @ 2024/3/10 01:24:55