結果

問題 No.1836 Max Matrix
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2022-02-13 11:18:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 286 ms / 2,000 ms
コード長 216 bytes
コンパイル時間 282 ms
コンパイル使用メモリ 86,888 KB
実行使用メモリ 76,064 KB
最終ジャッジ日時 2023-09-11 15:21:46
合計ジャッジ時間 3,797 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,012 KB
testcase_01 AC 71 ms
71,072 KB
testcase_02 AC 217 ms
75,932 KB
testcase_03 AC 227 ms
75,992 KB
testcase_04 AC 157 ms
76,016 KB
testcase_05 AC 204 ms
75,932 KB
testcase_06 AC 172 ms
75,956 KB
testcase_07 AC 229 ms
76,028 KB
testcase_08 AC 123 ms
75,728 KB
testcase_09 AC 232 ms
76,064 KB
testcase_10 AC 175 ms
76,020 KB
testcase_11 AC 73 ms
71,048 KB
testcase_12 AC 286 ms
76,024 KB
testcase_13 AC 141 ms
75,788 KB
testcase_14 AC 149 ms
75,968 KB
testcase_15 AC 81 ms
75,740 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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