Read an integer variable, and determine the smallest positive integer that has the same number of s in its bit representation as the number you read.
The following numbers all have the same number of s in their bit representation: 7 (), 13 (), 37 (), etc. And among all such positive integers, 7 is the smallest number that has 3 s in its bit representation.
The input will contain an integer ().
Print the smallest positive integer that has the same number of s in its bit representation as .
Login to submit
|Stamford University Bangladesh Summer Contest 2019 Mock|
|IUB Beginners' Contest 2020|
|Replay of First Step Contest|
|AUST CSE 44th Batch Practise Contest 06|
|Training contest 1|
|Tough Dash, January 2019|
|SUB Beginners' Contest|
|First Step Contest|
|Virtual Techfest 2020 Regional Programming Contest Mock|