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 <fstream.h>
//#include <cstring>
using namespace std;

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

int main() {
  
  int n;

  cin >> n;

  cout << factorial(n) << "\n";

  return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<utility>
#include<string>
#include<cmath>
#include<cstring>
#include<queue>
#include<map>
#include<climits>
#include<set>
#include<tuple>
#include<stack>


using namespace std;
typedef pair<int, int> pii;
typedef long long int ll;
typedef pair<ll, ll> pll;
typedef tuple<int, int, int> tpl;
int dx[4] = { 1,0,0,-1 };
int dy[4] = { 0,1,-1,0 };

#define ARRAY_MAX 200005

const int INF = 1e9 + 7;
const int MOD = 1e9 + 7;

ll cnt[ARRAY_MAX];


int main() {

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

C++: #include <iostream>

unsigned long func(unsigned long n)
{
	if(n==0)
		return 1;
	return n*func(n-1);
}

int main(void)
{
	unsigned long n;
	std::cin >> n;
	std::cout << func(n) << std::endl;
	return 0;
}

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

using namespace std;

long long func(long long n){
	if(n == 1){
		return 1;
	}else{
		return n*func(n-1);
	}
}

int main(){

	long long n;
	scanf("%lld",&n);
	printf("%lld\n",func(n));

    return 0;
}

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


long long int aiu(int n) {
	if (n == 1) { return 1; }
	return n * aiu(n - 1);
}
int main() {
	int n;
	cin >> n;
	cout << aiu(n) << endl;
}

C++: #include <iostream>

using namespace std;

typedef unsigned long long ull;

ull fact (int n) {
    if (n < 2) return 1;
    else return (ull)n * fact(n - 1);
}

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

C++: #include <iostream>

using namespace std;

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

C++: #include <iostream>

int main(void)
{
    int n;
    std::cin >> n;

    long long unsigned int result = 1;
    for ( ; n > 0; n--) {
        result *= n;
    }

    std::cout << result << std::endl;
    return 0;
}

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

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

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

	return 0;
}

C++: #include<iostream>

using namespace std;

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

C++: #include <iostream>

using namespace std;

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

C++: #include <cstdio>
using namespace std;
long long fact(int n){
  if(n==2) return 2;
  return fact(n-1)*n;
}

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

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

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

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

int main(){
  int i,j,k;
  int n1=0;
  long long n2=1;

  cin>>n1;

  for(i=1;i<=n1;i++){
    n2*=i;
  }
  cout<<n2<<endl;

  return 0;
}

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

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

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

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

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

C++: #include <bits/stdc++.h>
using namespace std;
using uint = unsigned int;
using lint = long long int;
using ulint = unsigned long long int;
template<class T = int> using V = vector<T>;
template<class T = int> using VV = V< V<T> >;
template<class T, class U> void assign(V<T>& v, int n, const U& a) { v.assign(n, a); }
template<class T, class... Args> void assign(V<T>& v, int n, const Args&... args) { v.resize(n); for (auto&& e : v) assign(e, args...); }


int main() {
  cin.tie(nullptr); ios_base::sync_with_stdio(false);
  int n; cin >> n;
  lint res = 1;
  for (int i = 1; i <= n; ++i) res *= i;
  cout << res << '\n';
}

C++: #include <iostream>
using namespace std;
int fact(int n){
  return n<=1?1:n*fact(n-1);
}
int main(){
  int n;

  while(cin >> n)
    cout << fact(n) << endl;
  return 0;
}

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

using namespace std;

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

C++: #include<iostream>

long long 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 <stdio.h>
#include <string.h>
#include <iostream>
#include <algorithm>

using namespace std;

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

C++: #include <iostream>

using namespace std;

void Solution()
{
    int n;
    
    cin>>n;
    
    int sum = n;
    
    for(int i = 0; i < n; i++)
    {
        sum = sum * (n - 1);
        n--;
    }
    
    cout << sum << endl;
    
    return;
}

int main()
{
    Solution();
    return 0;
}

C++: #include<stdio.h>
#include <string>
#include <iostream>
using namespace std;


int factorial_loop(int n);

int main(void)
{
  int n;
   int result1;


cin>>n;

if(0<n&&n<21) ;
else return 0;

	result1 =factorial_loop(n);

	cout<<result1;
	return 0;

}
int factorial_loop(int n) {
    int result = 1;
    int k;

    for(k = 1; k <= n; k++) {
        result *= k;
    }
    return result;
}

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

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

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

int main() {
	int n,ans=1;
	cin >> n;
	if (n <= 20 && n >= 0) {
		for (int a = 1; a <= n; a++) {
			ans = ans*a;
		}
		cout << ans << endl;
	}
}

C++: #include<iostream>

long int fac(int x) {
	if (x == 1) return 1;
	return x * fac(x - 1);
}

int main() {
	long int input;
	while (std::cin >> input) {
		std::cout << fac(input) << std::endl;
	}
	return 0;
}

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

C++: #include <iostream>

using namespace std;

int main() {
    int answer = 1;
    int n;
    cin >> n;

    for (int i = n; i != 0; i--) {
            answer *= i;
    }
cout << answer;
return 0;
}

C++: #include<cstdio>

int main(){
    int x;
    scanf("%d", &x);

    for(int i = x - 1; i > 1; i--) x*=i;
    printf("%d\n", x);
    return 0;
}