a414. ไฝๅ…ƒ้‹็ฎ—ไน‹้€ฒไฝ็ฏ‡ 5/16/2025

่งฃๆณ•ไธ€

โœ… ๅฎŒๆ•ดไปฃ็ขผ

่ฉ•ๅˆ†็ตๆžœ(ๅƒ่€ƒ) ๏ผš AC (0.2s, 344KB)

#include <bits/stdc++.h>
using namespace std;

int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    
    int n;
    while(cin >> n){
        if(n == 0) break;
        
        int cnt = 0;
        while(n&1){
            n >>= 1;
            cnt++;
        }
        
        cout << cnt << "\n";
    }
    
    return 0;
}