| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 54443 | 姜李烨 | 寻找最低数 | C++ | Wrong Answer | 0 | 0 MS | 264 KB | 437 | 2022-07-29 15:30:19 |
#include<bits/stdc++.h> using namespace std; int x[10000],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==2){ cout<<2; continue; } if(n==1){ cout<<1; continue; } if(n==0) break; turn(n); while(x[k]!=1){ k++; } ans+=pow(2,k-1); k=1; cout<<ans; ans=0; } return 0; }