結果

問題 No.2299 Antitypoglycemia
ユーザー pluto77pluto77
提出日時 2023-06-21 16:13:06
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 81 ms / 2,000 ms
コード長 178 bytes
コンパイル時間 89 ms
コンパイル使用メモリ 10,668 KB
実行使用メモリ 16,088 KB
最終ジャッジ日時 2023-09-11 11:23:00
合計ジャッジ時間 3,111 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,808 KB
testcase_01 AC 15 ms
7,840 KB
testcase_02 AC 15 ms
7,788 KB
testcase_03 AC 57 ms
13,004 KB
testcase_04 AC 59 ms
13,400 KB
testcase_05 AC 42 ms
11,204 KB
testcase_06 AC 59 ms
13,284 KB
testcase_07 AC 24 ms
9,096 KB
testcase_08 AC 55 ms
12,860 KB
testcase_09 AC 61 ms
13,316 KB
testcase_10 AC 33 ms
9,852 KB
testcase_11 AC 34 ms
10,176 KB
testcase_12 AC 65 ms
13,920 KB
testcase_13 AC 77 ms
15,328 KB
testcase_14 AC 20 ms
8,688 KB
testcase_15 AC 20 ms
8,708 KB
testcase_16 AC 34 ms
10,504 KB
testcase_17 AC 27 ms
9,288 KB
testcase_18 AC 80 ms
15,884 KB
testcase_19 AC 79 ms
16,088 KB
testcase_20 AC 80 ms
15,968 KB
testcase_21 AC 80 ms
15,976 KB
testcase_22 AC 81 ms
15,960 KB
testcase_23 AC 15 ms
7,816 KB
testcase_24 AC 16 ms
7,988 KB
testcase_25 AC 15 ms
7,788 KB
testcase_26 AC 16 ms
7,820 KB
testcase_27 AC 15 ms
7,804 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,a,b=map(int,input().split())
mod=998244353

fact=[1]*(n+1)
for i in range(2,n+1):
 fact[i]=fact[i-1]*i%mod
res=fact[n]-2*fact[n-1]
if a!=b:
 res+=fact[n-2]
res%=mod
print(res)
0