文件目录

#include <bits/stdc++.h>
using namespace std;
vector<int> ans(50000, 0);
int len = 1;
void mul(int k)
{
    int jw = 0;
    for (int i = 0; i < len + 5; i++)
    {
        ans[i] *= k;
        ans[i] += jw;
        if (ans[i] >= 10)
        {
            jw = ans[i] / 10;
            ans[i] %= 10;
        }
        else
            jw = 0;
    }
}
int main()
{
    int n;
    cin >> n;
    if (n == 0)
    {
        cout << 0;
        return 0;
    }
    ans[0] = 1;
    for (int i = 2; i <= n; i++)
    {
        len += 5;
        mul(i);
    }
    int i = ans.size() - 1;
    while (ans[i] == 0)
        i--;
    for (; i >= 0; i--)
        cout << ans[i];
    return 0;
}