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<bits/stdc++.h>
using namespace std;

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,s,n) for(int i=(s);i<=(n);i++)
#define repr(i,n) for(int i=n-1;i>=0;i--)
#define REPR(i,s,n) for(int i=(s);i>=(n);i--)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define Eunique(v) v.erase(unique(all(v)),v.end())
#define Eback(s) s.erase(s.end()-1,s.end())
#define rev(v) reverse(all(v))
#define minvec(v) *min_element(all(v))
#define maxvec(v) *max_element(all(v))
#define sumvec(v) accumulate(all(v),0LL)
#define mapmin(v) v.rbegin()->first
#define mapmax(v) v.begin()->first
#define pb push_back
#define pf push_front
#define m_p make_pair
#define DOUBLE fixed << setprecision(15)
#define OK cerr<<"OK\n"
#define OK1 cerr<<"OK1\n"
#define OK2 cerr<<"OK2\n"
#define SIZE(s) (int)s.size()
#define INF ((1LL<<62)-(1LL<<31))
#define zero(x,n) setw(x) << setfill('0') << n
#define endl '\n'

typedef long long ll;

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<long long> vll;
typedef vector<vll> vvll;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<char> vc;
typedef vector<vc> vvc;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef vector<string> vs;

typedef pair<ll,ll> pll;
typedef pair<int,int> pii;
typedef vector<pair<int,int>> vpii;
typedef vector<pair<ll,ll>> vpll;

const double pi = acos(-1.0);
const ll mod=1000000007;
const ll mod2=998244353;

template<class A, class B>
ostream& operator<<(ostream& ost, const pair<A, B>&p) {
	ost << "{" << p.first << ", " << p.second << "} ";
	return ost;
}

template<class T>
ostream& operator<<(ostream& ost, const vector<T>&v) {
	ost << "{";
	for (int i = 0; i<(int)v.size(); i++) {
		if (i)ost << " ";
		ost << v[i];
	}
	ost << "} \n";
	return ost;
}

template<class A, class B>
ostream& operator<<(ostream& ost, const map<A, B>&v) {
	ost << "{";
	for (auto p:v) {
		ost << "{" << p.first << ", " << p.second << "} ";
	}
	ost << "} ";
	return ost;
}

template<class T>
inline bool chmax(T& a, T b){if(a<b){a=b;return true;} return false;}

template<class T>
inline bool chmin(T& a, T b){if(a>b){a=b;return true;} return false;}

void YES(bool b) {cout << ((b)?"YES\n":"NO\n");}
void Yes(bool b) {cout << ((b)?"Yes\n":"No\n");}
void yes(bool b) {cout << ((b)?"yes\n":"no\n");}
void Yay(bool b) {cout << ((b)?"Yay!\n":":(\n");}

ll powmod(ll a,ll b){ll c=1; while(b>0){ if(b&1){ c=a*c%mod; } a=a*a%mod; b>>=1; } return c;}
ll nCrmod(ll n,ll r){ll x=1,y=1; rep(i,r){x=x*(n-i)%mod; y=y*(i+1)%mod;} return x*powmod(y,mod-2)%mod;}
ll gcd(ll x, ll y) {return __gcd(x,y);}
ll lcm(ll x, ll y) {return x/__gcd(x,y)*y;}

int main()
{
	ll n;
	cin >> n;
	ll ans=1;
	for(ll i=1;i<=n;i++) ans*=i;
	cout << ans << endl;
	return 0;
}

C++: //Circumscribed Circle of a Triangle

#include<iostream>
#include<cstdio>
using namespace std;

int fac(int n){
    if(n == 0 || n == 1) return 1;
    
    return (n * fac(n -1));
}

int main(void){
    int n, res;
    
    cin >> n;
    
    res = fac(n);
    
    cout << res << endl;
    
    return 0;
}

C++: #include <stdio.h>
#include <string.h>

char result[100000];

