結果

問題 No.237 作図可能性
ユーザー 👑 KazunKazun
提出日時 2020-06-12 14:13:28
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 82 ms / 2,000 ms
コード長 750 bytes
コンパイル時間 359 ms
コンパイル使用メモリ 87,060 KB
実行使用メモリ 72,036 KB
最終ジャッジ日時 2023-09-06 09:11:02
合計ジャッジ時間 4,463 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
71,664 KB
testcase_01 AC 77 ms
71,748 KB
testcase_02 AC 78 ms
71,760 KB
testcase_03 AC 82 ms
71,532 KB
testcase_04 AC 76 ms
71,752 KB
testcase_05 AC 77 ms
71,732 KB
testcase_06 AC 77 ms
71,524 KB
testcase_07 AC 80 ms
71,656 KB
testcase_08 AC 78 ms
71,856 KB
testcase_09 AC 77 ms
72,000 KB
testcase_10 AC 76 ms
71,812 KB
testcase_11 AC 77 ms
71,772 KB
testcase_12 AC 78 ms
71,996 KB
testcase_13 AC 78 ms
71,520 KB
testcase_14 AC 80 ms
71,468 KB
testcase_15 AC 77 ms
71,600 KB
testcase_16 AC 78 ms
71,392 KB
testcase_17 AC 77 ms
71,996 KB
testcase_18 AC 77 ms
71,668 KB
testcase_19 AC 77 ms
71,576 KB
testcase_20 AC 77 ms
71,736 KB
testcase_21 AC 77 ms
71,904 KB
testcase_22 AC 77 ms
71,920 KB
testcase_23 AC 79 ms
71,464 KB
testcase_24 AC 77 ms
71,388 KB
testcase_25 AC 79 ms
71,604 KB
testcase_26 AC 78 ms
71,384 KB
testcase_27 AC 80 ms
71,816 KB
testcase_28 AC 78 ms
71,840 KB
testcase_29 AC 79 ms
72,036 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#素因数分解
def Prime_Factorization(n):
    R=[]
    N=n

    for k in range(2,int(-(-n**0.5//1))+1):
        if N%k==0:
            C=0
            while N%k==0:
                C+=1
                N//=k
            R.append([k,C])

    if N!=1:
        R.append([N,1])
        
    if not R:
        R.append([N,1])

    return R
    
#素数判定
def Is_Prime(N):
    return (N>=2)  and (len(Prime_Factorization(N))==1)

A=int(input())
U=[]

u=2
while u+1<=10**9:
    if Is_Prime(u+1):
        U.append(u+1)
    u*=u

V=[]
L=len(U)
for i in range(2**L):
    p=1
    for j in range(L):
        if i%2:
            p*=U[j]
        i=i>>1
    if p<=A:
        V.append(p)

T=0
for p in V:
    while p<=A:
        T+=1
        p*=2

print(T-2)
0