結果

問題 No.237 作図可能性
コンテスト
ユーザー roiti46
提出日時 2015-07-05 22:46:01
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 87 ms / 2,000 ms
コード長 400 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 133 ms
コンパイル使用メモリ 77,092 KB
最終ジャッジ日時 2025-12-03 15:46:58
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import bisect, itertools as it
F = [3, 5, 17, 257, 65537]
N = len(F)
A = int(raw_input())
enable = set([])

for i in xrange(30):
    for multi in it.product([0, 1], repeat = N):
        v = 2 ** i
        for j, bit in enumerate(multi):
            if bit:
                v *= F[j]
        if v > 2:
            enable.add(v)
            
enable = sorted(list(enable))
print bisect.bisect(enable, A)
0