17 lines
248 B
C++
17 lines
248 B
C++
#include<bits/stdc++.h>
|
|
using namespace std;
|
|
int main()
|
|
{
|
|
const int MOD = 1000000;
|
|
int i, n;
|
|
int S = 0;
|
|
scanf("%d", &n);
|
|
if(n > 25) n = 25;
|
|
for( i = n; i >= 1; i-- )
|
|
S = (S + 1) * i % MOD;
|
|
printf("%d\n", S);
|
|
return 0;
|
|
}
|
|
|
|
|