Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
54506 | 张文熙 | 寻找最低数 | C++ | Accepted | 100 | 1 MS | 264 KB | 282 | 2022-07-29 15:48:14 |
#include<bits/stdc++.h> using namespace std; int a,t,s[200],k,n=1; int main(){ while(cin>>a&&a>0){ t=a; while(t){ s[++k]=t%2; t/=2; } for(int i=1;i<=k;i++){ if(s[i]) break; else n++; } cout<<pow(2,n-1)<<endl; n=1; k=0; } return 0; }