結果

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

ソースコード

diff #

#include <bits/stdc++.h>
#define N 300005
#define INF 1000000000
using namespace std;
long long ls[7] = {6LL, 28LL, 496LL, 8128LL, 33550336LL, 8589869056LL, 137438691328LL};
int main() {
    cin.tie(0)->sync_with_stdio(0);
    long long n;
    cin >> n;
    for(long long i: ls) {
    	if(i == n) {
    		cout << "Yes\n";
    		return 0;
    	}
    }
    cout << "No\n";
}
0