| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 54455 | 姜李烨 | 寻找最低数 | C++ | Accepted | 100 | 1 MS | 264 KB | 350 | 2022-07-29 15:34:48 |
#include<bits/stdc++.h> using namespace std; int x[10],k=1,ans=0; void turn(int a){ int t=1; while(a!=0){ x[t]=a%2; a/=2; t++; } return; } int main(){ int n=1; while(n!=0){ cin>>n; if(n==0) break; turn(n); while(x[k]!=1){ k++; } ans+=pow(2,k-1); k=1; cout<<ans<<endl; ans=0; } return 0; }