Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(nextString())
	if err != nil {
		fmt.Printf("strconv.Atoi failed: %v\n", err)
	}
	return n
}

func main() {
	scanner.Split(bufio.ScanWords)

	n := nextInt()
	f := 1
	for i := 1; i <= n; i++ {
		f *= i
	}
	fmt.Println(f)
}

C++: #include <iostream>

#define ll long long 

using namespace std;

ll fact(ll n) {
    if(n == 1) {
        return 1;
    }
    
    return n * fact(n - 1);
}

int main() {
    int num;
    
    cin >> num;
    
    if(0 <= num && num <= 20) {
        cout << fact((ll)num) << endl;
    }
    
    return 0;
}

C++: #include <cstdio>
#include <iostream>

using namespace std;

typedef long long ll;


int kaizyou(int n,ll sum);

int n;
ll ans=1;

int main(){
	while(cin >> n){
		ans = 1;
		kaizyou(n,ans);
		cout << ans << endl;
	}
}

int kaizyou(int n,ll sum){
	if(n > 1){
		ans = sum * n;
		kaizyou(n - 1,ans);
	}

}

C++: #include <iostream>

using namespace std;
int fact(int n) {
  if (n < 1 || n > 20) return 0;
  if (n == 1) return 1;
  else return fact(n - 1) * n;
}

int main() {
  int n;
  cin >> n;
  if (fact(n))
    cout << fact(n) << endl;
  return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
    int n,i=2;
    cin>>n;
    for(;i<n;i++)n*=i;
    cout<<n<<endl;
}

C++: 
#include <iostream>
using namespace std;
int main(){
    int n,i,ans[20];
    cin>>n;
    for(i=0;i<=n;i++){
        if(i==0){
            ans[0]=1;
        }else{
            ans[i]=ans[i-1]*i;
        }
    }
    cout<<ans[n]<<endl;
    return 0;
}

C++: #include<iostream>	
 
int main()	
{
	using namespace std;	
 
	int num,factorial=1;
	cout<<"Enter the number: ";  
	cin>>num;
 
	for(int i=1;i<=num;i++)
	{
		factorial=factorial*i;
	}
 
	cout<<<<factorial<<endl;
 
	cin.get();
 
	return 0;
}

C++: #include<iostream>

using namespace std;

int fac(int n)
{
    int res = 1;
    if(n > 0)
        for(int i = n; i > 0; --i)
            res = res * i;
    else if(n < 0)
        for(int i = n; i < 0; ++i)
            res = res * i;
    return res;
}

