結果

問題 No.1836 Max Matrix
ユーザー ytftytft
提出日時 2022-02-12 19:13:18
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 509 ms / 2,000 ms
コード長 317 bytes
コンパイル時間 491 ms
コンパイル使用メモリ 87,080 KB
実行使用メモリ 76,852 KB
最終ジャッジ日時 2023-09-11 07:23:21
合計ジャッジ時間 6,902 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,240 KB
testcase_01 AC 74 ms
71,436 KB
testcase_02 AC 434 ms
76,700 KB
testcase_03 AC 432 ms
76,700 KB
testcase_04 AC 288 ms
76,640 KB
testcase_05 AC 373 ms
76,756 KB
testcase_06 AC 302 ms
76,700 KB
testcase_07 AC 411 ms
76,844 KB
testcase_08 AC 185 ms
76,692 KB
testcase_09 AC 427 ms
76,568 KB
testcase_10 AC 317 ms
76,700 KB
testcase_11 AC 75 ms
71,396 KB
testcase_12 AC 509 ms
76,728 KB
testcase_13 AC 274 ms
76,760 KB
testcase_14 AC 294 ms
76,852 KB
testcase_15 AC 123 ms
76,608 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def p(a,p,mod):
    ans=1
    while p>0:
        if p%2:
            ans=ans*a%mod
        a=a*a%mod
        p=p//2
    return ans
    
    
    
H,W,M=map(int,input().split())
mod=998244353
ans=0
for m in range(1,M+1):
    ans+=(p(M-m+1,H,mod)-p(M-m,H,mod))*(p(M-m+1,W,mod)-p(M-m,W,mod))
    ans%=mod
print(ans)
    
0