Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
166329 | C班-范浩宇 | 二进制半整数 | C++ | 通过 | 100 | 5 MS | 244 KB | 328 | 2024-08-19 12:55:45 |
#include <bits/stdc++.h> using namespace std; int T, n, f, p; int main(){ cin >> T; while(T--){ cin >> n; f = 0; p = 1; while(p){ if(p & n){ f++; if(f > 2) break; } p <<= 1; } if(f > 2 || n == 1) cout << "no" << endl; else cout << "yes" << endl; } return 0; }