Quick actions

cmd+k|ctrl+k

Navigation

Languages

3.1

Snippet info

Language

Python

Visibility

public

Author

hoaivu100413

Created

2016-09-20T16:56:10Z

Updated

2016-09-20T17:09:06Z

#Python 3.5
#lhvu
#3.1

number = 24
number_bin = bin(number)
detect = 0 

for i in range (-len(number_bin), -1):
    if number_bin[i] == '1':
        detect = i
print('Input: ',number, '\nOutput: ', number_bin[detect:])
INFO