結果

問題 No.2351 Butterfly in Summer
ユーザー lloyzlloyz
提出日時 2023-06-16 22:14:26
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 68 ms / 2,000 ms
コード長 147 bytes
コンパイル時間 361 ms
コンパイル使用メモリ 87,060 KB
実行使用メモリ 71,508 KB
最終ジャッジ日時 2023-09-06 20:15:51
合計ジャッジ時間 3,107 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
71,248 KB
testcase_01 AC 61 ms
71,112 KB
testcase_02 AC 64 ms
71,296 KB
testcase_03 AC 65 ms
71,428 KB
testcase_04 AC 62 ms
71,508 KB
testcase_05 AC 60 ms
71,432 KB
testcase_06 AC 60 ms
71,276 KB
testcase_07 AC 58 ms
71,252 KB
testcase_08 AC 60 ms
71,276 KB
testcase_09 AC 59 ms
71,084 KB
testcase_10 AC 60 ms
71,156 KB
testcase_11 AC 61 ms
71,272 KB
testcase_12 AC 60 ms
71,500 KB
testcase_13 AC 63 ms
71,308 KB
testcase_14 AC 66 ms
71,432 KB
testcase_15 AC 64 ms
71,468 KB
testcase_16 AC 68 ms
71,292 KB
testcase_17 AC 63 ms
71,248 KB
testcase_18 AC 63 ms
71,484 KB
testcase_19 AC 63 ms
71,204 KB
testcase_20 AC 65 ms
71,196 KB
testcase_21 AC 63 ms
71,040 KB
testcase_22 AC 63 ms
71,380 KB
testcase_23 AC 63 ms
71,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k = map(int, input().split())
mod = 998244353

ans = k * (k - 1) % mod * n % mod
ans *= pow(pow(k, n, mod), mod - 2, mod)
ans %= mod
print(ans)
0