結果

問題 No.2113 Distance Sequence 1.5
ユーザー ニックネームニックネーム
提出日時 2022-10-28 23:18:58
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 162 bytes
コンパイル時間 497 ms
コンパイル使用メモリ 10,668 KB
実行使用メモリ 7,992 KB
最終ジャッジ日時 2023-09-20 06:33:07
合計ジャッジ時間 1,559 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,776 KB
testcase_01 AC 16 ms
7,864 KB
testcase_02 AC 16 ms
7,800 KB
testcase_03 AC 16 ms
7,816 KB
testcase_04 AC 16 ms
7,804 KB
testcase_05 AC 16 ms
7,820 KB
testcase_06 AC 16 ms
7,856 KB
testcase_07 WA -
testcase_08 AC 16 ms
7,800 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 15 ms
7,740 KB
testcase_15 WA -
testcase_16 AC 15 ms
7,944 KB
testcase_17 AC 15 ms
7,992 KB
testcase_18 AC 15 ms
7,904 KB
testcase_19 AC 16 ms
7,836 KB
testcase_20 WA -
testcase_21 AC 16 ms
7,976 KB
testcase_22 WA -
testcase_23 AC 15 ms
7,976 KB
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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