結果

問題 No.2383 Naphthol
ユーザー 👑 p-adicp-adic
提出日時 2023-07-15 00:24:51
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 254 bytes
コンパイル時間 332 ms
コンパイル使用メモリ 87,012 KB
実行使用メモリ 82,928 KB
最終ジャッジ日時 2023-10-14 14:46:51
合計ジャッジ時間 5,906 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 AC 77 ms
71,068 KB
testcase_04 AC 78 ms
71,280 KB
testcase_05 AC 76 ms
71,124 KB
testcase_06 AC 75 ms
71,076 KB
testcase_07 AC 74 ms
71,072 KB
testcase_08 AC 76 ms
71,332 KB
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K=map(int,input().split())
P=998244353
def C(x,y):
	a=1
	for i in range(y):a=(a*(x-i)*pow(i+1,-1,P))%P
	return a
a=C(2*N+4,K)
b=[C(N+2,K//2),0][K%2]
c=[C(N+2,K//2),[0,C(N+1,K//2)*2][N%2]][K%2]
print([1,1,3,3,3,1,1][K]if N<2 else(a+b*2+d)*pow(4,-1,P)%P)
0