結果
問題 | No.2795 Perfect Number |
ユーザー |
|
提出日時 | 2024-06-28 21:56:41 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 275 bytes |
コンパイル時間 | 891 ms |
コンパイル使用メモリ | 96,960 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-28 21:56:44 |
合計ジャッジ時間 | 1,851 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 35 |
ソースコード
#include <iostream> #include <array> #include <algorithm> constexpr std::array<int64_t, 7> a = {6, 28, 496, 8128, 33550336, 8589869056, 137438691328}; int main() { int64_t n; std::cin >> n; std::cout << (std::ranges::binary_search(a, n) ? "Yes" : "No") << '\n'; }