結果

問題 No.2795 Perfect Number
ユーザー shobonvip
提出日時 2024-06-07 19:22:21
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 27 ms / 2,000 ms
コード長 274 bytes
コンパイル時間 1,899 ms
コンパイル使用メモリ 195,424 KB
最終ジャッジ日時 2025-02-21 19:36:13
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 35
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

vector<ll> perfect = {
	6, 28, 496, 8128, 33550336, 8589869056, 137438691328
};

int main() {
	ll n; cin >> n;
	for (ll x: perfect){
		if (x == n){
			cout << "Yes\n";
			return 0;
		}
	}
	cout << "No\n";
}
0