結果
問題 | No.237 作図可能性 |
ユーザー |
|
提出日時 | 2015-07-05 22:46:01 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 12 ms / 2,000 ms |
コード長 | 400 bytes |
コンパイル時間 | 537 ms |
コンパイル使用メモリ | 7,068 KB |
実行使用メモリ | 6,528 KB |
最終ジャッジ日時 | 2024-07-07 23:30:53 |
合計ジャッジ時間 | 1,667 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 28 |
ソースコード
import bisect, itertools as itF = [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 ** ifor 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)