解析
可以发现,当 i i i 为 0 0 0 时,有 0 , 1 0,1 0,1 两种取值,所以无论后面的数形成的是奇数还是偶数,所以都可以组成成奇数。
则答案即为 3 × 4 × 5 × ⋯ × ( n + 1 ) 3\times 4\times 5\times \cdots \times (n+1) 3×4×5×⋯×(n+1) = ! ( n + 1 ) / 2 \ =\ !(n+1)/2 = !(n+1)/2
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define endl '\n'
#define inf 0x3f3f3f3f
#define mod 998244353
const int N=2e5+5;
int n;
void solve(){
cin>>n;
int ans=1;
for(int i=3;i<=n+1;i++){
ans*=i;
ans%=mod;
}
cout<<ans<<endl;
}
signed main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int t=1;
// cin>>t;
while(t--) solve();
return 0;
}