[Python] 프로그래머스 - Level2 - 다음 큰 숫자

강주형·2022년 9월 21일
0

https://school.programmers.co.kr/learn/courses/30/lessons/12911

연습문제

def solution(n):
    one = bin(n)[2:].count('1')
    while one != bin(n+1)[2:].count('1'):
        n += 1
    return n+1
profile
Statistics & Data Science

0개의 댓글