結果
問題 | No.237 作図可能性 |
ユーザー |
|
提出日時 | 2017-02-16 18:52:01 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 38 ms / 2,000 ms |
コード長 | 760 bytes |
コンパイル時間 | 324 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-12-30 00:21:23 |
合計ジャッジ時間 | 2,425 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 28 |
ソースコード
import sys from math import sqrt def debug(x, table): for name, val in table.items(): if x is val: print('DEBUG:{} -> {}'.format(name, val), file=sys.stderr) return None def solve(): A = int(input()) pow2 = [1] Fps = [3, 5, 17, 257, 65537] Fpps = [] for i in range(2**len(Fps)): res = 1 for j in range(len(Fps)): if i & 1: res *= Fps[j] i >>= 1 if res <= A: Fpps.append(res) i = 1 while 2**i <= A: pow2.append(2**i) i += 1 ans = 0 for x in pow2: for y in Fpps: if 3 <= x * y <= A: ans += 1 print(ans) if __name__ == '__main__': solve()