WC '95 P2 - Round Numbers
View as PDFWoburn Challenge 1995
A positive integer  is said to be a "round number" if the binary
representation of 
 has as many or more zeroes than ones. For example,
the integer 9, when written in binary, is 
1001. 1001 has two
zeroes and two ones: thus 9 is a round number. The integer 26 is 11010
in binary; since it has two zeroes and three ones, it is not a round
number.
Input Specification
An integer  
.
Output Specification
Indicate how many positive integers less than or equal to  are "round
numbers" in the format shown below.
Sample Input
10
Sample Output
There are 5 round numbers less than or equal to 10.
Comments