結果

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

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
using ll=long long;
constexpr int MOD=998244353;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define replr(i,l,r) for(int i=(l);i<(int)(r);i++)
vector<string> P={
  "6", "28", "496", "8128", "33550336", "8589869056", "137438691328", "2305843008139952128", "2658455991569831744654692615953842176"
};
int main(){
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  string N;
  cin>>N;
  for(auto i:P){
    if(i==N){
      cout<<"Yes\n";
      return 0;
    }
  }
  cout<<"No\n";
}
0