結果

問題 No.237 作図可能性
ユーザー ssmkzk
提出日時 2019-06-18 15:53:35
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 453 bytes
コンパイル時間 75 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-11-30 07:48:41
合計ジャッジ時間 1,861 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 20 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools
from functools import reduce
from operator import mul

A = int(input())
fermat_n = [3,5,17,257,65537]
use_l = [3,5,17,257,65537]
for i in range(2, 6):
    l = list((itertools.combinations(fermat_n, i)))
    for l_i in l:
        use_l.append(reduce(mul,l_i))
use_l.append(1)
use_l.sort()


ans = 0
for i in range(31):
    power_of_two = pow(2,i)
    for l_i in use_l:
        if A > power_of_two * l_i:
            ans += 1
print(ans-2)
0