結果
| 問題 |
No.2795 Perfect Number
|
| コンテスト | |
| ユーザー |
ManjushriMitra
|
| 提出日時 | 2024-08-14 23:38:05 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 812 bytes |
| コンパイル時間 | 3,013 ms |
| コンパイル使用メモリ | 245,324 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-08-14 23:38:10 |
| 合計ジャッジ時間 | 4,240 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 35 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,m,n) for(int i=m; i<n; ++i)
#define repll(i,m,n) for(ll i=m; i<n; ++i)
// #define rep(i,m,n) for(ll i=m; i<n; ++i)
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define fir first
#define sec second
template<typename T> bool chmin(T& a, T b){
if(a > b){a = b; return true;}
return false;
}
template<typename T> bool chmax(T& a, T b){
if(a < b){a = b; return true;}
return false;
}
int main(){
ll N;
cin >> N;
vector<ll> enum_pn = {6LL, 28LL, 496LL, 8128LL, 33550336LL,
8589869056LL, 137438691328LL};
for(ll pn : enum_pn){
if(pn == N){
puts("Yes");
return 0;
}
}
puts("No");
return 0;
}
ManjushriMitra