結果
| 問題 |
No.1659 Product of Divisors
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-08-28 08:27:54 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 58 ms / 2,000 ms |
| コード長 | 407 bytes |
| コンパイル時間 | 280 ms |
| コンパイル使用メモリ | 82,860 KB |
| 実行使用メモリ | 58,240 KB |
| 最終ジャッジ日時 | 2024-11-21 20:19:47 |
| 合計ジャッジ時間 | 2,364 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 |
ソースコード
n,k = map(int,input().split())
mod = 10**9+7
ans = 1
for i in range(2,int(n**0.5)+1):
if n%i:
continue
count = 0
while n%i == 0:
n //= i
count += 1
base = 1
for i in range(count):
ans *= count+k-i
ans %= mod
base *= i+1
base %= mod
ans *= pow(base,mod-2,mod)
ans %= mod
if n != 1:
ans *= k+1
ans %= mod
print(ans)