結果

問題 No.2383 Naphthol
ユーザー 👑 p-adicp-adic
提出日時 2023-07-15 00:13:13
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 309 bytes
コンパイル時間 597 ms
コンパイル使用メモリ 87,240 KB
実行使用メモリ 77,648 KB
最終ジャッジ日時 2023-10-14 14:37:09
合計ジャッジ時間 4,751 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
70,892 KB
testcase_01 WA -
testcase_02 AC 89 ms
76,704 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 58 ms
71,216 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 245 ms
76,792 KB
testcase_15 AC 99 ms
76,404 KB
testcase_16 WA -
testcase_17 AC 83 ms
76,740 KB
testcase_18 AC 238 ms
76,780 KB
testcase_19 WA -
testcase_20 WA -
権限があれば一括ダウンロードができます

ソースコード

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
e=max([[C(N//2+1,K//4),[0,C((N+1)//2,K//4)][N%2]][(K%4)//2],0][K%2],0)
print((a+b+c+d+e)*pow(4,-1,P)%P)
0