WC '95 P2 - Round Numbers

View as PDF

Points: 12 (partial)
Time limit: 0.6s
Memory limit: 16M

Problem type
Woburn 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 form, 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.

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.