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 fact(int n){
    if(n == 1) return 1;
    else return n * fact(n-1);
}

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

   return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
#define all(vec) vec.begin(),vec.end()
typedef long long int ll;
typedef pair<ll,ll> P;
const ll MOD=1234567;
const ll INF=1000000010;
const ll LINF=1000000000000000010LL;
const int MAX=10000010;
const double EPS=1e-3;
int dx[4]={0,1,0,1};
int dy[4]={0,0,1,1};
//階乗
ll fact(int n){
    if(n==1){
        return 1;
	}
    ll res=n;
    res*=fact(n-1);
    return res;
}
int main(){
	int n;cin>>n;
	cout<<fact(n)<<endl;
	return 0;
}

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

using namespace std;

int main(){
	int n;

	while (cin >> n){

		double ans = 1;

		while (n){
			ans *= n;
			n--;
		}

		printf("%.0f\n", ans);
	}

	return 0;
}

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

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

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

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

}

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

C++: #include<iostream>

using namespace std;

int main(void){
  unsigned long long int n;
  unsigned long long int fact=1;
  cin>>n;
  while(n) fact*=n--;
  cout<<fact<<endl;
  return 0;
}

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

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

C++: 
#define _USE_MATH_DEFINES
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
#include <cstring>
#include <vector>
#include <map>
#include <utility>
#include <complex>
#include <stack>

using namespace std;

typedef long long ll;

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

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

C++: #include<stdio.h>
int main()
{
    int n,i;
    double sum=1;
    scanf("%d",&n);


    for(i=1;i<=n;i++)
    {
        sum*=i;

    }
      printf("%lf",sum);


    return 0;
}

C++: #include <iostream>

using namespace std;

unsigned long factorial(unsigned long n)
{
	unsigned long result = 1;
	for (unsigned long i = n; i > 0; --i) {
		result *= i;
	}
	return result;
}

int main()
{
	unsigned long value = 0;
	cin >> value;
	cout << factorial(value) << endl;

	return 0;
}

C++: #include<stdio.h>
int factorial(int x);

int main(void)
{
	int n, ans;
	scanf("%d", &n);
	ans = factorial(n);
	printf("%d\n", ans);
	
	return 0;
}

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

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

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

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

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

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

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

C++: #include <stdio.h>

int main(void) {
	int n;
	int fact=1;
	char buf[256];
	
	fgets(buf, sizeof(buf), stdin);
	sscanf(buf, "%d", &n);
	
	//if (n<1 || n>20) return 1;
	
	for (int i=n; i>=2; i--) {
		fact*=i;
	}
	
	printf("%d\n", fact);
	
	return 0;
}

C++: #include <iostream>

int main(){
	int n,a=1;
	std::cin>>n;
	while(n!=0){
		a=a*n;
		n--;
	}
	std::cout<<a<<std::endl;
	return 0;
}

C++: #include<cstdio>


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

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

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

int main(){

  int n;

  cin>>n;
  cout<<f(n)<<endl;

  return 0;
}

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

long long factorial(long long n){   // 再帰関数
  if(n==1){
    return n;
  }else{
    n*=factorial(n-1);
  }
}

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

  if(n>=1 && n<=20){
    cout << factorial(n) << endl; // 再帰
  }else{
    cout << "計算できません。" << endl;
  }

  return 0;
}

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

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

unsigned long Factorial(unsigned long n){
    if(n!=1){
        return n*Factorial(n-1);
    }else{
        return 1;
    }
}

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

    cout << Factorial(n) << endl;
return 0;
}

C++: #include<stdio.h>

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

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

int main(void){
    int n, x;
    cin >> n;
    x = 1;
    while(n != 1){
        x *= n;
        n--;
    }
    cout << x << endl;

    return 0;
}

C++: #include<iostream>

using namespace std;
long long int faktorial(long long int n){
	if (n==0)return 1;
	return n*faktorial(n-1);
}
long long int n,z;
int main (){



while(cin>>n){

	  if(n>=0&&n<21){
		z = faktorial(n);
	
	
cout<<z<<endl;}}

return 0;
	
}

C++: #include <algorithm>
#include <map>
#include <vector>
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstring>
#include <cctype>
#include <cstdlib>
#include <cmath>
#include <string>
#include <queue>
#include <stack>
#include <set>
using namespace std;

#define REP(i,n) for(int i=0; i<n; ++i)
#define IREP(it,array) for(vector<int>::iterator it=array.begin(); it!=array.end(); ++it)
#define SREP(it,array) for(vector<string>::iterator it=array.begin(); it!=array.end(); ++it)

#define MP       make_pair
#define PB       push_back
#define ALL(x)   (x).begin(),(x).end()

const int INF = 1<<29;
const double EPS = 1e-9;
double zero(double d){
  return d < EPS ? 0.0 : d;
}

typedef long long LL;
typedef pair<int,int> P;


int main()
{
  cout.setf(ios::fixed, ios::floatfield);
  cout.precision(7);

  int n;
  cin >> n;
  
  LL res=1L;
  REP(i,n){
    res *= i+1;
  }

  cout << res << endl;

  return 0;
}

C++: #include<iostream>
#include<cmath>
#include<cstdio>
using namespace std;
int fctrl(int n){
    if(n==0||n==1)return 1;
    else return n*fctrl(n-1);

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

    long long  rslt = fctrl(n);

    cout<<rslt<<endl;

    return 0;
}

C++: #include<iostream>
#include<iomanip>
#include<string>
#include<algorithm>
#include<cmath>
using namespace std;

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

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

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

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

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

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

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

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