Go: package main

import (
        "fmt"
)

func main() {
        var n int
        fmt.Scanf("%d", &n)
        fmt.Println(fact(n))
}

func fact(n int) (f uint64) {
        if n < 2 {
                return uint64(1)
        } else {
                return fact(n-1) * uint64(n)
        }
}

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; }

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

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

	return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
        unsigned long n, ans = 1;

        cin >> n;
        for (unsigned long i = n; i > 0; i--) {
                ans *= i;
        }
        cout << ans << endl;

        return 0;
}

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

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

C++: #include <iostream>
#include <stdio.h>
#include <vector>
#include <string>
#include <algorithm>

using namespace std;


int main(void){

	int n;
	cin >> n;

	unsigned long long int ans = 1;

	for( int i = 1; i <= n; i++ )
		ans *= i;

	cout << ans << endl;

    return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int a,b;
	std::cin>>a;
	b=1;
	for(int i=0 ;i<a ; i++)   b *= a -i ;
	std::cout<<b<<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 t = 1; (t <= digit + 2) && (t < max); t++){
			num[t + 1] += num[t] / 10;
			num[t] = num[t] % 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 <iostream>

int main(){
	
	long long int n,a=1;
	std::cin>>n;
	if(n<=20&&n>0){
	while(n!=0){
		a=a*n;
		n--;
	}
	
	std::cout<<a<<std::endl;
}
	return 0;
}

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

C++: #include <iostream>

using namespace std;

int main(){

	int n, y=1;

	cin>>n;

	if(n<=20){
		for(int i=1;i<=n;i++){
			y=y*i;
		}
		cout<<y<<endl;
	}
	else
		cout<<endl;

	return 0;
}