题解 P8143【[JRKSJ R4] Stirling】

· · 题解

题解

代码

#include <iostream>
#define int long long
using namespace std;
const int mod = 998244353;

int tot = 1,n;

signed main()
{
    cin >> n;
    for(int i = 1;i <= n;++i)
        tot = tot * i % mod;
    cout << tot * 499122177 % mod;
    return 0;
}