Go: package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)

	rs := 1
	for i := 1; i <= n; i++ {
		rs *= i
	}
	fmt.Println(rs)
}

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

#define loop(i,a,b) for(int i=a ;i < b ; i++)
#define rep(i,a) loop(i,0,a)
using namespace std;

int main(void){
	int a;
	while(cin>>a){
	
	long long int sum=1;
	loop(i,1,a+1)sum*=i;
	cout<<sum<<endl;
	}
	return 0;
}

C++: #include<iostream>
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;
	return 0;
}

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

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

int main(){

    Int n;

    cin >> n;

    cout << fact(n) << endl;

    return 0;
}

C++: #include<stdio.h>
int main(void)
{
    int i,n,x=1;
    scanf("%d",&n);
    if(n>0)
    {
        for(i=n;i>0;i--)
            x=x*i;
    }
    if(n<0)
    {
        for(i=n;i<0;i++)
            x=x*i;
        if(n%2!=0)
            x=x*-1;
    }
    if(n==0)
    {
        x=x*n;
    }
    printf("%d\n",x);
    return 0;
}

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

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

C++: nclude<iostream>
using namespace std;
int function(int n){
  if(n > 1)
    return n * function(n-1);
  else
    return 1;
}

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

C++: #include <iostream>

using namespace std;

int fact(long long n);

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

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

C++: // 失敗するからこそ そこから立ち向かって行く強さがあってそんな強さが本当の強さだと私は思うから
#ifdef DAIJOBU
#include "/home/v-o_o-v/deb.h"
#define deb(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#include <bits/stdc++.h>
#define deb(x...)
#endif 

using namespace std;

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);

	int n;
	cin >> n;
	long long a[n + 1];
	a[0] = 1;
	for(int i = 1; i <= n; i++)a[i] = a[i - 1] * i;
	cout << a[n] << '\n';
	return 0;
}
// Write Here

C++: #include<iostream>

using namespace std;

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

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

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

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


int factorial_recursive(int n);

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


cin>>n;
if(0<n&&n<21) ;
else return 0;
	result1 = factorial_recursive(n);

	cout<<result1<<endl;

}
int factorial_recursive(int n) {
		if (n > 0) {
        return factorial_recursive(n - 1) * n;
    } else {
        return 1;
    }
}

C++: #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
#define rep2(i,x,n) for(int i=x; i<(n); i++)
#define ALL(n) begin(n),end(n)
#define INF ((1<<30)-1)
#define LINF (1LL<<60)
#define EPS (1e-10)
typedef long long Int;
typedef pair<Int, Int> P;
struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star;
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n; cin>>n;
    Int ans=1;
    for(int i=1; i<=n; i++) ans*=i;
    cout<<ans<<endl;
    return 0;
}

C++: #include<iostream>
#include<math.h>
#include <iomanip>
using namespace std;
int main() {
	int n;
	int x=1;
	cin >> n;
	while (true) {
		if (n == 0) {
			break;
		}
		else 
			x = n*x;
		n = n-1;
	}
	cout << x<<endl;
	return 0;

}

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


int factorial_loop(unsigned int n);

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


cin>>n;

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

	result1 =factorial_loop(n);

	cout<<result1;
	return 0;

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

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

C++: #include <cstdio>
#include <iostream>
#include <math.h>

using namespace std;

int kaizyou(int n,int sum);

int n;
int ans=1;

int main(){
	while(cin >> n){
		kaizyou(n,ans);
		cout << ans << endl;
	}
}

int kaizyou(int n,int sum){
	if(n > 1){
		ans = sum * n;
		kaizyou(n - 1,ans);
	}

}

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

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

int main(void) {
    int num; cin >> num;
    cout << factorial(num) << endl;
    return(0);
}

C++: #include <cstdio>

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

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

C++: //
//  main.cpp
//  kyougi
//
//  Created by 寺林 一旭 on 2018/08/27.
//  Copyright © 2018年 寺林 一旭. All rights reserved.
//

#include <iostream>
#include <vector>
#include <algorithm>
#include <stdio.h>
#include <map>
using namespace std;
int main() {
    
    long num;
    int inputValue;
    vector<int> list;
  
    while(cin >> num) //getline(cin, num))
    {
        long ans=1;
        for( int i = 1; i <= num ; i++)
        {
            ans = ans * i;
        }
        cout << ans << endl;
      //  cout << digit << endl;
   //     cout << a-b <<endl;
    }
  
    
    return 0;
}

C++: #include <stdio.h>

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

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

C++: #include <algorithm>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <cctype>
#include <iostream>
#include <set>
#include <string>
#include <queue>
#include <map>
using namespace std;
int size(string x){
	string::size_type size=x.size();
	return size;
}
#define fu(l,k) for(int i=l;i<k;i++)
#define fd(l,k) for(int i=l;i>k;i--)
#define fi first
#define se second
typedef  vector<string> vs;
typedef  vector<int> vi;
double pi(){
	return M_PI;
}
typedef set<int> set_i;
typedef set<string> set_s;
int main(){
	int n;
	long long int ans=1;
	cin>>n;
	fd(n,0){
		ans*=i;
	}
	cout<<ans<<endl;
}

C++: #include<stdio.h>
#include<iostream>
#include<math.h>
#include<algorithm>
#include<string>
#define pi 3.14159
using namespace std;

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

int main() {
	long long int n;
	cin >> n;
	cout << fact(n);

	

	return 0;
}

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

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

int main()
{
	int n,i,ret=1;
	cin>>n;
	for(i=n;i>=1;i--){
		ret *= i;
	}
	cout<<ret<<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 << endl;
    return 0;
}

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

int main()
{
  int a;
  cin >> a;
  int ans = 1;
  for(int i=a; i>0; i--){
    ans = ans*i;
  }
  cout << ans << endl;

  return 0;
}