Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextInt() int {
	scanner.Scan()
	i, e := strconv.Atoi(scanner.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func factorial(n int) int {
	if n == 1 {
		return 1
	}
	return n*factorial(n-1)
}
func main() {
	scanner.Split(bufio.ScanWords)
	n := nextInt()
	fmt.Println(factorial(n))
}

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

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

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

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

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

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

int main(void)
{
 int a,b;
 cin >> a;
 for(i=a;i>0;i--)
 {
   b*=i;
 }
  cout << b;
  return 0;
}

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

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

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

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

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

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

C++: main(){printf("2432902008176640000\n");return;}

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

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

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

C++: #define scanf_s scanf
//#define gets_s gets
#include <stdio.h>
#include <string>
#include <iostream>
#include <math.h>
using namespace std;
#define MAX 81
#define _MAX 100
#define ABC 26
int main(void)
{
	int n, ans = 1;
	scanf_s("%d", &n);
	for (int i = 1; i <= n; ++i) {
		ans *= i;
	}
	printf("%d\n", ans);
}

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

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

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

C++: #include <algorithm>
#include <iostream>
#include <cstdio>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <string.h>
using namespace std;

#define ISEQ(c) (c).begin(), (c).end()
typedef long long ll;

int main() {
  int n;
  scanf("%d", &n);
  ll res = 1LL;
  for (int i = 1; i <= n; i++)
    res *= i;
  printf("%ld\n", res);
}

C++: #include <stdio.h>

int main()
{
	int n, x;

	x = 1;

	scanf("%d", &n);

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

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

	return 0;
}

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

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

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

using namespace std;

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

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

	return 0;
}

C++: #include <iostream>
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("%25.0f",x);
}

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

C++: #include<stdio.h>

int main(void){

	int n, fac;
	
	scanf("%d", &n);
	
	if(n>=1 && n<=20){
		fac = n;
		fac = fac * (n-1);
		n = n-2;
		
		while(n>1){
			fac = fac * n;
			n = n-1;
		}
	
		printf("%d", fac);
	}
	
	return 0;
	
}

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

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<iostream>
using namespace std;

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

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

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

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

C++: #include <iostream>

using namespace std;

int main()
{
	int n;
	long long int a = 1;
	cin >> n;
	for(int i = n; i > 0; i--){
		a *= i;
	}

	cout << a << endl;

	return 0;
}

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

int main(void)
{
    int n;
    unsigned long long ans = 1;

    scanf("%d", &n);
    
    for (int i = n; 0 < i; i--){
        ans *= i;
    }
    printf("%llu\n", ans);
    
}

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

int main(){
    
    int n;
    
        int x = 1;
        cin >> n;
        for(int i = n;i>0;i--){
            x *= i;
        }

        cout << x << endl;
    
    return 0;
    
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstring>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define rp(a) while(a--)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double EPS=1e-10;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
int main(){
	int n;
	int out=1;
	cin>>n;
	rep(i,n)out*=i+1;
	cout<<out<<endl;
}

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

long long f(int n)
{
    if(n==1) return 1;
    if(n==2) return 2;
             
    return n*f(n-1);
        
}
int main()
{
    int n;
    
    
    cin >> n;
    
    f(n);
    cout << f(n) << endl;
    system("pause");
    return 0;
}

C++: #include<stdio.h>
main ()
{
    int i,n;
    float f=1.0;
    scanf("%d",&n);
    for(i=1;i<=n;i++){
        f*=i;
    }
    printf("%0.0f",f);
    return 0;
}

C++: #include<stdio.h>
int main()
{
    int n;
    long long int sum=1;
    scanf("%d",&n);
    for(int i=n;i>=1;i--)
    {
        sum=sum*i;
    }
    printf("%lld\n",sum);
    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;
		}
		x *= n;
		n = n--;
	}
	cout << x<<endl;
	return 0;

}

C++: #include <iostream>

using namespace std;

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

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

C++: #include <iostream>

int main()
{
    long long fact[21] = {};
    fact[0] = 1;
    int a; cin >> a;
    for (int i = 1; i <= a; ++i) fact[i] = i * fact[i - 1];
    cout << fact[a] << endl;
}

C++: #include <iostream>

using namespace std;

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

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

    return 0;
}

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