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

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;
	int sum=1;
	cin>>a;
	
	loop(i,1,a+1)sum*=i;
	cout<<sum<<endl;
	
	return 0;
}

C++: #include <iostream>

using namespace std;

int main() {
    long long answer = 1`;
    int n;
    cin >> n;

    for (int i = n; i != 0; i--) {
            answer *= i;
    }
cout << answer;
return 0;
}

C++: #include<stdio.h>

int main()
{
	int n,x,kaizyo=1;
	scanf("%d",&n);

	if(n==1)
	{
		kaizyo=1;
		printf("%d\n",kaizyo);
	}
	else if(n<=20)
	{
		for(x=1;x<=n;x++)
		{
			kaizyo*=x;
		}
		printf("%d\n",kaizyo);
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

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

        cin >> n;
        for (unsigned long i = n; i > 0; i--) {
                ans *= i;
        }
        cout << ans;

        return 0;
}

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

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

int main(){
	int n;
	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;

int func(int x) {
	return x <= 1 ? 1 : x * func(x - 1);
}

int main() {
	int n;

	cin >> n;

	cout << func(n) << endl;

	return 0;
}

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

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

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

C++: #include <iostream>

using namespace std;

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

    cin >> n;

    for (int i = 2; i <= n; i++) {
        res *= i;
    }

    cout << res << endl;

    return 0;
}

C++: #include<iostream>
#define rep(i,s,n)for(int i=s;i<n;i++)
using namespace std;
using ll=long long;
int main(){
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n,i;
  ll sum;
  cin >> n;
  sum=1;
  rep(i,1,n+1)sum*=i;
  cout << sum <<endl;
  return 0;
}

C++: #include <iostream>

long fact(int n);

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

    std::cout << fact(n) << std::endl;

    return 0;
}

long fact(int n)
{
    long ans = 1;
    while (n--) {
        ans *= (n + 1);
    }

    return ans;
}

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<stdio.h>
#define KETA 119
int main(void){

    int a[KETA];
    int b[KETA];
    int i,x,kuri=1,kaisuu;
    
    for(i=0;i<KETA;i++) a[i]=0;
    scanf("%d",&kaisuu);
    for(x=1;x<=kaisuu;x++){
        for(i=KETA-1;i>=0;i--){
            b[i]=(a[i]*x+kuri)%10;
            kuri=(a[i]*x+kuri)/10;
        }
        
        for(i=0;i<KETA;i++) a[i]=b[i];
        for(i=0;i<KETA;i++) b[i]=0;
    }
	    for(i=0;a[i]==0&&i<KETA;i++);
        if(i==12) printf("0");
        for(;i<KETA;i++){
            printf("%d",a[i]);
        }
        printf("\n");
        
    return 0;
}

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

void HELLO();
int max(int x1, int x2);
int min(int x1, int x2);
int sum(int* array);
int fact(int n);

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

void HELLO(){ cout << "Hello!!" << endl; }

int max(int x1, int x2){ return x1 > x2 ? x1 : x2; } 
int min(int x1, int x2){ return x1 < x2 ? x1 : x2; }

int sum(int* array){
	int sumup = 0;
	for(int i = 0; i < MAX; i++) sumup += array[i];
	return sumup;
}

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

C++: #include <iostream>
#include <string>
#include <math.h>
#include <stdio.h>
#include <algorithm>

using namespace std;

int main() {
    int a;
    cin>>a;
    long long int b=1;
    
    while(a!=0){
        b*=a;
        a--;
    }
    
    cout<<b<<endl;
    
    return 0;
}

C++: /*****include*****/
#include <iostream>
#include <fstream>
#include <string>

/*****デバッグ定義*****/
//#define DEBUG
/*****マクロ定義*****/

/*****名前空間*****/
using namespace std;

/*****グローバル変数置き場*****/

/*****その他関数置き場*****/

/*****main関数*****/
int main(){
	/*****ファイルオープン*****/
#ifdef DEBUG
	ofstream fout("output.txt");
	ifstream fin("input.txt");
	if(!fout || !fin){
		cout << "Can't open the file.\n";
		return;
	}
#endif
	/*****変数置き場*****/
	int n;
	long int res;
	/*****処理部*****/
	cin >> n;
	res = 1;
	if(n != 0){
		for(int i=2;i<=n;i++){
			res = res * i;
		}
	}
	cout << res << endl;
	/*****処理終了後*****/
#ifdef DEBUG
	fout.close();
	fin.close();
#endif
	return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
int f(int n)
{
    if(n==1)return 1;
    else return n*f(n-1);
}
int main()
{
    int n;
    while(cin>>n)
        cout<<f(n)<<endl;
        
    return 0;
}

C++: #include <stdio.h>

long kai(long i){
		if(i==1||i==0){
			return 1;
		}
		return i*kai(i-1);
	}
int main(){

	long n;
	scanf("%d",&n);

	printf("%d\n",kai(n));
	return 0;

}

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

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

 cout << ans << '\n';

 return 0;
}

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

using namespace std;

int main()
{
	unsigned long n, res = 1;

	cin >> n;

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

	cout << res << endl;

	return 0;
}

C++: #include<cstdio>
#include<cstring>
#include<algorithm>
#include<functional>
using namespace std;
int main(void)
{
	int i,j,n;
	long long int sum;
	scanf("%d",&n);
	sum=1;
	for(i=2;i<=n;i++) sum=sum*i;
	printf("%lld\n",sum);
	return 0;
}

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>
using namespace std;
int main(){
  int n;

  while(cin>>n){
    int s=1;
    while(n>0){
      s*=n;
      n--;
    }
    cout<<s<<endl;
  }
  return 0;
}

C++: #include<iostream>

using namespace std;

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

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

  int ans=1;
  ans=factorial(n);

  cout<<ans;
}

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

C++: #include <cmath>
#include <iostream>
#include <string>
#include <cstdlib>
#include <cstdio>
#include <algorithm>
#include <sstream>

using namespace std;

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 <iostream>
#include <cstdlib>
#include <windows.h>
using namespace std;

int main()
{
    long long n;
    
    do
    {
    cin >> n;
    
    }while(n>20);
    
    int x;
    long long sum=1;
    for(x=1; x<=n; x++)
    {
       sum = sum*x;
    }
    
    cout<< sum << endl;
    
    return 0;
}

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