結果

問題 No.1836 Max Matrix
ユーザー 👑 rin204rin204
提出日時 2022-02-11 21:35:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 496 ms / 2,000 ms
コード長 254 bytes
コンパイル時間 616 ms
コンパイル使用メモリ 87,256 KB
実行使用メモリ 76,456 KB
最終ジャッジ日時 2023-09-10 01:11:35
合計ジャッジ時間 5,674 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,300 KB
testcase_01 AC 71 ms
71,484 KB
testcase_02 AC 364 ms
76,400 KB
testcase_03 AC 380 ms
76,280 KB
testcase_04 AC 236 ms
76,184 KB
testcase_05 AC 327 ms
76,272 KB
testcase_06 AC 264 ms
76,256 KB
testcase_07 AC 375 ms
76,352 KB
testcase_08 AC 168 ms
76,456 KB
testcase_09 AC 382 ms
76,364 KB
testcase_10 AC 268 ms
76,292 KB
testcase_11 AC 70 ms
71,180 KB
testcase_12 AC 496 ms
76,348 KB
testcase_13 AC 202 ms
76,268 KB
testcase_14 AC 217 ms
76,336 KB
testcase_15 AC 84 ms
76,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 998244353

h, w, m = map(int, input().split())
ans = 0

for min_ in range(1, m + 1):
    hh = pow(m - min_ + 1, h, MOD) - pow(m - min_, h, MOD)
    ww = pow(m - min_ + 1, w, MOD) - pow(m - min_, w, MOD)
    ans += hh * ww
    ans %= MOD
print(ans)
0