| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 54715 | 周景轩 | 寻找最低数 | C++ | Wrong Answer | 0 | 0 MS | 248 KB | 354 | 2022-07-29 16:55:33 |
#include<bits/stdc++.h> using namespace std; int a; int lowest(int n){ int num[10],ans=1; for(int i=0;i<=9;i++){ num[i]=n%2; n/=2; } for(int i=0;i<=9;i++){ if(num[i]){ for(int j=0;j<i;j++) ans*=2; return ans; } } return n; } int main(){ while(1){ cin>>a; if(a==0) break; cout<<lowest(a); } return 0; }