結果

問題 No.2383 Naphthol
ユーザー 👑 p-adic
提出日時 2023-07-15 00:38:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 200 ms / 2,000 ms
コード長 208 bytes
コンパイル時間 234 ms
コンパイル使用メモリ 82,464 KB
実行使用メモリ 75,776 KB
最終ジャッジ日時 2024-09-16 09:33:00
合計ジャッジ時間 2,688 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

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
print(((K+2)%7>3)*2+1if N<2 else(C(2*N+4,K)+C(N+2-K%2,K//2)*[3,[0,2][N%2]][K%2])*748683265%P)
0