int main()
{
    int n;
    cin >> n;

    cout << fac(n) << endl;

    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

long long f(long long n){
	if( n == 0 ) return 1;
	return f(n-1) * n;
}
int main(){
	long long n;
	cin >> n;
	cout << f(n) << endl;
	
}

C++: #include<iostream>
using namespace std;
int main(){
  long long int n,ans = 1;
  cin >>n;
  for(long long int i=1; i<=n; i++) ans*=i;
  cout <<ans<<endl;
  return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
    long long f[25];
    f[0]=1;
    for(int i=1;i<=20;i++)
        f[i]=f[i-1]*i;
    int n;
    while(cin>>n)cout<<f[n]<<endl;
}

C++: #include <iostream>
using namespace std;

int main()
{
	int n;
	const int max = 100;
	int num[max];
	int a[max];
	cin >> n;
	for(int i = 1; i < max; i++){
		num[i] = 0; a[i] = 0;
	}
	num[1] = 1;
	a[1] = 1;
	for(int i = 1; i <= n; i++){
		int digit = max - 1;
		for(;num[digit] == 0;digit--);
		for(int j = digit; j >= 1; j--){
			num[j + 2] += (a[j] * i) / 100;
			num[j + 1] += ((a[j] * i) % 100) / 10;
			num[j] = ((a[j] * i) % 100) % 10;
		}
		for(int m = 1; m <= digit + 2; m++)
			a[m] = num[m];
	}
	int digit = max - 1;
	for(;num[digit] == 0;digit--);
	for(int k = digit; digit >= 1; digit--)
		cout << num[digit];
	cout << endl;
	return 0;
}

C++: #include<stdio.h>
int main()
{
    int i,n,s=1;
    scanf("%d",&n);
    for(i=1;i<=n;i++){
            s=s*i;
    }
    printf("%d\n",s);
    return 0;
}

C++: #include <iostream>
using namespace std;

int fact(int n){
  if(n==0) return 1;
  else return n * fact(n-1);
}

int main(){
  int n;
  cin >> n;
  cout << fact(n) << endl;
  return 0;
}

C++: #include <stdio.h>

typedef long long LL;

LL a[21];

void init(){
	a[1] = 1;
	for (int i=2; i<=20; ++i){
		a[i] = a[i-1]*i;
	}
}

void solve(LL n){
	printf("%lld\n", a[n]);
}

int main (){
	__int64 n;
	init();
	while (~scanf("%lld", &n)){
		solve(n);
	}
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int serch(int n)
{
    if(n==1)return n;
    return n*serch(n-1);
}
int main()
{
    int n;
    cin>>n;
    n=serch(n);
    cout<<n<<endl;
}

C++: #include <iostream>
using namespace std;
long long f(int n){return(n?n*f(n-1):1);}
int main(){int n;cin >> n;cout << f(n) << endl;return 0;}

C++: #include<iostream>
#include<vector>
using namespace std;
long long int kai(long long int n){
    if(n <=0)return 1;
    return n*kai(n-1);

}

int main(void){
   long long int n;
   cin>>n;
   cout<< kai(n)<<endl;
return 0;
}

C++: #include <iostream>
#include <stdio.h>
using namespace std;
int main(){
    int n;
    double x=1;
    cin >> n;
    for (int i=1;i<=n;i++){
        x*=i ;
    }
    // cout << x << endl;
    printf("%25.0f",x);
}

C++: #include <iostream>
using namespace std;

long factorial(long n){
  if(n > 0){
    return n*factorial(n-1);
  } else {
    return 1;
  }
}

int main(){
  long n;
  cin>>n;

  cout<< factorial(n)>>endl;
}

C++: #include <iostream>
using namespace std;

unsigned int factorial(int x) {

  if(x != 1)
    return x * factorial(x-1);
  else if(x == 1)
    return 1;
}

int main() {
  int a;
  cin >> a;
  cout << factorial(a) << endl;
  return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int n,cnt,num;
	
	while(scanf("%d",&n)!=EOF) {
		for(cnt=1;cnt<=20;cnt++){
			num=1;
			for(n=cnt;n>=1;n--){
				num*=n;
			}
			printf("%d\n",num);
		}
	}
		return 0;
}

C++: #include<iostream>
main(n,i){
  std::cin>>n;
  for(i=n;--n;)
    i*=n;
  std::cout<<i;}

C++: #include<iostream>
#include<iomanip>
#include<algorithm>
#include<cctype>
#include<cmath>
#include<cstdio>
#include<set>
#include<stack>
#include<string>
#include<sstream>
#include<map>
#include<queue>
#include<vector>
using namespace std;

int main() {
	int n, s = 1;
	cin >> n;
	while (n)s *= n--;
	cout << s << endl;
	return 0;
}

C++: #include <iostream>
using namespace std;

int main() {
  int n;
  long long x = 1;
  cin >> n;
  for (int i=2; i<=n; i++) {
    x *= i;
  }
  cout << x << endl;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include<bits/stdc++.h>
using namespace std;
#ifndef FAST_IO
 #define IOS ios_base::sync_with_stdio(false);cin.tie(nullptr);
#endif

#define FILE_IO freopen("input.txt","r",stdin)
#define int long long
#define f first
#define s second
#define endl '\n'
#define all(c) c.begin(),c.end()
#define bp __builtin_popcount
#define debug(x) cerr << #x << " = " << x << endl;

const int MOD = 1e9 + 7;
const int INF = 1e18;

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
template <typename T>void print(T t){for(auto &it : t)cout<<it<<" ";}
inline int powerexp(int a, int b, int m = MOD){ int res = 1;while(b){if(b&1)res = res * a % m;a = a * a % m,b >>= 1;}return res % m;}
inline int modinv(int a){ return powerexp(a,MOD-2,MOD);}
inline int lcm(int a, int b){ int g = __gcd(a,b);return a/g*b;}
inline int add(int x, int y){ x += y; if (x >= MOD) x -=  MOD; return x;}
inline int mul(int x, int y){ return (x * 1ll * y) % MOD;}
inline int sub(int x, int y){ x -= y; if (x<0) x += MOD; return x ;}

//-------------------< start here >-------------------------// 

int fact(int n){
  int ret = 1;
  for(int i = 1; i <= n; i++)
   ret *= i;
  return ret;	
}

void solve(){
	int n;
	while(cin >> n){
	  cout << fact(n) << endl;	
    }
}

//-----------------------------
//comment from here for TOPCODER 
int32_t main(){
   IOS;
   solve();
   //find();
   #ifdef LOCAL_DEFINE
   cerr << "time elapsed " << (double)clock()/CLOCKS_PER_SEC << endl;
   #endif
}