← 返回 sofi 的题目列表Count Same Bit Numbers
类型:online_judge
For any positive integer n, f(n) returns the smallest integer greater than or equal to n in which all bits are set to 1. Given a positive integer n, find the number of integers other than n that are less than or equal to f(n) and have the same number of set bits as n.
Example
Input
5
Output
1