結果
| 問題 |
No.237 作図可能性
|
| コンテスト | |
| ユーザー |
takakin
|
| 提出日時 | 2020-05-27 00:51:59 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 33 ms / 2,000 ms |
| コード長 | 413 bytes |
| コンパイル時間 | 80 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-10-13 03:09:15 |
| 合計ジャッジ時間 | 2,146 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 28 |
ソースコード
import sys
input=lambda: sys.stdin.readline().rstrip()
F=[3, 5, 17, 257, 65537]
a=int(input())
FF=[1]
for i in range(2**5):
res=1
for j in range(5):
if i&(1<<j):
res*=F[j]
if res>1:
FF.append(res)
S=set()
for ff in FF:
if ff==1:
ord=1
else:
ord=0
while 2<=ff*2**ord<=10**9:
S.add(ff*2**ord)
ord+=1
S=sorted(list(S))
import bisect
ct=bisect.bisect_right(S,a)
print(ct-1)
takakin