結果

問題 No.2113 Distance Sequence 1.5
ユーザー shotoyooshotoyoo
提出日時 2022-10-28 22:09:03
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 766 bytes
コンパイル時間 413 ms
コンパイル使用メモリ 86,836 KB
実行使用メモリ 72,488 KB
最終ジャッジ日時 2023-09-20 05:08:28
合計ジャッジ時間 4,022 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 98 ms
72,220 KB
testcase_01 AC 96 ms
71,928 KB
testcase_02 AC 98 ms
72,040 KB
testcase_03 AC 97 ms
72,036 KB
testcase_04 AC 95 ms
72,328 KB
testcase_05 AC 97 ms
72,256 KB
testcase_06 AC 96 ms
72,468 KB
testcase_07 WA -
testcase_08 AC 96 ms
72,184 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 95 ms
72,436 KB
testcase_15 WA -
testcase_16 AC 95 ms
72,464 KB
testcase_17 AC 97 ms
71,868 KB
testcase_18 AC 95 ms
72,428 KB
testcase_19 AC 95 ms
72,196 KB
testcase_20 WA -
testcase_21 AC 96 ms
72,072 KB
testcase_22 WA -
testcase_23 AC 94 ms
72,300 KB
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys, random
input = lambda : sys.stdin.readline().rstrip()


write = lambda x: sys.stdout.write(x+"\n"); writef = lambda x: print("{:.12f}".format(x))
debug = lambda x: sys.stderr.write(x+"\n")
YES="Yes"; NO="No"; pans = lambda v: print(YES if v else NO); INF=10**18
LI = lambda : list(map(int, input().split())); II=lambda : int(input()); SI=lambda : [ord(c)-ord("a") for c in input()]
def debug(_l_):
    for s in _l_.split():
        print(f"{s}={eval(s)}", end=" ")
    print()
def dlist(*l, fill=0):
    if len(l)==1:
        return [fill]*l[0]
    ll = l[1:]
    return [dlist(*ll, fill=fill) for _ in range(l[0])]

n,m,k = list(map(int, input().split()))
M = 998244353
ans = pow(k, 2*n, M) * (m-k+1) % M
ans -= pow(k-1, 2*n, M) * (m-k) % M
print(ans%M)
0