結果

問題 No.1659 Product of Divisors
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2021-08-28 08:27:06
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 392 bytes
コンパイル時間 264 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 60,040 KB
最終ジャッジ日時 2024-05-01 15:24:25
合計ジャッジ時間 2,227 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 40 ms
59,928 KB
testcase_02 AC 36 ms
52,380 KB
testcase_03 AC 36 ms
53,136 KB
testcase_04 WA -
testcase_05 AC 45 ms
59,520 KB
testcase_06 AC 40 ms
58,436 KB
testcase_07 AC 39 ms
57,932 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 53 ms
59,040 KB
testcase_11 AC 51 ms
58,244 KB
testcase_12 AC 53 ms
59,468 KB
testcase_13 AC 35 ms
52,464 KB
testcase_14 AC 52 ms
58,968 KB
testcase_15 AC 38 ms
58,600 KB
testcase_16 AC 38 ms
58,840 KB
testcase_17 AC 39 ms
57,764 KB
testcase_18 AC 40 ms
57,848 KB
testcase_19 AC 40 ms
58,692 KB
testcase_20 AC 44 ms
58,964 KB
testcase_21 AC 48 ms
58,364 KB
testcase_22 AC 48 ms
58,772 KB
testcase_23 AC 50 ms
58,168 KB
testcase_24 AC 46 ms
60,040 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
if n != 1:
    ans *= k+1
    ans %= mod
print(ans)
0