結果

問題 No.2795 Perfect Number
ユーザー pia019
提出日時 2024-06-28 21:28:35
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 416 bytes
コンパイル時間 2,390 ms
コンパイル使用メモリ 247,284 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-28 21:28:43
合計ジャッジ時間 3,306 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 35
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = 1<<30;
const long long INFLL = 1LL<<60;
const int MOD = 998244343;


int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    ll n; cin >> n;
    vector<ll> a{6, 28, 496, 8128, 33550336, 8589869056, 137438691328};
    if (find(a.begin(), a.end(), n) != a.end()) cout << "Yes" << endl;
    else cout << "No" << endl;
}
0