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

__int64 fact(int num);
int input_int();

int main()
{
	cout << fact(input_int()) << endl;
	return (0);
}

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

int input_int(void)
{
	int in;
	cin >> in;
	return (in);
}

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

using namespace std;

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

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

C++: #include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;
// int is too small for this calcuration
// so i used long.
// have a nice hhk!!

int main()
{
    unsigned long n;
    unsigned long ans = 1;
    cin >> n;
    for(int c = n; c > 1; c--)
    {
        ans *=c;
    }
    cout << ans << endl;
    return EXIT_SUCCESS;
}

C++: #include <stdio.h>

int main()
{
	int n;
	long x;

	x = 1;

	scanf("%d", &n);

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

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

	return 0;
}

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

using namespace std;

unsigned long long fac(int n) {
	if (n == 1 || n == 0) return 1;
	return fac(n - 1) * n;
}

int main() {
	int n;
	while (~scanf("%d", &n)) {
		printf ("%llu\n", fac(n));
	}
	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;
}

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

using namespace std;

int main()
{

  int n,i,temp;
  cin >> n;
  temp = n;
  
  for(i=1;i<temp;i++){
    n = n * (temp-i);
  }
  
  cout <<n<<endl;

  return 0;
}

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

int main(){
  int n;
  cin>>n;
  long long c=1;
  if(n==0)c=0;
  else
    for(int i=n;i>0;i--)
      c*=i;
  cout<<c<<endl;
  return 0;
}

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

int main(){
  int n,i;
long long asn;

  while(cin >> n){

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

  }
 
    cout << ans << endl;
  }

}

C++: #include<stdio.h>

int n;
long long output=1;

int main(){
	scanf("%d",&n);
	for(int i=n;i>=1;i--){
		output*=i;
	}
	printf("%lld",output);
	return 0;
}

C++: #include <iostream>

#define ll long long 

using namespace std;

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

int main() {
    int num;
    
    cin >> num;
    
    if(0 <= num && num <= 20) {
        cout << fact((ll)num) << endl;
    }
    
    return 0;
}

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

using namespace std;

typedef long long ll;


int kaizyou(int n,ll sum);

int n;
ll ans=1;

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

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

}

C++: #include <iostream>

using namespace std;
int fact(int n) {
  if (n < 1 || n > 20) return 0;
  if (n == 1) return 1;
  else return fact(n - 1) * n;
}

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

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

C++: 
#include <iostream>
using namespace std;
int main(){
    int n,i,ans[20];
    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<iostream>	
 
int main()	
{
	using namespace std;	
 
	int num,factorial=1;
	cout<<"Enter the number: ";  
	cin>>num;
 
	for(int i=1;i<=num;i++)
	{
		factorial=factorial*i;
	}
 
	cout<<<<factorial<<endl;
 
	cin.get();
 
	return 0;
}

C++: #include<iostream>

using namespace std;

int fac(int n)
{
    int res = 1;
    if(n > 0)
        for(int i = n; i > 0; --i)
            res = res * i;
    else if(n < 0)
        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 <bits/stdc++.h>
using namespace std;

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

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<<endl;
  return 0;
}

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

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

int main()
{
	int n;
	const int max = 100;
	int num[max];
	int a[max];
	cin >> n;
	for(int i = 1; i < max; i++){
		num[i] = 0; a[i] = 0;
	}
	num[1] = 1;
	a[1] = 1;
	for(int i = 1; i <= n; i++){
		int digit = max - 1;
		for(;num[digit] == 0;digit--);
		for(int j = digit; j >= 1; j--){
			num[j + 2] += (a[j] * i) / 100;
			num[j + 1] += ((a[j] * i) % 100) / 10;
			num[j] = ((a[j] * i) % 100) % 10;
		}
		for(int m = 1; m <= digit + 2; m++)
			a[m] = num[m];
	}
	int digit = max - 1;
	for(;num[digit] == 0;digit--);
	for(int k = digit; digit >= 1; digit--)
		cout << num[digit];
	cout << endl;
	return 0;
}

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

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

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

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

C++: #include <stdio.h>

typedef long long LL;

LL a[21];

void init(){
	a[1] = 1;
	for (int i=2; i<=20; ++i){
		a[i] = a[i-1]*i;
	}
}

void solve(LL n){
	printf("%lld\n", a[n]);
}

int main (){
	__int64 n;
	init();
	while (~scanf("%lld", &n)){
		solve(n);
	}
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int serch(int n)
{
    if(n==1)return n;
    return n*serch(n-1);
}
int main()
{
    int n;
    cin>>n;
    n=serch(n);
    cout<<n<<endl;
}

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

C++: #include<iostream>
#include<vector>
using namespace std;
long long int kai(long long int n){
    if(n <=0)return 1;
    return n*kai(n-1);

}

int main(void){
   long long int n;
   cin>>n;
   cout<< kai(n)<<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("%25.0f",x);
}

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

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

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

  cout<< factorial(n)>>endl;
}

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

unsigned int factorial(int x) {

  if(x != 1)
    return x * factorial(x-1);
  else if(x == 1)
    return 1;
}

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

C++: #include<stdio.h>
int main(void)
{
	int n,cnt,num;
	
	while(scanf("%d",&n)!=EOF) {
		for(cnt=1;cnt<=20;cnt++){
			num=1;
			for(n=cnt;n>=1;n--){
				num*=n;
			}
			printf("%d\n",num);
		}
	}
		return 0;
}

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