結果

問題 No.1836 Max Matrix
ユーザー ygd.ygd.
提出日時 2022-02-11 22:06:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 480 ms / 2,000 ms
コード長 796 bytes
コンパイル時間 451 ms
コンパイル使用メモリ 86,744 KB
実行使用メモリ 75,852 KB
最終ジャッジ日時 2023-09-10 02:56:27
合計ジャッジ時間 5,193 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,424 KB
testcase_01 AC 70 ms
71,136 KB
testcase_02 AC 349 ms
75,648 KB
testcase_03 AC 367 ms
75,480 KB
testcase_04 AC 231 ms
75,600 KB
testcase_05 AC 318 ms
75,708 KB
testcase_06 AC 256 ms
75,580 KB
testcase_07 AC 364 ms
75,536 KB
testcase_08 AC 160 ms
75,608 KB
testcase_09 AC 370 ms
75,800 KB
testcase_10 AC 258 ms
75,852 KB
testcase_11 AC 69 ms
71,444 KB
testcase_12 AC 480 ms
75,480 KB
testcase_13 AC 199 ms
75,380 KB
testcase_14 AC 217 ms
75,804 KB
testcase_15 AC 84 ms
75,644 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
#input = sys.stdin.readline #文字列につけてはダメ
input = sys.stdin.buffer.readline #文字列につけてはダメ
#sys.setrecursionlimit(1000000)
#import bisect
#import itertools
#import random
#from heapq import heapify, heappop, heappush
#from collections import defaultdict 
#from collections import deque
#import copy
#import math
#from functools import lru_cache
#@lru_cache(maxsize=None)
#MOD = pow(10,9) + 7
MOD = 998244353
#dx = [1,0,-1,0]
#dy = [0,1,0,-1]

def main():
    H,W,M = map(int,input().split())
    ans = 0
    for i in range(1,M+1):
        m = M - i + 1 #残り選べる数字
        temp = (pow(m,H,MOD) - pow(m-1,H,MOD)) * (pow(m,W,MOD) - pow(m-1,W,MOD))
        ans += temp
        ans %= MOD
    print(ans)


if __name__ == '__main__':
    main()
0