Programmers 다음 큰 숫자

Solution

def solution(n):
    save = n
    while True:
        next = n + 1
        if bin(next).count("1") == bin(save).count("1"):
            return next
        else:
            n += 1