結果

問題 No.1836 Max Matrix
ユーザー brthyyjpbrthyyjp
提出日時 2022-02-13 18:49:11
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 472 ms / 2,000 ms
コード長 215 bytes
コンパイル時間 944 ms
コンパイル使用メモリ 86,560 KB
実行使用メモリ 75,936 KB
最終ジャッジ日時 2023-09-11 15:38:33
合計ジャッジ時間 6,373 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
70,780 KB
testcase_01 AC 67 ms
70,800 KB
testcase_02 AC 372 ms
75,636 KB
testcase_03 AC 369 ms
75,540 KB
testcase_04 AC 226 ms
75,848 KB
testcase_05 AC 315 ms
75,368 KB
testcase_06 AC 255 ms
75,388 KB
testcase_07 AC 357 ms
75,936 KB
testcase_08 AC 157 ms
75,604 KB
testcase_09 AC 373 ms
75,660 KB
testcase_10 AC 253 ms
75,384 KB
testcase_11 AC 63 ms
70,984 KB
testcase_12 AC 472 ms
75,408 KB
testcase_13 AC 188 ms
75,568 KB
testcase_14 AC 209 ms
75,676 KB
testcase_15 AC 76 ms
75,672 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

mod = 998244353

ans = 0
for i in range(1, m+1):
    x = pow(m-i+1, h, mod)-pow(m-i, h, mod)
    y = pow(m-i+1, w, mod)-pow(m-i, w, mod)
    ans += x*y
    ans %= mod
print(ans)
0