210723
''' https://programmers.co.kr/learn/courses/30/lessons/12911 다음 큰 숫자 [풀이] 1. format 사용 ''' def solution(n): one = format(n, 'b').count('1') while True: n += 1 if one == format(n, 'b').count('1'): return n ''' '''
Last updated 3 years ago
Was this helpful?