結果

問題 No.1659 Product of Divisors
ユーザー yuruhiyayuruhiya
提出日時 2021-08-28 18:27:34
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 237 bytes
コンパイル時間 250 ms
コンパイル使用メモリ 11,572 KB
実行使用メモリ 15,912 KB
最終ジャッジ日時 2023-08-14 03:13:14
合計ジャッジ時間 9,306 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
15,608 KB
testcase_01 AC 86 ms
15,452 KB
testcase_02 AC 77 ms
15,132 KB
testcase_03 WA -
testcase_04 AC 487 ms
15,576 KB
testcase_05 AC 321 ms
15,716 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 624 ms
15,628 KB
testcase_09 AC 623 ms
15,624 KB
testcase_10 WA -
testcase_11 AC 629 ms
15,824 KB
testcase_12 AC 612 ms
15,840 KB
testcase_13 AC 79 ms
15,176 KB
testcase_14 AC 613 ms
15,620 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 97 ms
15,792 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 537 ms
15,824 KB
testcase_24 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

M = 10**9 + 7
n, k = gets.split.map(&:to_i)
ans = 1
(2..n**0.5).each do |p|
	c = 0
	while n % p == 0
		c += 1
		n /= p
	end
	(k + 1..k + c).each { |i| ans = ans * i % M }
	(1..c).each { |i| ans = ans * i.pow(M - 2, M) % M }
end
puts ans
0