Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
166088 李澄 整数幂 C++ 解答错误 75 5 MS 248 KB 470 2024-08-19 09:51:26

Tests(3/4):


#include <bits/stdc++.h> using namespace std; int a[25]; int main() { for (int i = 1; i <= 20; i++) { a[i]++; for (int j = 1; j <= i; j++) { a[i] *= 2; } } int t; cin >> t; while (t--) { int n; cin >> n; bool flag = false; for (int i = 1; i <= 20; i++) if (n == a[i]) flag = true; if (flag) cout << "Yes" << endl; else cout << "No" << endl; } return 0; }


测评信息: