提交时间:2022-07-29 15:46:39
运行 ID: 54497
#include<bits/stdc++.h> using namespace std; int a; void xxx(int a) { int b[1000],ans=1; int i=0; while(a%2==0) { b[i]=a%2; a/=2; i++; } for(int j=1;j<=i;j++)ans*=2; cout<<ans<<endl; } int main() { while(1) { cin>>a; if(a==0)break; xxx(a); } return 0; }