結果

問題 No.1836 Max Matrix
ユーザー lloyzlloyz
提出日時 2022-02-11 22:48:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 484 ms / 2,000 ms
コード長 267 bytes
コンパイル時間 184 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 61,952 KB
最終ジャッジ日時 2024-06-27 20:41:09
合計ジャッジ時間 4,504 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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