結果
問題 |
No.2383 Naphthol
|
ユーザー |
👑 |
提出日時 | 2023-07-15 00:17:30 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 262 bytes |
コンパイル時間 | 170 ms |
コンパイル使用メモリ | 82,596 KB |
実行使用メモリ | 77,384 KB |
最終ジャッジ日時 | 2024-09-16 09:16:14 |
合計ジャッジ時間 | 3,232 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 RE * 2 |
other | AC * 7 RE * 11 |
ソースコード
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])