結果
| 問題 |
No.1973 Divisor Sequence
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-06-10 22:54:44 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 308 ms / 2,000 ms |
| コード長 | 519 bytes |
| コンパイル時間 | 165 ms |
| コンパイル使用メモリ | 82,508 KB |
| 実行使用メモリ | 76,440 KB |
| 最終ジャッジ日時 | 2024-09-21 07:31:10 |
| 合計ジャッジ時間 | 4,082 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
n,m = map(int,input().split())
mod = 10**9+7
def calc(x):
dp = [1]*(x+1)
for i in range(n):
ndp = [0]*(x+1)
for j in range(x+1):
ndp[j] = dp[x-j]
for j in range(x):
ndp[j+1] += ndp[j]
ndp[j+1] %= mod
dp = ndp
return dp[-1]
ans = 1
for i in range(2,10**6+5):
if m%i:
continue
c = 0
while m%i == 0:
m //= i
c += 1
ans *= calc(c)
ans %= mod
if m > 1:
ans *= calc(1)
ans %= mod
print(ans)