結果

問題 No.2299 Antitypoglycemia
ユーザー dangodango
提出日時 2023-06-14 15:54:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 79 ms / 2,000 ms
コード長 137 bytes
コンパイル時間 1,998 ms
コンパイル使用メモリ 86,528 KB
実行使用メモリ 77,452 KB
最終ジャッジ日時 2023-09-05 03:49:36
合計ジャッジ時間 4,178 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,068 KB
testcase_01 AC 72 ms
71,348 KB
testcase_02 AC 71 ms
71,308 KB
testcase_03 AC 75 ms
76,772 KB
testcase_04 AC 77 ms
76,792 KB
testcase_05 AC 76 ms
76,572 KB
testcase_06 AC 77 ms
76,684 KB
testcase_07 AC 75 ms
75,908 KB
testcase_08 AC 77 ms
76,652 KB
testcase_09 AC 76 ms
76,800 KB
testcase_10 AC 75 ms
76,128 KB
testcase_11 AC 77 ms
76,376 KB
testcase_12 AC 79 ms
76,856 KB
testcase_13 AC 78 ms
77,304 KB
testcase_14 AC 75 ms
76,084 KB
testcase_15 AC 73 ms
75,808 KB
testcase_16 AC 74 ms
76,272 KB
testcase_17 AC 74 ms
76,048 KB
testcase_18 AC 77 ms
77,252 KB
testcase_19 AC 76 ms
77,212 KB
testcase_20 AC 75 ms
77,452 KB
testcase_21 AC 75 ms
77,200 KB
testcase_22 AC 76 ms
77,288 KB
testcase_23 AC 71 ms
71,100 KB
testcase_24 AC 72 ms
71,444 KB
testcase_25 AC 71 ms
71,220 KB
testcase_26 AC 70 ms
71,288 KB
testcase_27 AC 72 ms
71,424 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,a,b=map(int,input().split())
mod,f=998244353,[1]*(n+1)
for i in range(n):f[i+1]=f[i]*(i+1)%mod
print((f[n]-2*f[n-1]+f[n-2]*(a!=b))%mod)
0