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 <stdio.h>

int main(void) {                                                                                                                                                                                  
        int n = 0;                                                                                                                                                                                
        scanf("%d", &n);                                                                                                                                                                          
        long ret = 1;                                                                                                                                                                             
        for (; n > 0; n--) {                                                                                                                                                                      
                ret *= n;                                                                                                                                                                         
        }                                                                                                                                                                                         
        printf("%ld\n", ret);                                                                                                                                                                     
                                                                                                                                                                                                  
        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 <bits/stdc++.h>
using namespace std;
int main ()
{
    long long int n,i,fact=1;
    cin>>n;
    while (n!=0)
    {
        fact*=n;
        n--;
    }
    cout<<fact<<endl;
}

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

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

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

using namespace std;

int factorial(int n) {

	return (n > 0 ? n*factorial(n - 1) : 1);

}

int main() {
	int n;
	scanf_s("%d", &n);
	
	printf("%d \n", factorial(n));

	return 0;
}

C++: #include<cstdio>
int f(int n){return n==0?1:n*f(n-1);}
int main(){
  int n;scanf("%d",&n);printf("%d\n",f(n));
}

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

int main(){
	int n, ans = 1;
	cin >> n;

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

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

ull fact(int n){return n>1?n*fact(n-1):1;}
int main(){
	int n;
	cin>>n;
	cout<<fact(n)<<endl;
}

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

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <utility>
#include <iomanip>
#include <functional>
#include <queue>
#include <stack>
#include <cmath>
#define INF 100000000
#define MOD 1000000007
using namespace std;


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

C++: #include <iostream>

using namespace std;

int fact(long n);

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

int fact(long n)
{
	if (n > 1){
		return (n * fact(n - 1));
	}
	else {
		return (n);
	}
}

C++: #include <cstdio>
#include <cstdlib>
#include <algorithm>

using namespace std;

int a;
long long int hasil; 

int main()
{
	
	hasil=1; 
	scanf("%lld",&a);
	for(int loop=a;loop>=1;loop--)
	{
		hasil=hasil*loop;
	}
	printf("%lld",hasil);
	return 0; 
}

C++: #include <bits/stdc++.h>

using namespace std;

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

C++: #include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin >> n;
    cout << tgamma(n + 1) << endl;
    return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
    int i, j, n;
    
    cout<<"Permutation using factorial \n"<<endl;
    
    cout<<"Enter a number: ";
    cin>>n;
    
    for(i=1;i<=n;i++)
                     for(j=1;j<=n;j++)
                                        i=i*j;
                                        
    cout<<endl;
    cout<<n<<" factorial is "<<i-1<<endl;
    cout<<endl;
    
    system("pause");
    return 0;
}

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

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

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

C++: #include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)

int fact(int n);

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

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

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