Go: package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)

	rs := 1
	for i := 1; i <= n; i++ {
		rs *= i
	}
	fmt.Println(rs)
}

C++: #include <bits/stdc++.h>
#include <numeric>
#define REP(i, s, n) for (int i = s; i < n; ++i)
#define rep(i, n) REP(i, 0, n)
#define SORT(c) sort((c).begin(), (c).end())
#define SORT_INV(c) sort((c).begin(), (c).end(), greater<int>())

#define IINF INT_MAX
#define LLINF LLONG_MAX
#define DEBUG false
#define LL long long
#define Dev 1000000007

// sort(a.begin(), a.end(), std::greater<int>());
using namespace std;

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

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

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

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

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

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

class BigInt {
    static const int base = 10;
    public:
    deque<int> digits;
    BigInt() {
    }
    BigInt(int n) {
        for (;n; n /= base)
            digits.push_back(n % base);
    }
    BigInt operator +(const BigInt x) const {
        BigInt res;

        // add
        auto di = digits.begin(), xi = x.digits.begin(), end = digits.end();
        for (; di != end && xi != x.digits.end(); di++, xi++)
            res.digits.push_back(*di + *xi);

        // set rest
        if (di == end) {
            di = xi;
            end = x.digits.end();
        }
        for (; di != end; di++)
            res.digits.push_back(*di);

        res.normalize();

        return res;
    }
    void operator *=(const int x) {
        for (auto &a : digits)
            a *= x;
        normalize();
    }
    void normalize() {
        int carry = 0;
        for (int i = 0; i < size(); i++) {
            digits[i] += carry;
            carry = digits[i] / base;
            digits[i] %= base;
        }
        if (carry)
            digits.push_back(carry);
    }
    int size() const {
        return digits.size();
    }
    istream &read(istream &is) {
        digits.clear();
        cin.ignore();

        int s;
        while (s = cin.get(), isdigit(s))
            digits.push_front(s - '0');
        is.putback(s);

        return is;
    }
    ostream &write(ostream &os) const {
        for (auto di = digits.rbegin(); di != digits.rend(); di++)
            os << *di;
        return os;
    }
};

istream &operator>>(istream &is, BigInt &b) { return b.read(is); }
ostream &operator<<(ostream &os, const BigInt &b) { return b.write(os); }

int main()
{
    int n;
    BigInt factorial(1);
    cin >> n;

    for (; n; n--)
        factorial *= n;

    cout << factorial << endl;

    return 0;
}

C++: #include <cmath>
#include <iostream>
#include <string>
#include <cstdlib>
#include <cstdio>
#include <algorithm>
#include <sstream>

using namespace std;

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

C++: #include<iostream>

__int64 fact( int n )
{
	if( n == 1 ) return 1;
	else return n * fact( n - 1 );
}

int main()
{
	int x;
	std::cin >> x;
	std::cout << fact( x ) << std::endl;

 	return 0;
}

C++: #include <iostream>
using namespace std;
int main()
{
    int n,sum=1;
    cin>>n;
    for(int a=1;a<=n;a++)
    {

       sum=sum*a;
    }
    cout<<sum<<endl;
    return 0;
}

C++: #include<iostream>
#include<queue>
#include<string>
#include<stack>
#include<cstdio>
#include<algorithm>

using namespace std;

int main(void)
{
  int i;
  int n;
  int sum=1;

  cin>>n;

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

  cout<<sum<<endl;

}

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

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

C++: #include <iostream>

/**
* @brief ある整数の階乗を求める
*/
class Factorial
{
public:
    /**
    * @fn int getFactorial(int target)
    * @brief パラメータの階乗を取得する
    * @param[in] target ターゲット
    * @return int 階乗
    */
    int getFactorial(int target) const;

private:
    /**
    * @fn int calc(int target)
    * @brief 階乗を計算する
    * @param[in] target ターゲット
    * @return int 階乗
    */
    int calc(int target) const;
};

/**
* @brief コントロール
*/
class Control
{
public:
    /**
    * @fn  bool executeEx() const
    * @brief １つの整数を読み込み、その整数の階乗を出力する
    * @return bool 入力範囲内ならtrueを、そうでなければfalseを返す
    */
    bool executeEx() const;

private:
    /**
    * @fn bool check(int target) const
    * @brief 入力範囲をチェックする
    * @param[in] target チェック対象
    * @return bool 入力範囲内ならtrueを、そうでなければfalseを返す
    */
    bool check(int target) const;

    /**
    * @fn void read(int& data)
    * @brief 標準入力から読み込む
    * @param[out] data 入力整数
    */
    void read(int& data) const;

    /**
    * @fn void write(int target) const
    * @brief 標準出力に書き込む
    * @param[in] target 出力対象
    */
    void write(int target) const;
};

int Factorial::getFactorial(int target) const
{
    return calc(target);
}

int Factorial::calc(int target) const
{
    if (1 >= target)
        return 1;

    return target * calc(target - 1);
}

bool Control::executeEx() const
{
    int input = 0, output = 0;

    read(input);

    if (!check(input))
        return false;

    output = Factorial().getFactorial(input);

    write(output);

    return true;;
}

bool Control::check(int target) const
{
    static const int Min = 1;
    static const int Max = 20;

    if (Min > target || Max < target)
        return false;

    return true;
}

void Control::read(int& data) const
{
    std::cin >> data;
}

void Control::write(int target) const
{
    std::cout << target << std::endl;
}

/**
* @fn int main()
* @brief エントリポイント
*/
int main()
{
    if (!Control().executeEx())
        return 1;
}

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

C++: #include <bits/stdc++.h>
#define r(i,n) for(int i;i<n;i++)
using namespace std;
int main(){
int a,s=1;
cin>>a;
r(i,a+1)if(i)s*=i;
cout<<s<<endl;
}

C++: #include<iostream>
using namespace std;
int main()
{
	long long a[21],b;
	a[0]=1;
	for(int i=1;i<=20;i++)a[i]=a[i-1]*i;
	cin>>b;
	cout<<a[b]<<endl;
	return 0;
}

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

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

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

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

int main()
{
    int array[20] = {};
    array[0] = 1;
    int n;
    cin >> n;
    for(int i=2; i<=n; i++)
    {
        int carry = 0;
        for(int j=0; j<20; j++)
        {
            /* Multiply by the number and add carry from lower digit */
            array[j] = array[j] * i + carry;
            
            /* Calculate the carry */
            carry = array[j] / 10;
            
            /* Store the quotient to the array*/
            array[j] = array[j] % 10;
        }

    }
    /* Search the maximum digit*/
    int max_digit = 0;
    for(int i=19; i>=0; i--)
    {
        if(array[i])
        {
            max_digit = i;
            break;
        }
    }

    for(int i=max_digit; i>=0; i--)
    {
        cout << array[i];
    }

    cout << endl;
    return 0;
}

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