본문 바로가기
Beakjoon&프로그래머스/파이썬

[백준/파이썬]20359번 A simple task

by 현장 2021. 4. 23.

-코드

n = int(input())
c = 0
while 1:
    if n % 2 != 0:
        break
    n //= 2
    c += 1
print(n, c)