Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextInt() int {
	scanner.Scan()
	i, e := strconv.Atoi(scanner.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func factorial(n int) int {
	if n == 1 {
		return 1
	}
	return n*factorial(n-1)
}
func main() {
	scanner.Split(bufio.ScanWords)
	n := nextInt()
	fmt.Println(factorial(n))
}

C++: //#define _USE_MATH_DEFINES
//#include <cmath>
#include <iostream>
//#include <stdio.h>
//#include <stdlib.h>
//#include <iomanip>
//#include <vector>
//#include <string>
//#include <algorithm>
//#include <functional>
//#include <time.h>
//#include <sstream>
//#include <queue>

using namespace std;


int main(){

	long long ans;
	int n;

	cin >> n;

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

	cout << ans << endl;

	return 0;
}

C++: #include<stdio.h>

int main(void)
{
	unsigned long long int kai=1;
	int n,i,x=0;
	scanf("%d",&n);
	for(i=1;i<n+1;i++)
	{
		 kai=kai*i;

		 while(kai % 10 ==0)
		 {
			 kai = kai / 10;
			 x+=1;
		 }
	}
	if(x==0){
	printf("%llu\n",kai);
	}
	else
	{
		printf("%llu",kai);
		for(i=0;i<x;i++)
		{
			printf("%d",0);
		}
		printf("\n");
	}
  return 0;
}

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

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

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

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

C++: #include <cstdio>

int main(void)
{
	int n;
	int i;
	unsigned long long sum;
	
	sum = 1;
	
	scanf("%d", &n);
	
	for (i = 1; i <= n; i++){
		sum *= i;
	}
	
	printf("%d\n", sum);
	
	return (0);
}

C++: #include <iostream>

using namespace std;

void solve()
{
	int n;
	cin >> n;
	unsigned long long int ans = 1;
	for(int i = 1; i <= n; ++i)
	{
		ans *= i;
	}
	cout << ans << endl;
}

int main()
{
	solve();
	return(0);
}

C++: #include <iostream>

using namespace std;

void solve()
{
	int n;
	cin >> n;
	unsigned long long int ans = 1;
	for(int i = 1; i < n; ++i)
	{
		ans *= i;
	}
	cout << ans << endl;
}

int main()
{
	solve();
	return(0);
}

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

C++: #include<stdio.h>
#include <string>
#include <iostream>
using namespace std;


int factorial_loop(long long n);

int main(void)
{
long long n;
long long result1;


cin>>n;

if(0<n&&n<21) ;
else return 0;

	result1 =factorial_loop(n);

	cout<<result1;
	return 0;

}
int factorial_loop(long long n) {
    long long result = 1;
    long long k;

    for(k = 1; k <= n; k++) {
        result *= k;
		cout<<k<<" , "<<result<<endl;
    }
    return result;
}

C++: #include<iostream>
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>

unsigned long long fact(unsigned long long n)
{
    if (n <= 1) return 1;
    else return n * fact(n - 1);
}

int main()
{
    unsigned long long n;
    std::cin >> n;
    std::cout << fact(n) << std::endl;
}

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

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

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

C++: #include <iostream>

using namespace std;

inline long long int fact(int n){return n>1?n*fact(n-1):1;}

int main(void){
	int num;

	cin >> num;
	cout << fact(num) << endl;
	return 0;
}

C++: #include <iostream>

using namespace std;

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

	unsigned long long fractal = 1;
	do
	{
		fractal *= n;
	}
	while(--n > 0);
	
	cout << fractal << endl;

	return 0;
}

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

using namespace std;


int main(){

	int n;
	cin >> n;

	long int sum=1;

	for(int i=n; i>0 ; i--){
		sum *= i;
	}

	cout << sum << endl;
	return 0;
}

C++: #include <stdio.h>
int main(){

      unsigned long long int res;int n ,i ;
      while(scanf("%lld",&n)==1){
        res=1;
        for(i=2;i<=n;i++)res=res*i;
        printf("%llu\n",res);




      }

return 0;
}

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

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <sstream>
 #include<functional>

#define INPUT_FROM_FILE (0) 
#if INPUT_FROM_FILE
#include <fstream>
#endif

int main(int argc, char **argv){
	int n = 0;
	long long ans = 1;

#if INPUT_FROM_FILE
	std::ifstream ifs("test.txt");
#endif

#if INPUT_FROM_FILE
	ifs >> n;
#else
	std::cin >> n;
#endif

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

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

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

C++: #include<cstdio>


using namespace std;
int main(void)
{
	double a;
	double b = 1;
	scanf("%lf",&a);
	for(double i = 1;i <= a;i++)
	{
		b = b * i;
	}
	printf("%.0lf\n",b);
	return 0;
}

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

using namespace std;

long long int solve(long long int x){

  if(x == 0) return 1;
  return x * solve(x - 1);

}

int main(){

  long long int n;

  cin >> n;

  cout << solve(n) << endl;

}

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

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

C++: print(["1","1","2","6","24","120","720","5040","40320","362880","3628800","39916800","479001600","6227020800","87178291200","1307674368000","20922789888000","355687428096000","6402373705728000","121645100408832000","2432902008176640000","51090942171709440000"][int(input())])

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

long long int f(int x){
	if(x==0){
		return 1;
	}else{
		return x*f(x-1);
	}
}

int main(){
	int a;
	long long int r;
	while(cin >> a){
		r=f(a);
		cout << r << endl;
	}
	return 0;
}

C++: #include <iostream>

using namespace std;
double factorial;
double x;
double y = 1;
int main()
{
        cin >> factorial;

        while(factorial != 0)
        {
            x = factorial;
            y = y*x;
            factorial--;

        }
        cout << y;
}

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