Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
166512 | 刘睿甫 | 二进制半整数 | C++ | 运行超时 | 0 | 1000 MS | 260 KB | 345 | 2024-08-19 14:44:51 |
#include <bits/stdc++.h> using namespace std; bool f(int n){ for (int i=1;i<=n;i++){ for (int j=0;j<=n;j++){ if (pow(2,i)+pow(2,j)==n) return 1; } } return 0; } int main(){ int t,n; scanf("%d",&t); for (int i=0;i<t;i++){ scanf("%d",&n); if (f(n)) cout<<"Yes"<<endl; else cout<<"No"<<endl; } return 0; }