Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
165958 | C班-杨渔 | 二进制半整数 | C++ | 通过 | 100 | 5 MS | 244 KB | 429 | 2024-08-19 08:35:34 |
#include <iostream> #include <cmath> using namespace std; double s; int n,m; int main() { cin>>n; while (n--) { cin>>m; bool flag=0; for (int i=1;i<=m;i<<=1) { int j=m-i; s=log2(j); if (s==int(s)) { flag=true; break; } } if (flag) cout<<"yes"<<endl; else cout<<"no"<<endl; } return 0; }