Go: package main

import (
    "os"
    "fmt"
    "bufio"
    "strconv"
)

var sc = bufio.NewScanner(os.Stdin)
func readInt() int64 {
    sc.Scan()
    n, _ := strconv.Atoi(sc.Text())
    return int64(n)
}


func main() {
    var ans int64 = 1
    var n int64 = readInt()
    var i int64
    for i = 1; i <= n; i++ {
        ans *= i
    }
    fmt.Println(ans)
}

C++: #include <cstdio>

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

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

C++: #include "bits/stdc++.h"
using namespace std;

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

C++: #include <iostream>
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++: //NoorBaizura bt Mohd Zin
// 1111168

#include <iostream>

using namespace std;

int main()
{
    long long x;
    int count=1;
    
    cin >> x;
    
    for (int i=1; i<=x; i++)
        count *= i;
        
    cout << count;
    
//    system ("pause");
    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 factorial_loop(int n);

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


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

	cout<<result1<<endl;

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

/**
 * 階乗を計算する(ループ)
 * @param[in] n 整数 
 * @return 階乗
 */
int factorial_loop(int n) {
    int result = 1;
    int k;

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

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

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

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <cassert>

using namespace std;


#define all(c) ((c).begin()), ((c).end())
#define debug(c) cerr << "> " << #c << " = " << (c) << endl;
#define iter(c) __typeof((c).begin())
#define present(c, e) ((c).find((e)) != (c).end())
#define cpresent(c, e) (find(all(c), (e)) != (c).end())
#define tr(i, c) for (iter(c) i = (c).begin(); i != (c).end(); i++)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, a, b) for (int i = (int)(a); i <= (int)(b); i++)

#define mp make_pair
#define fst first
#define snd second
#define pb push_back


const double EPS = 1e-10;


typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef complex<double> P;

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

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

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

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

	return 0;
}

C++: import scala.io.StdIn._
object Main extends App { println((1 to readInt()).map(_.toLong).product) }

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

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

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

C++: #include<iostream>

using namespace std;

int fac(int n)
{
    int res = 1;
    for(int i = n; i > 0; --i)
        res = res * i;
    return res;
}

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

    cout << fac(n) << endl;

    return 0;
}

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

unsigned long long fac(unsigned long long n)
{
    return n == 1 ? 1 : n * fac(n-1);
}

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

C++: #include<stdio.h>

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

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

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <cmath>
#include <algorithm>
#include <string>
#define shosu(x) fixed<<setprecision(x)
using namespace std;
typedef pair<int,int> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,P> pip;
typedef long long ll;
const int inf=(1<<31)-1;
const double pi=acos(-1);

int n,ans=1;

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

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

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

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

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

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

long long sum(int n){
    if(n==1) return 1;
    if(n==2) return 2;

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

C++: #include<stdio.h>
int main()

{
    int a, i;
    scanf("%d", &a);
    int fac = a;
    for(i=a-1; i>1; i--)
    {
        fac=fac*i;
    }
    printf("%d", fac);
    return 0;
}

C++: #include <cstdio>
#include <cstring>
#include <string>
#include <cmath>
#include <cassert>
#include <iostream>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <bitset>
#include <functional>
#include <sstream>
#include <utility>
#include <cstdlib>
#include <cctype>
#include <climits>
#include <fstream>

using namespace std;
typedef long long ll;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) for(int i=0;i<(n);++i)
#define foreach(itr,c) for(__typeof(c.begin()) itr=c.begin(); itr!=c.end(); itr++)
#define dbg(x) cout << #x"="<< (x) << endl
#define mp(a,b) make_pair((a),(b))
#define pb(a) push_back(a) 
#define in(x) cin >> x;
#define all(x) (x).begin(), (x).end()
#define INF 2147483600
#define fi first
#define se second
using namespace std;

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

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

C++: #include<string>
#include <stdio.h>
#include <math.h>
#include <cctype>
#include<queue>
#include<stack>
#include<cstdio>
using namespace std;
int main(){
	long long int ans;
	int n;
	cin>>n;
	ans=1;
	for(int i=1;i<=n;i++){
		ans*=i;
	}
	cout<<ans<<endl;
	return 0;
}

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

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

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

std::uint32_t factorial(std::uint32_t n)
{
	if (n == 0) {
		return 1;
	}
	return n * factorial(n - 1);
}

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

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

int main(){
int cnt ,i,kaeru;
double num;
char total[10];
gets(total);
kaeru= atoi(total);
num = 1;
for( i = kaeru ; i >= 1 ; i-- ){
num *= i;
}
printf("%f",num);

 return 0;
}