結果
| 問題 |
No.847 Divisors of Power
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-05-20 12:34:00 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 502 bytes |
| コンパイル時間 | 1,805 ms |
| コンパイル使用メモリ | 82,064 KB |
| 実行使用メモリ | 117,908 KB |
| 最終ジャッジ日時 | 2024-09-19 20:18:36 |
| 合計ジャッジ時間 | 4,581 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 4 |
| other | AC * 15 TLE * 1 -- * 10 |
ソースコード
n,k,m = map(int,input().split())
divs = {}
for i in range(2,int(n**0.5)+1):
if n%i:
continue
c = 0
while n%i == 0:
n //= i
c += 1
divs[i] = c*k
if n:
divs[n] = k
dp = set()
dp.add(1)
for key,value in divs.items():
ndp = set()
for d in dp:
ndp.add(d)
nd = d
for p in range(value):
nd *= key
if nd <= m:
ndp.add(nd)
else:
break
dp = ndp
print(len(dp))