Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
166389 Mino_XIE-谢文凯B班 整数幂 C++ 通过 100 5 MS 252 KB 411 2024-08-19 14:07:19

Tests(4/4):


#include<iostream> using namespace std; #define LL long long int main(){ LL T; cin >> T; while(T--){ LL k; cin >> k; if (k == 1){ cout << "Yes" <<endl; continue; } LL cnt = 1,tot = 0; while(1){ cnt *= 2; if (cnt == k){ cout << "Yes" <<endl; break; } else if (cnt > k){ cout << "No" <<endl; break; } ++tot; } } return 0; }


测评信息: