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++: #include <algorithm>
#include <map>
#include <vector>
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstring>
#include <cctype>
#include <cstdlib>
#include <cmath>
#include <string>
#include <queue>
#include <stack>
#include <set>
using namespace std;

#define REP(i,n) for(int i=0; i<n; ++i)
#define IREP(it,array) for(vector<int>::iterator it=array.begin(); it!=array.end(); ++it)
#define SREP(it,array) for(vector<string>::iterator it=array.begin(); it!=array.end(); ++it)

#define MP       make_pair
#define PB       push_back
#define ALL(x)   (x).begin(),(x).end()

const int INF = 1<<29;
const double EPS = 1e-9;
double zero(double d){
  return d < EPS ? 0.0 : d;
}

typedef long long LL;
typedef pair<int,int> P;


int main()
{
  cout.setf(ios::fixed, ios::floatfield);
  cout.precision(7);

  int n;
  cin >> n;
  
  LL res=1L;
  REP(i,n){
    res *= i+1;
  }

  cout << res << endl;

  return 0;
}

C++: #include<iostream>
#include<cmath>
#include<cstdio>
using namespace std;
int fctrl(int n){
    if(n==0||n==1)return 1;
    else return n*fctrl(n-1);

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

    long long  rslt = fctrl(n);

    cout<<rslt<<endl;

    return 0;
}

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

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

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

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

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

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

long long fuct(int n){
	long long m;
	if(n==0) return 1;
	m = fuct(n-1);
	return m * n;
}

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

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

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

using namespace std;

double fact(double x);

int main(void) {
	double n;
	while(1) {
		cin >> n;
		if(cin.eof())		break;
		
		printf("%.0f\n", fact(n));
	}
	
	return 0;
}

double fact(double x) {
	if(x == 0) {
		return 1;
	}
	return x * fact(x - 1);
}

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

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

	return 0;

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

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

C++: #include<iostream>

using namespace std;

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

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<iostream>
using namespace std;
int main(){
  int n;
  long long sum = 1;
  cin >>n;
  for(int i=1; i<=n; i++){
    sum*=i;
  }
  cout <<sum<<endl;
  return 0;
}

C++: //include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>
#include <complex>
#include <math.h>
using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<long, long> PLL;
typedef long long LL;
//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(long i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

const long double EPS = 1e-12;
const double INF = 1e12;


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

C++: #include <iostream>

using namespace std;

long long fact(int n);

int main ()
{
	int n;

	cin >> n;

	cout << fact(n) << endl;

	return 0;
}

long long fact(int n)
{
	if(n == 1)    return 1;
	else if(n == 0)    return 0;

	return (n * fact(n - 1));
}

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

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

int fact(int number) {
    long r=0;
    for(int i=number; i>=1; i--)
{
r = r*i;
}
return r;
}
 
int Main() {

int num=0;
long result =0;

cin >> num;

result = fact(num);

cout<<result;

    
}

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

using namespace std;

int main() {
	int a;
	int seki[20] = {1};
	int l;

	cin >> a;

	for (int i = 1; i <= a; i++) {
		for (int j = 0; j < 20; j++) {
			seki[j] *= i;
		}

		for (int j = 0; j < 20; j++) {
			if (seki[j] >= 10) {
				seki[j+1] += seki[j] / 10;
				seki[j] = seki[j] % 10;
			}
		}
	}

	for (int i = 19; i >= 0; i--) {
		if(seki[i] != 0) {
			l = i;
			break;
		}
	}

	for (int k = l; k >= 0; k--) {
		cout << seki[k];
	}

	cout << endl;

	return 0;
}

C++: #include <stdio.h>

long long nl[21];

long long nkai(int n){
	if(nl[n] != 0){
		return nl[n];
	}
	nl[n] = n * nkai(n - 1);
	return nl[n];
}

int main(void){
	int n = 0;
	for(int i=0; i<21; ++i){
		nl[i] = 0;
	}
	nl[0] = nl[1] = 1;

	scanf("%d", &n);
	printf("%lld\n", nkai(n));
	return 0;
}

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


int main(){
  long long ans =1;
  int n;
  scanf("%d", &n);

  for(int i=n;i>1;--i)
    ans*=i;
  printf("%lld\n",ans);

  return EXIT_SUCCESS;
}

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


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

  vector<int64_t> a(21);

  a[0] = 1;
  for(int64_t i=0; i<n; i++){
    a[i+1] = a[i] * (i+1);
  }

  cout << a[n] << endl;

}

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

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

int main(){

int n;
long long x;
long long sum=1;

cin >> n;

for(x=1; x<=n; x++)
{
 sum = sum * x;         
}    

cout << sum << endl;

return 0;

}