백준 1094번 막대기 문제
64는 이기 때문에 stick은 결국 2의 제곱수를 가장 적게 사용해서 만들어진다.
import sys
input = sys.stdin.readline
x = int(input())
cnt = 0
stick = 0
short = 64
while stick != x:
if x - stick >= short:
stick += short
cnt += 1
short /= 2
print(cnt)