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++: #include <algorithm>
#include <sstream>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <stack>
#include <stdio.h>
#include <string>
#include <queue>
#include <vector>
using namespace std;

long long int factorial(int n) {
	if (n == 1) return n;

	return n * factorial(n - 1);
}

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

C++: #include<iostream>
int main(){
	int n;
	std::cin>>n;
	int a=1;
	if(n<=12){
		for(int i=1;i<=n;i++){
			a*=i;
		}
		std::cout<<a<<std::endl;
	}
	else if(n==13)std::cout<<355687428096000/16/15/14/13;
	else if(n==14)std::cout<<355687428096000/16/15/14;
	else if(n==15)std::cout<<355687428096000/16/15;
	else if(n==16)std::cout<<355687428096000/16;
	else if(n==17)std::cout<<355687428096000;
	else if(n==18)std::cout<<355687428096000*18;
	else if(n==19)std::cout<<355687428096000*18*19;
	else if(n==20)std::cout<<355687428096000*18*19*20;
	

	return 0;
}

C++: #include<stdio.h>
int main()
{
  long long int n,res;
    int i;
    while(scanf("%lld",&n)==1){
            res=1;

        for(i=2;i<=n;i++){
            res=res*i;
        }

   printf("%lld\n",res);

    }



   return 0;


    }

C++: #include <iostream>
#include<math.h>
#include<iomanip>
#include<vector>
#include<algorithm>
#include<functional>
using namespace std;

int main()
{
    int  a=0,b=0,i=0;
    cin >> a;
    b=1;
    for(i=0;i<a;i++){
        b=b*(i+1);
    }

    cout << b << endl;



    //cout << endl;

return 0;

}

C++: #include<stdio.h>
#include<string.h>
int main()
{
    int a,b,c,d,ans,cnt;

    while(scanf("%d",&ans)==1)
    {
        for(a=0,cnt=0;a<10;a++)
            for(b=0;b<10;b++)
                for(c=0;c<10;c++)
                    for(d=0;d<10;d++)
                        if(a+b+c+d==ans)
                            cnt++;
        printf("%d\n",cnt);
    }
}

C++: #include <iostream>

using namespace std;

int main()
{
    long long x;
    long long count=1;
    
    cin >> x;
    
    for (int i=1; i<=x; i++)
    {
        count *= i;
    }
    
    cout << count;
    return 0;
    
}

C++: #include<stdio.h>
long long int numbers[21];
int last_added=1;

long long int facto(int key)
{
	long long int m = 1;
	
	if (numbers[key] != 0)
		return numbers[key];
	
	else
	{
		for (int i = last_added; i <= key; i++)
		{
			if (numbers[i] != 0)
			{
				m *= numbers[i];
			}
			else
			{
				m *= i;
				numbers[i] = m;
				if (i > last_added)
					last_added = i;
			}
		}
		return m;
	}
}
int main()
{
	int n;
	while (scanf("%d", &n))
	{
		printf("%lld\n", facto(n));
	}
	return 0;
}

C++: #include <iostream>
//#include <fstream.h>
//#include <cstring>
using namespace std;

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

int main() {
  
  int n;

  cin >> n;

  cout << factorial(n) << "\n";

  return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<utility>
#include<string>
#include<cmath>
#include<cstring>
#include<queue>
#include<map>
#include<climits>
#include<set>
#include<tuple>
#include<stack>


using namespace std;
typedef pair<int, int> pii;
typedef long long int ll;
typedef pair<ll, ll> pll;
typedef tuple<int, int, int> tpl;
int dx[4] = { 1,0,0,-1 };
int dy[4] = { 0,1,-1,0 };

#define ARRAY_MAX 200005

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

ll cnt[ARRAY_MAX];


int main() {

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

C++: #include <iostream>

unsigned long func(unsigned long n)
{
	if(n==0)
		return 1;
	return n*func(n-1);
}

int main(void)
{
	unsigned long n;
	std::cin >> n;
	std::cout << func(n) << std::endl;
	return 0;
}

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

using namespace std;

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

int main(){

	long long n;
	scanf("%lld",&n);
	printf("%lld\n",func(n));

    return 0;
}

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


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

C++: #include <iostream>

using namespace std;

typedef unsigned long long ull;

ull fact (int n) {
    if (n < 2) return 1;
    else return (ull)n * fact(n - 1);
}

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

C++: #include <iostream>

using namespace std;

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

C++: #include <iostream>

int main(void)
{
    int n;
    std::cin >> n;

    long long unsigned int result = 1;
    for ( ; n > 0; n--) {
        result *= n;
    }

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

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

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

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

	return 0;
}

C++: #include<iostream>

using namespace std;

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

C++: #include <iostream>

using namespace std;

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

C++: #include <cstdio>
using namespace std;
long long fact(int n){
  if(n==2) return 2;
  return fact(n-1)*n;
}

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

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

int main()
{
  int n, ans;
  cin >> n;
  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 i,j,k;
  int n1=0;
  long long n2=1;

  cin>>n1;

  for(i=1;i<=n1;i++){
    n2*=i;
  }
  cout<<n2<<endl;

  return 0;
}

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

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

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

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

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

C++: #include <bits/stdc++.h>
using namespace std;
using uint = unsigned int;
using lint = long long int;
using ulint = unsigned long long int;
template<class T = int> using V = vector<T>;
template<class T = int> using VV = V< V<T> >;
template<class T, class U> void assign(V<T>& v, int n, const U& a) { v.assign(n, a); }
template<class T, class... Args> void assign(V<T>& v, int n, const Args&... args) { v.resize(n); for (auto&& e : v) assign(e, args...); }


int main() {
  cin.tie(nullptr); ios_base::sync_with_stdio(false);
  int n; cin >> n;
  lint res = 1;
  for (int i = 1; i <= n; ++i) res *= i;
  cout << res << '\n';
}

C++: #include <iostream>
using namespace std;
int fact(int n){
  return n<=1?1:n*fact(n-1);
}
int main(){
  int n;

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