結果

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

ソースコード

diff #

#include<iostream>
#include<set>
using namespace std;
int main()
{
  set<long long>ans{6, 28, 496, 8128, 33550336, 8589869056, 137438691328, 2305843008139952128};
  long long n;
  cin >> n;
  if(ans.count(n))cout << "Yes" << endl;
  else cout << "No" << endl;
}
0