結果

問題 No.680 作れる数
ユーザー kohei2019kohei2019
提出日時 2022-07-27 01:08:49
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 263 bytes
コンパイル時間 349 ms
コンパイル使用メモリ 86,540 KB
実行使用メモリ 71,376 KB
最終ジャッジ日時 2023-09-23 14:48:09
合計ジャッジ時間 2,932 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
70,960 KB
testcase_01 AC 66 ms
70,868 KB
testcase_02 WA -
testcase_03 AC 66 ms
70,960 KB
testcase_04 AC 71 ms
71,168 KB
testcase_05 WA -
testcase_06 AC 68 ms
71,132 KB
testcase_07 WA -
testcase_08 AC 68 ms
70,940 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 67 ms
71,048 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 68 ms
70,956 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
# https://oeis.org/search?q=1%2C3%2C4%2C7%2C8%2C9%2C10%2C15&language=japanese&go=%E6%A4%9C%E7%B4%A2
# 2^n-1 <= x < 2^n-1+2^(n-1)
for i in range(1,60):
    if (2**(i)-1) <= N < (2**(i)-1 + 2**(i-1)):
        print('YES')
        exit()
print('NO')
0