結果

問題 No.1836 Max Matrix
ユーザー 👑 KazunKazun
提出日時 2022-02-12 00:23:52
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 490 ms / 2,000 ms
コード長 179 bytes
コンパイル時間 291 ms
コンパイル使用メモリ 87,140 KB
実行使用メモリ 76,332 KB
最終ジャッジ日時 2023-09-10 07:45:20
合計ジャッジ時間 5,269 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
71,460 KB
testcase_01 AC 71 ms
71,148 KB
testcase_02 AC 359 ms
76,216 KB
testcase_03 AC 371 ms
76,180 KB
testcase_04 AC 233 ms
76,100 KB
testcase_05 AC 324 ms
76,328 KB
testcase_06 AC 263 ms
76,104 KB
testcase_07 AC 373 ms
76,236 KB
testcase_08 AC 168 ms
76,116 KB
testcase_09 AC 377 ms
76,332 KB
testcase_10 AC 263 ms
76,036 KB
testcase_11 AC 70 ms
71,380 KB
testcase_12 AC 490 ms
76,180 KB
testcase_13 AC 199 ms
75,860 KB
testcase_14 AC 217 ms
76,156 KB
testcase_15 AC 81 ms
75,920 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

H,W,M=map(int,input().split())

Mod=998244353

X=0
for m in range(1,M+1):
    A=pow(M-m+1,H,Mod)-pow(M-m,H,Mod)
    B=pow(M-m+1,W,Mod)-pow(M-m,W,Mod)
    X+=A*B; X%=Mod

print(X)
0