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<iostream>
#include<vector>
#include<algorithm>
#include<map>
#include<string>
#include<cmath>
#include<numeric>
using namespace std;


int main(void) {

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

C++: #include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
using namespace std;
#define f(i,n) for(i=1; i<=n;i++)
int main(){
    int s=1,n,i,a,b,k;
    char c;
    scanf("%d", &n);
    f(i,n)
        s=s*i;                   
    printf("%d", s);
    cout<<endl;
    return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES

#include "bits/stdc++.h"
#define REP(i,a,b) for(int i=a;i<b;++i)
#define rep(i,n) REP(i,0,n)
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define ALL(a) begin(a),end(a)
#define ifnot(a) if(not (a))
#define dump(x)  cerr << #x << " = " << (x) << endl
using namespace std;

// #define int ll
#ifdef _MSC_VER
const bool test = true;
#else 
const bool test = false;
#endif

int dx[] = { 0,1,0,-1 };
int dy[] = { 1,0,-1,0 };
#define INF (1 << 28)
ull mod = (int)1e9 + 7;
//.....................
const int MAX = (int)2e5 + 5;

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

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

C++: #include <iostream>

int main()
{
    int n;
    std::cin >> n;
    int s = 1;
    for(std::size_t i = 2; i <= n; ++i){
        s *= i;
    }
    std::cout << s << std::endl;
    return 0;
}

C++: #include <bits/stdc++.h>
#include <vector>
using namespace std;
long long f(long long a){
	if(a == 0 || a == 1)
		return 1;
	else
		return a * f(a-1);
}
long long n;
int main(){
	cin >> n;
	cout << f(n) << "\n";
	
	return 0;
}

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

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

	int64_t a = 1;
	int x = n;
	for (int i = 0; i < n; i++) {
		a *= x;
		x--;
		//cout << i << endl;
	}

	cout << a << endl;
}

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

using namespace std;

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

	uint64_t f = 1;
	for (int i = 1; i <= n; ++i)
		f *= i;

	cout << f << endl;

	return 0;
}

C++: #include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

long long factorial(int a) // ツ階ツ湘ヲ
{
    long long ret = 1;
    while(a > 0)
        ret *= a--;
    return ret;
}

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

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

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

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

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

#define rep(x,to) for(int x=0;x<to;x++)
#define rep2(x,from,to) for(x=from;x<to;x++)

using namespace std;


int main(void){

unsigned long long su=1;;
int isu;
	
	cin >> isu;
	rep(i,isu)
		su *= isu - i;
	cout << su << endl;
	return 0;
}

C++: #include<stdio.h>
int ke(int x)
{
    if(x == 1)return 1;
    else return x*ke(x-1);
}
int main()
{
    int a;
    cin >> a;
    printf("%d",ke(a));
    return 0;
}

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

int main()
{
    int n,m;
    
    cin>>n;if(n==0)n=1;m=n-1;
    while(m>0)
        n*=m--;
    cout<<n<<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 <iostream>

using namespace std;

int main(){
    
    int num,fact=1;

    cout<<" Enter Number:  ";

    cin>>num;

if (num <=20){

          for(int a=1;a<=num;a++){
                  fact = fact * a;
                                  }

    cout<<fact<<endl;
    }
else
    cout<<"none";
   return 0;
   
}

C++: #include <iostream>
using namespace std;
 
// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0019

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

C++: #include <stdio.h>

int main(){
	int n;
	int i;
	long long ans=1;

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

	return 0;

}

C++: #include <iostream>

using namespace std;

typedef long long LL;

LL fact(int);

int main() {
    int n;
    cin >> n;
    cout << fact(n) << "\n";
    return 0;
}

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

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
   long long n,rslt;
   rslt=1;
   cin>>n;
   for(i=1;i<=n;i++)
         rslt*=i;
    cout<<rslt<<endl;
    return 0;
}

C++: // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vc = vector<char>;
using vb = vector<bool>;
using vs = vector<string>;
using vpii = vector<pii>;
using vvi = vector<vi>;
using vvb = vector<vb>;
using vvpii = vector<vpii>;
template<typename A> using fn = function<A>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = acos(-1);
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int &n) { return n & 1; }
constexpr bool even(const int &n) { return !odd(n); }
template<typename V> constexpr typename V::value_type sum(const V &v) { return accumulate(all(v), 0); }
void solve();
main { solve(); return 0; }
// clang-format on

int factorial(int n) {
  return n == 0 ? 1 : n * factorial(n - 1);
}

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