結果
問題 | No.2795 Perfect Number |
ユーザー |
|
提出日時 | 2024-06-28 22:13:58 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 957 bytes |
コンパイル時間 | 2,133 ms |
コンパイル使用メモリ | 198,124 KB |
最終ジャッジ日時 | 2025-02-22 01:10:24 |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 35 |
ソースコード
#include<bits/stdc++.h>using namespace std;// OM NAMAH SHIVAY// #include<ext/pb_ds/assoc_container.hpp>// #include<ext/pb_ds/tree_policy.hpp>// using namespace __gnu_pbds;// typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds; // find_by_order, order_of_key#define IOS ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);#define endl "\n"#define int long longconst int inf = 1e18;// int dx[4]={-1,0,1,0};// int dy[4]={0,1,0,-1};// int dx[8]={0,-1,-1,-1,0,1,1,1};// int dy[8]={1,1,0,-1,-1,-1,0,1};const int N = 200200;const int mod = 1e9+7;using ii = pair<int,int>;//write on copyvoid solver(){int n;cin>>n;set<int>s = {6,28,496,8128,33550336,8589869056,137438691328};if(s.count(n)) cout<<"Yes"<<endl;else cout<<"No"<<endl;}signed main(){IOS//int _t;cin>>_t;while(_t--)solver();return 0;}#undef int