結果

問題 No.2795 Perfect Number
ユーザー scarlet-Chun-DH
提出日時 2024-06-28 21:51:50
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 217 bytes
コンパイル時間 155 ms
コンパイル使用メモリ 82,404 KB
実行使用メモリ 52,352 KB
最終ジャッジ日時 2024-06-28 21:51:52
合計ジャッジ時間 2,436 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 31 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

from sys import stdin
from math import sqrt

n = int(stdin.readline())

a = 2

res = False

for i in range(1, 31):
	if (2 ** (i - 1)) * (2 ** i - 1) == n:
		res = True
		break

if res:
	print("Yes")
else:
	print("No")
0