結果

問題 No.1836 Max Matrix
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2022-02-13 11:16:32
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 287 ms / 2,000 ms
コード長 254 bytes
コンパイル時間 799 ms
コンパイル使用メモリ 87,080 KB
実行使用メモリ 76,220 KB
最終ジャッジ日時 2023-09-11 15:21:38
合計ジャッジ時間 4,072 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,076 KB
testcase_01 AC 73 ms
71,032 KB
testcase_02 AC 226 ms
76,072 KB
testcase_03 AC 230 ms
76,172 KB
testcase_04 AC 157 ms
75,864 KB
testcase_05 AC 205 ms
75,872 KB
testcase_06 AC 172 ms
76,152 KB
testcase_07 AC 228 ms
76,156 KB
testcase_08 AC 121 ms
76,220 KB
testcase_09 AC 230 ms
76,148 KB
testcase_10 AC 173 ms
76,144 KB
testcase_11 AC 73 ms
71,028 KB
testcase_12 AC 287 ms
76,096 KB
testcase_13 AC 138 ms
76,156 KB
testcase_14 AC 150 ms
76,076 KB
testcase_15 AC 82 ms
75,936 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

h,w,m = map(int,input().split())
mod = 998244353
ans = 1
bh = 1
bw = 1
for i in range(1,m)[::-1]:
    dif = m-i+1
    nh = pow(dif,h,mod)
    nw = pow(dif,w,mod)
    count = (nh-bh)*(nw-bw)%mod
    ans += count
    ans %= mod
    bh,bw = nh,nw
print(ans)
0