結果

問題 No.847 Divisors of Power
ユーザー syunsukesyunsuke
提出日時 2020-09-18 18:33:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 278 ms / 2,000 ms
コード長 579 bytes
コンパイル時間 1,903 ms
コンパイル使用メモリ 86,524 KB
実行使用メモリ 119,044 KB
最終ジャッジ日時 2023-09-04 08:59:18
合計ジャッジ時間 6,287 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 91 ms
71,708 KB
testcase_01 AC 91 ms
71,420 KB
testcase_02 AC 93 ms
71,476 KB
testcase_03 AC 94 ms
71,856 KB
testcase_04 AC 91 ms
71,772 KB
testcase_05 AC 89 ms
71,780 KB
testcase_06 AC 95 ms
76,036 KB
testcase_07 AC 94 ms
76,100 KB
testcase_08 AC 89 ms
76,084 KB
testcase_09 AC 95 ms
75,964 KB
testcase_10 AC 95 ms
76,056 KB
testcase_11 AC 99 ms
76,448 KB
testcase_12 AC 94 ms
76,188 KB
testcase_13 AC 113 ms
77,780 KB
testcase_14 AC 97 ms
76,048 KB
testcase_15 AC 258 ms
112,060 KB
testcase_16 AC 93 ms
76,060 KB
testcase_17 AC 95 ms
76,092 KB
testcase_18 AC 107 ms
77,772 KB
testcase_19 AC 110 ms
77,976 KB
testcase_20 AC 92 ms
76,032 KB
testcase_21 AC 150 ms
90,864 KB
testcase_22 AC 94 ms
76,044 KB
testcase_23 AC 91 ms
75,972 KB
testcase_24 AC 278 ms
119,044 KB
testcase_25 AC 93 ms
76,212 KB
testcase_26 AC 89 ms
71,876 KB
testcase_27 AC 91 ms
76,064 KB
testcase_28 AC 91 ms
71,876 KB
testcase_29 AC 89 ms
71,580 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K,M=map(int,input().split())

Y={}

for i in range(2,int(N**0.5)+1):
    while N%i==0:
        if i not in Y:
            Y[i]=1
            N//=i
        else:
            Y[i]+=1
            N//=i
if N!=1:
    Y[N]=1
#print(Y)

for k,v in Y.items():
    Y[k]=v*K
#print(Y)

Dic={}
Dic[1]=1
dic={}

import copy

for k,v in Y.items():
    #print(k,v)
    for x,y in Dic.items():
        for i in range(v+1):
            if x*(k**i)<=M:
                dic[x*(k**i)]=1
            else:
                break
    #print(dic)
    Dic=copy.deepcopy(dic)
    dic={}
print(len(Dic))
0