Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.

book
Give help to Megabyte

Megabyte attempted to take control of Hexadecimal by loading n different natural numbers (ranging from 1 to n) into her memory. However, Hexadecimal only recognizes numbers written entirely in binary (containing only the digits 0 and 1). Any number with other digits was ignored. Now, Megabyte wants to determine how many numbers were successfully stored in her memory.

Example 1

Input:

20

Output:

3

Example 2

Input:

72

Output:

3
main.cpp

main.cpp

C++

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

some-alt