結果

問題 No.1836 Max Matrix
ユーザー aoymats1aoymats1
提出日時 2022-02-12 21:17:51
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 493 ms / 2,000 ms
コード長 257 bytes
コンパイル時間 831 ms
コンパイル使用メモリ 87,180 KB
実行使用メモリ 76,364 KB
最終ジャッジ日時 2023-09-11 09:35:02
合計ジャッジ時間 5,345 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,372 KB
testcase_01 AC 72 ms
71,300 KB
testcase_02 AC 364 ms
76,268 KB
testcase_03 AC 369 ms
76,136 KB
testcase_04 AC 233 ms
76,348 KB
testcase_05 AC 323 ms
76,308 KB
testcase_06 AC 261 ms
75,976 KB
testcase_07 AC 374 ms
76,292 KB
testcase_08 AC 165 ms
76,360 KB
testcase_09 AC 381 ms
76,236 KB
testcase_10 AC 267 ms
76,180 KB
testcase_11 AC 72 ms
71,296 KB
testcase_12 AC 493 ms
76,152 KB
testcase_13 AC 200 ms
76,364 KB
testcase_14 AC 218 ms
76,196 KB
testcase_15 AC 81 ms
76,052 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 998244353

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

ans = 0
for i in range(1, M + 1):
    cnt_H = pow(M - i + 1, H, MOD) - pow(M - i, H, MOD) 
    cnt_W = pow(M - i + 1, W, MOD) - pow(M - i, W, MOD) 
    ans += cnt_H * cnt_W
    ans %= MOD
    
print(ans)
0