题解:P14313 [Aboi Round 2] IDSMILE
思路:
找规律发现,当
比如样例,当 n=4 时,结果为
而
所以,直接用模拟计算就行了。
记得取模!
:::info[Code]
#include<bits/stdc++.h>
using namespace std ;
const long long mod=998244353;
int main () {
long long n,now=1,res=1;
cin>>n;
for (int i=1;i<n;i++) {
res=res*now%mod;
now+=2;
}
cout<<res;
return 0;
}
:::