結果

問題 No.1836 Max Matrix
ユーザー SumitacchanSumitacchan
提出日時 2021-12-07 22:12:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 288 ms / 2,000 ms
コード長 295 bytes
コンパイル時間 421 ms
コンパイル使用メモリ 86,932 KB
実行使用メモリ 79,400 KB
最終ジャッジ日時 2023-09-22 09:31:20
合計ジャッジ時間 3,873 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,356 KB
testcase_01 AC 67 ms
71,000 KB
testcase_02 AC 223 ms
79,272 KB
testcase_03 AC 231 ms
79,044 KB
testcase_04 AC 156 ms
78,300 KB
testcase_05 AC 205 ms
78,652 KB
testcase_06 AC 173 ms
77,992 KB
testcase_07 AC 233 ms
79,132 KB
testcase_08 AC 122 ms
77,016 KB
testcase_09 AC 231 ms
79,400 KB
testcase_10 AC 171 ms
78,428 KB
testcase_11 AC 70 ms
71,292 KB
testcase_12 AC 288 ms
79,112 KB
testcase_13 AC 142 ms
79,080 KB
testcase_14 AC 149 ms
79,260 KB
testcase_15 AC 81 ms
77,900 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding: utf-8 -*-

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

powH = [pow(i, H, mod) for i in range(M+1)]
powW = [pow(i, W, mod) for i in range(M+1)]

ans = 0
for i in range(1, M+1):
    ans += (powH[i] - powH[i-1] + mod) * (powW[i] - powW[i-1] + mod) 
    ans %= mod

print(ans)
0