Go: package main

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

var sc = bufio.NewScanner(os.Stdin)
func readInt() int64 {
    sc.Scan()
    n, _ := strconv.Atoi(sc.Text())
    return int64(n)
}


func main() {
    var ans int64 = 1
    var n int64 = readInt()
    var i int64
    for i = 1; i <= n; i++ {
        ans *= i
    }
    fmt.Println(ans)
}

C++: #include "bits/stdc++.h"

#define REP(i,num) for(int i=0;i<(num);++i)
#define ALL(c) c.begin(),c.end()
#define PRINTALL(c) for(auto& x:c){cout<<x<<' ';}cout<<endl;
#define PAIRCOMP(c,comp) [](const pair<ll,ll>& lhs,const pair<ll,ll>& rhs){return lhs.c comp rhs.c;}

using namespace std;
using ll = long long;

constexpr ll atcoder_mod = 1e9+7;

template<typename T=int>
T in(){T x; cin >> x; return (x);}
template<typename T=int,typename C=vector<T>>
C vecin(int N){C x(N);REP(i,N){x[i]=in<T>();}return move(x);}

void vout(){cout << endl;}
template<typename Head,typename... Tail>
void vout(Head&& h,Tail&&... t){cout << ' ' << h;vout(forward<Tail>(t)...);}
void out(){cout << endl;}
template<typename Head,typename... Tail>
void out(Head&& h,Tail&&... t){cout << h;vout(forward<Tail>(t)...);}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int N=in();
	ll f=1;

	REP(i,N){
		f *= ((ll)(i+1)); 
	}
	out(f);
	return 0;
}

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

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

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

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

using namespace std;

int main(){
	int n;

	while (cin >> n){

		int ans = 1;

		while (n){
			ans *= n;
			n--;
		}

		cout << ans << endl;
	}

	return 0;
}

C++: #include <iostream>

using namespace std;

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

C++: main(){puts("2432902008176640000");}

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

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

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

C++: #include<iostream>
using namespace std;
int main() {
int n;
cin>>n;
int ans = 1;
for(int i=1; i<=n; i++) ans *= i;
printf("%d\n", ans);
}

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

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

C++: //include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#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>

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 long long LL;
typedef unsigned long long ULL;

//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(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

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

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

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

int main() {
  int n;

  cin >> n;

  cout << factrial(n) << endl;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <utility>
#include <iomanip>
#include <functional>
#include <queue>
#include <stack>
#include <cmath>
#define INF 100000000
#define MOD 1000000007
using namespace std;


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

C++: 
 #include <string>
 #include <vector>
 #include <algorithm>
 #include <iostream>
 #include <cstdio>
 #include <cstdlib>
 #include <cmath>
 #include <queue>
 #include <map>
 #define INF 100000000
 
 using namespace std;
 typedef long long ll;
 
 int num[21]={0};
 
 long long int kai(int n){
 if(num[n]!=0)return num[n];
 else{
 num[n]=n*kai(n-1);
 return num[n];
 }
 }
 
 int main(){
 int n;
 num[0]=num[1]=1;
 cin>>n;
 cout<<kai(n)<<endl;
 }

C++: #include <stdio.h>
int main()
{
	int n;
	char a[21][50] = 
	{"1","1","2","6","24","120","720","5040","40320","362880","3628800",
		"39916800","479001600","6227020800","87178291200","1307674368000","20922789888000","355687428096000","6402373705728000","121645100408832000","2432902008176640000"
	};
	while(scanf("%d",&n) != EOF){
		printf("%s\n",a[n]);
	}
	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", nkai(n));
	return 0;
}

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

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

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

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

using namespace std;

long long f(int n)
{
  if (n == 0) return 1;
  return f(n - 1) * n;
}
int main()
{
  int n;
  scanf("%d", &n);
  printf("lld", f(n));
  return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <sstream>
#include <stdio.h>
#include <vector>
#include <stack>
#include <queue>
#include <algorithm>
#include <math.h>
#include <utility>
#include <string>
#include <ctype.h>
#include <cstring>
#include <cstdio>
#include <sstream>
#include <functional>

using namespace std;

#define FOR(i,k,n) for(int i = (k); i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define INF 114514810
#define ll long long
//#define scanf scanf_s

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