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;


unsigned long long F[20] = {1, 1};

unsigned long long DeQuy(int N)
{
	unsigned long long Temp = 0;
	if (F[N])
		Temp = F[N];
	else
		Temp = N * F[N - 1];
	return Temp;
}

int main()
{
	int N = 0;
	while (cin >> N)
		cout << DeQuy(N) << endl;
	return 0;
}

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

int main()
{
	long long n;

	cin >> n;

	for (long long i = n - 1; i > 0; i--)
		n *= i;

	cout << n << endl;

	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
signed main(){
  long long a,b=1;
  cin>>a;
  for(int i=1;i<=a;i++){
    b=b*i;
  }
  cout<<b<<"\n";
}

C++: #include <iostream>

using namespace std;

unsigned long long t[21] = {0, 1, 2, 6, 24, 120,720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800, 87178291200, 1307674368000, 20922789888000, 355687428096000, 6402373705728000, 121645100408832000, 2432902008176640000};
int main(void){
    int n;
    cin >> n;
    cout << t[n] << endl;
    return 0;
}

C++: #include<iostream>

using namesapce std;

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

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

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

C++: #include <iostream>
#include <stdio.h>
using namespace std;
int main(){
    int n;
    double x=1;
    cin >> n;
    for (int i=1;i<=n;i++){
        x*=i ;
    }
    // cout << x << endl;
    printf("%.0f",x);
}

C++: #include <iostream>

using namespace std;

void factorial(int);

int main() {

	int n;

	cin >> n;
	factorial(n);

	return 0;

}

void factorial(int n) {

	int i;
	double x=1;

	for(i=1; i<=n; i++) {
		x*=i;
	}

	cout << x << endl;

}

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

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

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

C++: #include<stdio.h>

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

int main()
{
	int n;
	scanf("%d",&n);
	printf("%d\n",calc(n));
	return 0;
}

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

C++: #include<iostream>

using namespace std;

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

	return 0;
}

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

int main(){
	int n, a = 1;

	cin >> n;

	for ( int i = 0; i < n; ++i ){
		a *= ( i + 1 );
	}

	cout << a << endl;

	return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    long long int t=1 ;
    int loop;
    cin >> loop;
    for(int i=1;i<=loop;i++) {
        t *= i;
    }
    cout << t << endl;
}

C++: #include <algorithm>
#include <deque>
#include <iostream>
#include <functional>

using namespace std;

int main()
{
	int num,i;
	cin >> num;
	long long ret = 1;
	for( i = 1; i <= num; i++ ) {
		ret *= i;
	}

	cout << ret << endl;
	return 0;
}

C++: #include <iostream>

using namespace std;

typedef long long ll;

ll f(ll x){
    if(x == 1) return 1;
    return x*f(x-1);
}

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

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

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

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int  a,b=1,i;
    cin>>a;
           for(i=2;i<=a;i++)
    {       b=i*b;


    }

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

    return 0;

}

C++: #include<stdio.h>

int main(void){
 
   int n,i,ans=1;

   scanf("%d",&n);

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


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

return 0;
}

C++: #include<stdio.h>

using namespace std;


long long int factriolf(long long int n)
{
    long long int f,i;
    f = 1;
    for (i = 1; i<=n;i++)
    {
      f = f *i;
    }
    return f;
}

int main ()
{
    long long int n;
    scanf("%lld",&n);

long long int r = factriolf(n);

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

return 0;
}

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

using namespace std;

int fact(int x);

int main(void) {
	int n;
	while(1) {
		cin >> n;
		if(cin.eof())		break;
		
		cout << fact(n) << endl;
	}
	
	return 0;
}

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

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

C++: #include<iostream>
#include<vector>
#include<iomanip>

using namespace std;

vector<int> bignum(1,1);
const int e9=1000000000;

void fact(int n);
void multi(int num);
void output();

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

void fact(int n)
{
	for(int i=1;i<=n;i++)
	{
		 multi(i);
	}
	output();
}

void multi(int num)
{
	long long temp;
	for(int i=bignum.size()-1;i>=0;i--)
	{
		temp=(long long)(bignum[i])*num;
		bignum[i]=temp%e9;
		if(i==bignum.size()-1&&temp/e9>0)
		{
			bignum.push_back(temp/e9);
			continue;
		}
		bignum[i+1]+=temp/e9;
	}
}

void output()
{
	for(int i=bignum.size()-1;i>=0;i--)
	if(i==bignum.size()-1)
	{
		cout<<bignum[i];
	}
	else//上位を0で詰める
	{
		cout<<setfill('0')<<setw(9)<<right<<bignum[i];
	}
	cout<<endl;
}

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

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

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

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <cstring>
#include <climits>
#include <cmath>
#include <cfloat>

using namespace std;

int num, fac=1;

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

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

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

int main()
{
	
	int num;
	unsigned long long total=1;
	
	cout << "Please enter a number : ";
	cin >> num;
	
	int temp = num;
	int score[num];

	for(int i=0; i<temp; i++)
	{
		score[i]=num;
		--num;
	}
	
	for(int i=0; i<temp; i++)
	{
		total*=score[i];
	}
	
	printf("%llu", total);
	return 0;
}

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

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

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

C++: #define _USE_MATH_DEFINES
#include <iostream>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <queue>
#include <stack>

using namespace std;

int fact(int n)
{
	return n<=1 ? 1 : n*fact(n-1);
}

int main()
{
	int n;
	scanf("%d",&n);
	cout << fact(n) << endl;
}