結果

問題 No.2351 Butterfly in Summer
ユーザー n_nan_na
提出日時 2023-06-17 01:06:52
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 117 ms / 2,000 ms
コード長 134 bytes
コンパイル時間 304 ms
コンパイル使用メモリ 87,312 KB
実行使用メモリ 73,096 KB
最終ジャッジ日時 2023-09-06 23:58:38
合計ジャッジ時間 3,590 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,352 KB
testcase_01 AC 66 ms
71,452 KB
testcase_02 AC 67 ms
71,432 KB
testcase_03 AC 111 ms
72,640 KB
testcase_04 AC 65 ms
71,344 KB
testcase_05 AC 65 ms
71,460 KB
testcase_06 AC 117 ms
72,608 KB
testcase_07 AC 111 ms
73,028 KB
testcase_08 AC 117 ms
73,096 KB
testcase_09 AC 115 ms
72,884 KB
testcase_10 AC 101 ms
72,268 KB
testcase_11 AC 68 ms
71,420 KB
testcase_12 AC 68 ms
71,396 KB
testcase_13 AC 110 ms
72,376 KB
testcase_14 AC 105 ms
72,512 KB
testcase_15 AC 110 ms
72,676 KB
testcase_16 AC 74 ms
71,304 KB
testcase_17 AC 73 ms
71,152 KB
testcase_18 AC 85 ms
72,368 KB
testcase_19 AC 71 ms
71,324 KB
testcase_20 AC 93 ms
72,356 KB
testcase_21 AC 91 ms
72,452 KB
testcase_22 AC 66 ms
71,308 KB
testcase_23 AC 84 ms
71,992 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 998244353

N,K = map(int,input().split())
top = (N%MOD*K%MOD*(K-1)%MOD)
bottom = pow(pow(K,N),MOD-2,MOD)

print(top*bottom%MOD)
0