結果

問題 No.2795 Perfect Number
コンテスト
ユーザー 👑 tatyam
提出日時 2024-06-28 21:33:14
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 25 ms / 2,000 ms
コード長 144 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 172 ms
コンパイル使用メモリ 85,108 KB
実行使用メモリ 53,860 KB
最終ジャッジ日時 2026-03-18 01:46:19
合計ジャッジ時間 2,393 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 35
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

p = [2, 3, 5, 7, 13, 17, 19, 31]
P = []

for x in p:
    P.append(((1 << x) - 1) << (x - 1))

N = int(input())
print("Yes" if N in P else "No")
0