吔,爆搜乱搞得了
反正1e8里的完全数也就5个:$6,28,496,8128,33550336$
#include <bits/stdc++.h>
using namespace std;
int main() {
int x, n;
cin >> n;
while (n -- ) {
cin >> x;
cout << x << " is ";
if (x != 6 && x != 28 && x != 496 && x != 8128 && x != 33550336) cout << "not ";
cout << "perfect" << endl;
}
}
可以的
saber专属?????
AcWing《蓝桥杯C++ AB组辅导课》拼团优惠!https://www.acwing.com/activity/content/introduction/19/group_buy/61300/
?????