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>
using namespace std;
 
long long ans=1;
 
long long factorial(int n){   // 再起関数
  if(n==1){
    return ans;
  }else{
    ans = n*factorial(n-1);
  }
}
 
int main(){
  int n;
  cin >> n;
 
  if(n<0){
    cout << "計算できません。" << endl;
  }else if(n==0 || n==1){
    cout << 1 << endl;
  }else{
    cout << factorial(n) << endl; // 再起
  } 
  return 0;
}

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

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

C++: #include<iostream>
#include<cstring>
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>

using namespace std;

//Nayeem Shahriar Joy,Applied Physics And Electronic Engineering,University of Rajshahi.

int main(void)

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

C++: #include<iostream>

using namespace std;

int f(int n) {
    if (n==1) return 1;
    if (n==2) return 2;

    return n*f(n-1);
}

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

C++: #include <stdio.h>

int main()
{
  int n;
  int result;

  scanf("%d", &n);

  result = 1;

  while(n>0)
    result *= (n--);

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

  return 0;
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <cassert>

using namespace std;


#define all(c) ((c).begin()), ((c).end())
#define debug(c) cerr << "> " << #c << " = " << (c) << endl;
#define iter(c) __typeof((c).begin())
#define present(c, e) ((c).find((e)) != (c).end())
#define cpresent(c, e) (find(all(c), (e)) != (c).end())
#define tr(i, c) for (iter(c) i = (c).begin(); i != (c).end(); i++)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, a, b) for (int i = (int)(a); i <= (int)(b); i++)

#define mp make_pair
#define fst first
#define snd second
#define pb push_back


const double EPS = 1e-10;


typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef complex<double> P;

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

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

C++: #include <iostream>
#include<string>
#include<cmath>
#include<algorithm>
#include<cctype>
#include<queue>
#include<stack>
#include<stdio.h>
#include<vector>
#include<set>
#include<map>
#include<iomanip>
#define rep(i,n) for(int i=0;i<n;i++)
typedef int long long ll;

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 <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(){
    long long s=1,n,i,a,b,k;
    char c;
    scanf("%lld", &n);
    f(i,n)
        s=s*i;                   
    printf("%lld", s);
    cout<<endl;
    return 0;
}

C++: #include<iostream>

using namespace std;

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

int main(){
  long long  n=0;
  cin>>n;

  long long int ans=1;
  ans=factorial(n);

  cout<<ans;
}

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++: //#define scanf_s scanf
//#define gets_s gets
#include <stdio.h>
#include <string>
#include <iostream>
#include <math.h>
using namespace std;
#define MAX 81
#define _MAX 100
#define ABC 26
int main(void)
{
	int n, ans = 1;
	scanf_s("%d", &n);
	for (int i = 1; i <= n; ++i) {
		ans *= i;
	}
	printf("%d\n", ans);
}

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

int main(void)
{
	int N;
	long long accum = 1;

	cin >> N;

	while(N > 0){
		accum *= N;
		N--;
	}
	cout << accum << endl;


	return 0;
}

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

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

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

C++: #include <iostream>
#include <cstdint>
 
int main()
{
    std::uint32_t n;
    std::cin >> n;
    std::uint64_t factorial = 1;
    while (n > 0) {
        factorial *= n--;
    }
    std::cout << factorial << std::endl;
    return 0;
}

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

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

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,s,n) for(int i=(s);i<=(n);i++)
#define repr(i,n) for(int i=n-1;i>=0;i--)
#define REPR(i,s,n) for(int i=(s);i>=(n);i--)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define Eunique(v) v.erase(unique(all(v)),v.end())
#define Eback(s) s.erase(s.end()-1,s.end())
#define rev(v) reverse(all(v))
#define minvec(v) *min_element(all(v))
#define maxvec(v) *max_element(all(v))
#define sumvec(v) accumulate(all(v),0LL)
#define mapmin(v) v.rbegin()->first
#define mapmax(v) v.begin()->first
#define pb push_back
#define pf push_front
#define m_p make_pair
#define DOUBLE fixed << setprecision(15)
#define OK cerr<<"OK\n"
#define OK1 cerr<<"OK1\n"
#define OK2 cerr<<"OK2\n"
#define SIZE(s) (int)s.size()
#define INF ((1LL<<62)-(1LL<<31))
#define zero(x,n) setw(x) << setfill('0') << n
#define endl '\n'

typedef long long ll;

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<long long> vll;
typedef vector<vll> vvll;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<char> vc;
typedef vector<vc> vvc;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef vector<string> vs;

typedef pair<ll,ll> pll;
typedef pair<int,int> pii;
typedef vector<pair<int,int>> vpii;
typedef vector<pair<ll,ll>> vpll;

const double pi = acos(-1.0);
const ll mod=1000000007;
const ll mod2=998244353;

template<class A, class B>
ostream& operator<<(ostream& ost, const pair<A, B>&p) {
	ost << "{" << p.first << ", " << p.second << "} ";
	return ost;
}

template<class T>
ostream& operator<<(ostream& ost, const vector<T>&v) {
	ost << "{";
	for (int i = 0; i<(int)v.size(); i++) {
		if (i)ost << " ";
		ost << v[i];
	}
	ost << "} \n";
	return ost;
}

template<class A, class B>
ostream& operator<<(ostream& ost, const map<A, B>&v) {
	ost << "{";
	for (auto p:v) {
		ost << "{" << p.first << ", " << p.second << "} ";
	}
	ost << "} ";
	return ost;
}

template<class T>
inline bool chmax(T& a, T b){if(a<b){a=b;return true;} return false;}

template<class T>
inline bool chmin(T& a, T b){if(a>b){a=b;return true;} return false;}

void YES(bool b) {cout << ((b)?"YES\n":"NO\n");}
void Yes(bool b) {cout << ((b)?"Yes\n":"No\n");}
void yes(bool b) {cout << ((b)?"yes\n":"no\n");}
void Yay(bool b) {cout << ((b)?"Yay!\n":":(\n");}

ll powmod(ll a,ll b){ll c=1; while(b>0){ if(b&1){ c=a*c%mod; } a=a*a%mod; b>>=1; } return c;}
ll nCrmod(ll n,ll r){ll x=1,y=1; rep(i,r){x=x*(n-i)%mod; y=y*(i+1)%mod;} return x*powmod(y,mod-2)%mod;}
ll gcd(ll x, ll y) {return __gcd(x,y);}
ll lcm(ll x, ll y) {return x/__gcd(x,y)*y;}

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