結果

問題 No.2795 Perfect Number
ユーザー aaaaaaaaaa2230
提出日時 2024-06-28 22:38:53
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 979 bytes
コンパイル時間 2,049 ms
コンパイル使用メモリ 178,768 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-28 22:38:56
合計ジャッジ時間 2,918 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 35
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <deque>
#include <forward_list>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <memory>
#include <numeric>
#include <optional>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <tuple>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    vector<long long> cand = {	6, 28, 496, 8128, 33550336, 8589869056, 137438691328};
    
    long long n;
    cin >> n;
    for (auto c : cand){
        if (c == n) {
            cout << "Yes" << endl;
            return 0;
        }
    }
    cout << "No" << endl;

    return 0;

}
0