-->
当前位置:首页 > 题库

PROGRAMMING:Leading zeros of binary

Luz5年前 (2021-05-10)题库411
All the values are expressed in binary system. A decimal number, such as 24, is expressed internally in a 32-bit computer as 000000000 11000. As you can see, counting from the left, there are 27 zeros before the first one. We call these zeros leading zeros.
Now, your task is to write a program, input an integer and output the number of zeros leading to it in 32-bit expression.
###Input format:
An integer within the range of 32-bit integers.
###Output format:
An integer that represents the number of zeros before the first one when the input is expressed as a 32-bit binary number.
###Input example:
```in
two hundred and fifty-six
```
###Output example:
```out
twenty-three
```






answer:If there is no answer, please comment