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;

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

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

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

int main(){

  int n;

  cin>>n;
  cout<<f(n)<<endl;

  return 0;
}

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

C++: #include <bits/stdc++.h>
using namespace std;
/*{{{*/  //template
#define rep(i,n) for(int i=0;i<n;i++)
constexpr int INF = numeric_limits<int>::max()/2;
constexpr long long LINF = numeric_limits<long long>::max()/3;
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define all(v) (v).begin(),(v).end()
#define sz(x) (int)(x).size()
#define debug(x) cerr<<#x<<":"<<x<<endl
#define debug2(x,y) cerr<<#x<<","<<#y":"<<x<<","<<y<<endl
//struct fin{ fin(){ cin.tie(0); ios::sync_with_stdio(false); } } fin_;
struct Double{ double d; explicit Double(double x) : d(x){} };
ostream& operator<<(ostream& os,const Double x){ os << fixed << setprecision(20) << x.d; return os; }
template<typename T> ostream& operator<<(ostream& os,const vector<T>& vec){ os << "["; for(const auto& v : vec){ os << v << ","; } os << "]"; return os; }
template<typename T,typename U> ostream& operator<<(ostream& os,const pair<T,U>& p){ os << "(" << p.first << ","<< p.second <<")"; return os; }
template<typename T> ostream& operator<<(ostream& os,const set<T>& st){ os<<"{"; for(T v:st) os<<v<<","; os <<"}"; return os; }
template<typename T,typename U> inline void chmax(T &x,U y){ if(y>x) x = y; }
template<typename T,typename U> inline void chmin(T &x,U y){ if(y<x) x = y; }
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
ll gcd(ll a,ll b){ if(b==0) return a; else return gcd(b,a%b); }
//constexpr double eps = 1e-14; 
constexpr double eps = 1e-10; 
constexpr ll mod = 1e9+7;
const int dx[]={1,0,-1,0} ,dy[] = {0,1,0,-1};
/*}}}*/

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

C++: import java.util.Scanner;

public class main {
       public static void main(String[] args) {
              Scanner scn = new Scanner(System.in);
              int n = scn.nextInt();
              long x = 1;
              for (int i = 2; i <= n; i++) {
                       x = x * i;
		}
		System.out.println(x);
	}
}

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

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

C++: #include <iostream>

using namespace std;

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

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

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

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

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

	cout << factorial(n) << endl;

	return 0;
}

C++: #include <iostream>
using namespace std;
factorial(int n){
  return ((--n) ? factorial(n):1);
}
int main(void){
  int n; cin >> n;
  cout << factorial(n) << endl;
  return 0;
}

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

#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for (int i = x; i < n; i++)
#define OP(m) cout << m << endl;
typedef long long ll;
typedef unsigned long long ull;

int main()
{
    ull sum = 1;
    int n;
    cin >> n;
    for (int i = 1; i <= n; i++)
    {
        sum *= i;
    }
    OP(sum)
    return 0;
}

C++: #include <iostream>
#include <cstdlib>
#include <windows.h>
using namespace std;

int main()
{
    long long n;
    
    do
    {
    cout<< "Enter value : " ;
    cin >> n;
    
    }while(n>20);
    
    int x;
    long long sum=1;
    for(x=1; x<=n; x++)
    {
       sum = sum*x;
    }
    
    cout<< sum << endl;
    
    return 0;
}

C++: #include <iostream>

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) << endl;
}

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

int main(){
	
	int a,b,c,d;
	
	cin >> a;
	
	for(b=1; b<=a; b++){
		c = 1;
		for(d=b; d>=1; d--){
			c *= d;
		}
	}
	
	cout << c << endl;
	
	return 0;
}

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

C++: #include <stdio.h>

long long unsigned int factorial(int n)
{
  return n>1 ? n*factorial(n-1) : 1;
}

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

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

  return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main(){
	int n,k=1;
	cin>>n;
	for(int i=1;i<=n;i++){
		k*=i;
	}
	cout<<k<<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++: //14
#include<iostream>

using namespace std;

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

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

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

C++: #include<stdio.h>
#include<algorithm>
using namespace std;
int main(){
	
	int n;
	scanf("%d",&n);
	unsigned long long int ans=1;
	for(;n>0;n--){
		ans=ans*n;
	}
	printf("%lld\n",ans);
	return 0;
}

C++: #include<stdio.h>
#include<iostream>
using namespace std;
int ke(long long int x)
{
    if(x == 1)return 1;
    else return x*ke(x-1);
}
int main()
{
    long long int a,b;
    cin >> a;
    cin >> b;
    b = ke(a);
    printf("%lld\n",b);
    return 0;
}

C++: import java.util.Scanner;
 
public class main {
	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		long x = 1;
		for (int i = 2; i <= n; i++) {
			x = x * i;
		}
		System.out.println(x);
	}
}

C++: #include<iostream> 

using namespace std;

int func(int x) {
	return x <= 1 ? 1 : x * func(x - 1);
}

int main() {
	int n;

	cin >> n;

	cout << func(n);

	return 0;
}