結果

問題 No.2380 Sylow P-subgroup
ユーザー YTOKYTOK
提出日時 2023-07-14 22:48:23
言語 Julia
(1.10.2)
結果
AC  
実行時間 377 ms / 2,000 ms
コード長 252 bytes
コンパイル時間 181 ms
コンパイル使用メモリ 6,812 KB
実行使用メモリ 252,068 KB
最終ジャッジ日時 2024-04-09 14:17:13
合計ジャッジ時間 7,719 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 372 ms
249,876 KB
testcase_01 AC 372 ms
247,660 KB
testcase_02 AC 373 ms
247,888 KB
testcase_03 AC 370 ms
249,116 KB
testcase_04 AC 371 ms
248,408 KB
testcase_05 AC 373 ms
249,724 KB
testcase_06 AC 374 ms
251,036 KB
testcase_07 AC 377 ms
251,160 KB
testcase_08 AC 377 ms
249,920 KB
testcase_09 AC 375 ms
247,880 KB
testcase_10 AC 375 ms
249,728 KB
testcase_11 AC 377 ms
250,492 KB
testcase_12 AC 376 ms
250,380 KB
testcase_13 AC 376 ms
252,068 KB
testcase_14 AC 372 ms
249,768 KB
testcase_15 AC 372 ms
249,616 KB
testcase_16 AC 370 ms
249,988 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

toI(s=readline()) = parse(Int,s)
toVI(s=readline()) = toI.(split(s))

function main()
	n,p = toVI()
	solve(n,p) |> println
end

function solve(n,p)
	cnt = 0
	e = 1
	while p^e ≤ n
		cnt += n ÷ p^e
		e += 1
	end
	powermod(p,cnt,998244353)
end

main()
0