#B2140. Classifying Binary Numbers
Classifying Binary Numbers
Classifying Binary Numbers
Given a positive integer (), we define a number to be of class if, in its binary representation, the number of s is greater than the number of s; otherwise, it belongs to class . For example, has three s and one , so it is an class number, whereas has two s and two s, making it a class number. Write a program that counts all numbers from to belonging to class and class , respectively.
inputFormat
The input consists of a single integer ().
outputFormat
Output two integers separated by a space. The first integer is the number of class numbers and the second is the number of class numbers among all numbers from to .
sample
13
7 6