void calculation(int multi){
    int carry=0,i,j=0;
    for(i=0;result[i]!=NULL;i++){
        carry+=(result[i]-48) * multi;
        result[j++]=(carry % 10) + 48;
        carry/=10;
    }
    while(carry){
        result[j++]=(carry % 10) + 48;
        carry/=10;
    }
    result[j]=NULL;
}

int main(){
    int i,input_number,multiplier,fact;

    scanf("%d",&input_number);
        result[0]=52;
        result[1]=50;
        result[2]=NULL;
        if(1<=input_number&&input_number<=4){
            fact=1;
            for(i=1;i<=input_number;i++){
                fact*=i;
            }
            printf("%d\n",fact);
        }

        else if(input_number==0)
            printf("1");

        else{
        for(i=5;i<=input_number;i++){
            multiplier=i;
            calculation(multiplier);
        }
        int con=strlen(result);
        for(i=con-1;i>=0;i--){
            printf("%c",result[i]);
        }
        printf("\n");


        }
    return 0;
}

C++: #include<stdio.h>

int main()
{
	int n,x,kaizyo=1;

	for(;;)
	{
		scanf("%d",&n);
		if(n<=20)
		{
			break;
		}
	}

	if(n==1)
	{
		kaizyo=1;
		printf("%d\n",kaizyo);
	}
	else if(n<=16)
	{
		for(x=1;x<=n;x++)
		{
			kaizyo*=x;
		}
		printf("%d\n",kaizyo);
	}
	else if(n==17)
	{
		printf("355687428096000\n");
	}
	else if(n==18)
	{
		printf("6402373705728000n");
	}
	else if(n==19)
	{
		printf("121645100408832000\n");
	}
	else if(n==20)
	{
		printf("2432902008176640000\n");
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

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

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

   return 0;
}

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

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

int main(void){
  int n;
  cin >> n;
  for(int i = n; i > 2; i--){
    n = n * i - 1;
  }
  cout << n;
  return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

int main()
{
    int num,f=1,i;
    cin >> num;
    getchar();
    for(i = num ; i>0;i--)
    {
        f *= i;
    }
    cout << f;


    return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <stack>
#include <queue>

using namespace std;

int main() {

	int n;
	long long int ans =1;

	cin >> n;

	for (int i = n; i > 1; i--) {
		ans *= i;
	}

	cout << ans << endl;
	return 0;
}

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

C++: #include<iostream>
using namespace std;
int main()
{
	int n;
	cin >> n;
	long long int i = 1;
	while (n >= 1) {
		i *= n;
		n--;
	}
	cout << i;

	return 0;
}

C++: main(i){printf("%d\n",rand(3));}

C++: #include<iostream>

using namespace std;


int main(){
	
	int n;
	long long factor = 1;
	
	cin >> n;
	
	for(int i=2;i<=n;i++)
	factor *= i;
	
	cout << factor << "\n";
    return 0;
}

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

main(){
   int i,n;
r;
  r=1;
  cin>>n;
  for(i=1;i<=n;++i){
    r=r*i;
  }
 cout<<r<<endl;
}

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

int main(){
  long long int n, i;

  cin >> n;

  if(n <= -2){

  }else if(n == 0){
    cout << "1" << endl;
  }else if(n >= 1){
    for(i = n - 1;i >= 1;i--){
      n = n * i;
    }
    cout << n << endl;
  }


  return 0;
}

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

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

C++: #include<bits/stdc++.h>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<algorithm>
using namespace std;

/**
 * vector<int>ar(3);
 * for(auto&e:ar){
 *     scanf("%d",&e);
 * }
 * sort(ar.begin(),ar.end())
 * int sum=accumulate(ar.begin(),ar.end(),0);
 **/

int main(){
    int mod=1000000007;
    int n;
    long ans=1;
    scanf("%d",&n);
    for(int i=n;i>1;i--) {
        ans*=i;
    }
    printf("%ld\n",ans);
    return 0;
}

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

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

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

main() { long long int n; std::cin >> n; std::cout << (int)tgamma(n+1) << std::endl; }