結果

問題 No.2383 Naphthol
ユーザー 👑 p-adicp-adic
提出日時 2023-07-15 00:17:30
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 262 bytes
コンパイル時間 544 ms
コンパイル使用メモリ 87,140 KB
実行使用メモリ 82,724 KB
最終ジャッジ日時 2023-10-14 14:41:00
合計ジャッジ時間 4,935 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
71,212 KB
testcase_01 RE -
testcase_02 RE -
testcase_03 AC 61 ms
71,376 KB
testcase_04 AC 61 ms
71,368 KB
testcase_05 AC 61 ms
71,204 KB
testcase_06 AC 59 ms
71,188 KB
testcase_07 AC 62 ms
71,480 KB
testcase_08 AC 63 ms
71,324 KB
testcase_09 AC 63 ms
71,476 KB
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=max([C(N+2,K//2),[0,C(N+1,K//2)*2][N%2]][K%2],0)
d=b
print([(a+b+c+d)*pow(4,-1,P)%P,[1,1,3,3,3,1,1][K]][N<2])
0