| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 54818 | 孙喻桐 | 寻找最低数 | C++ | Accepted | 100 | 0 MS | 248 KB | 261 | 2022-07-29 17:21:15 |
#include<bits/stdc++.h> using namespace std; int x[100]={1,2,4,8,16,32,64,128},a,b,c; int main(){ while(cin>>a&&a!=0){ for(int i=0;i<=6;i++)if(a>=x[i]&&a<x[i+1])c=i; for(int i=c;i>=0;i--)if(a>=x[i])a-=x[i],b=i; cout<<x[b]<<endl; } return 0; }