結果
| 問題 |
No.1659 Product of Divisors
|
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2021-08-28 01:43:47 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 571 bytes |
| コンパイル時間 | 124 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 21,376 KB |
| 最終ジャッジ日時 | 2024-11-21 09:07:26 |
| 合計ジャッジ時間 | 51,297 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 7 TLE * 16 |
ソースコード
import sys
input = sys.stdin.readline
import math
N,K=map(int,input().split())
mod=10**9+7
x=N
L=int(math.sqrt(x))
FACT=dict()
for i in range(2,L+2):
while x%i==0:
FACT[i]=FACT.get(i,0)+1
x=x//i
if x!=1:
FACT[x]=FACT.get(x,0)+1
def calc(x):
DP=[0]*(x+1)
DP[-1]=1
for i in range(K):
NDP=[0]*(x+1)
for j in range(x+1):
if DP[j]!=0:
for k in range(j+1):
NDP[k]+=DP[j]
DP=NDP
return sum(DP)
ANS=1
for f in FACT:
ANS*=calc(FACT[f])
print(ANS%mod)
titia