結果
| 問題 | No.847 Divisors of Power |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-05-20 12:34:00 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 502 bytes |
| 記録 | |
| コンパイル時間 | 214 ms |
| コンパイル使用メモリ | 85,436 KB |
| 実行使用メモリ | 61,000 KB |
| 最終ジャッジ日時 | 2026-04-08 08:43:24 |
| 合計ジャッジ時間 | 4,932 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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))