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>
#include <string>
#include <algorithm>
using namespace std;
 
int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int n;
	cin >> n;
	
	int ans = 1;
	while(n > 0){
		ans *= n;
		n--;
	}
	
	cout << ans << endl;
		
	return 0;
}

C++: #include <iostream>
using namespace std;
long long factorial[21];
void init(){
	factorial[1] = 1;
	for(int i = 2;i < 21; i++){
		factorial[i] = factorial[i-1] * i;
	}
}
int main(){
	init();
	int n;
	while(cin >> n){
		cout << factorial[n] << endl;
	}
	return 0;
}

C++: #include<stdio.h>

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

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

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

using namespace std;

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

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

int main()
{
	int a;
	long long int kaijou[21];

	for (int i = 0; i < 21; i++) kaijou[i] = 1;

	cin >> a;
	for (int i = 1; i <= a; i++)
	{
		kaijou[i] = kaijou[i - 1] * i;
	}
	cout << kaijou[a] << endl;
	return 0;
}

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

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

C++: using namespace std;

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

}

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

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

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

int kai(int a){
  if(a==1)return 1;
  return a*(kai(a-1));
}

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

C++:  
 #include<iostream>
 #include<stdio.h>
 #include<string>
 #include<math.h>
 #include<iomanip>
 #include<algorithm>
 #include<string.h>
 #include<cctype>
 #include<map>
 #include<set>
 #include<vector>
 #include<sstream>
 #include<stack>
 
 using namespace std;
  
 int main()
 {
   long long int n;
   long long result=1;
   cin>>n;
   while(n--)
   {
     result*=n;    
   }
   cout<<result<<endl;
   //while(1);      
   return 0;    
 }

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

		int fact=1,i,n;
		scanf("%d",&n);
		for(i=1;i<=n;i++)
			fact=fact*i;
		printf("%d",fact);

		return 0;
}

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

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

C++: #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
#define loop(i,x,n) for(int i=(x);i<(n);i++)
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define mp make_pair
#define fir first
#define sec second
#define ub upper_bound
#define lb lower_bound
#define int long long
using namespace std;
const int MOD=1000000007;
const int INF=1000000009;

int memo[30];

int fac(int m){
  if(m==1)return 1;
  return m*fac(m-1);
}

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

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <stack>
#include <string>
#include <map>
#include <functional>
#include <cmath>
#include <cstdio>
using namespace std;

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

C++: #define _USE_MATH_DEFINES
 
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <vector>
#include <math.h>

using namespace std;

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

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

	return 0;
}

C++: #include <iostream>

using namespace std;

long long fact(long long n);

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

	return 0;
}

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

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

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

C++: #include <iostream>

using namespace std;

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

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

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

int main()
{
	int n;
	long long int ans = 1;
	int num;

	cin >> n;

	for(int i = n+1; i>1; i--)
	{
		ans *= (i-1);
	}

	cout << ans << endl

	return 0;
}

C++: int main(a,i){
long long n=scanf("%d",&a);
for(i=0;i++<a;)n*=i;
printf("%llu\n",n);
return 0;
}

C++: #include <stdio.h>

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

int main(){
  int n;
  scanf("%d", &n);
  printf("%d\n", fact(n));
}

C++: #include<stdio.h>
#include<iostream>
#include<math.h>
#include<algorithm>
#include<string>
#define pi 3.14159
using namespace std;

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

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

	

	return 0;
}

C++: #include<stdio.h>
#include<iostream>
#include<math.h>
#include<algorithm>
#include<string>
#define pi 3.14159
using namespace std;

long int fact(long int n) {
	long int m;
	if(n == 1) return 1;
	else {
		m =n * fact(n - 1);
		cout << m <<endl;
	}
}

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

	

	return 0;
}

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

int main()
{
	long long int a[100];
	int n;
	a[1]=1;
	for(int i=2;i<=20;i++){
		a[i]=a[i-1]*i;
	}
	cin>>n;
	cout<<a[n]<<endl;
	return 0;
}

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

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

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

int main(){

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

	cout << x << endl;

	return 0;
}

C++: #include <stdio.h>
#include <iostream>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long Int;

Int f(int n) {
    Int r = 1;
    rep (i, n) r *= i+1;
    return r;
}

int main() {
    int n;
    scanf("%d", &n);
    cout << f(n) << endl;
    return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    // Here your code !
    int n,a=1;
    cin>>n;
    
    for(int i=1;i<=n;i++){
        a=a*i;
    }
    cout<<a<<endl;
}

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

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

C++: #include<stdio.h>

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

C++: #include <stdio.h>
int main()
{ int n, count;
unsigned long long int factorial=1;
while(scanf("%d",&n)==1)
{
     if ( n== 0)
     printf("1\n");
     else
     {
         for(count=1;count<=n;++count)
     { factorial=factorial*count;}
      printf("%llu\n",factorial);
      }
      }
      return 0;
       }

C++: #include <stdio.h>

int factrial(int n)
{
	int fac;
	
	if(n == 1){
		return (1);
	}
	
	else{
		fac = factrial(n - 1) * n;
		if(fac >= 0){
			return (fac);
		}
		else{
			return(-1 * fac);
		}
	}
}

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