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 kaijo(int n) {
  int ans = 1;
  for(int i = n; i > 0; i--) {
    ans *= i;
  }
  return ans;
}

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

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

int main(){
   int i,n;
   int ans=1;
   cin>>n;
   
   for(i=n;i>1;i--) ans*=i;
   
   printf("%d\n",ans);
   return 0;
}

C++: #include <iostream>

using namespace std;

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

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

    return 0;
}

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

using namespace std;

int main()
{
  function<int(int)> const fact = [&]( int n ) -> int { return n==0 ? 1 : fact( n-1 ) * n; };
  int i; cin >> i;
  cout << fact( i ) << endl;
}

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

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

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

unsigned long factorial(unsigned long n){
    
    unsigned long ans = (n>1)? n*factorial(n-1):1;
    
    return  ans;
}


int main (int argc, char const* argv[]){
    unsigned long n, ans;
    
    cin >> n;
    
    ans = factorial(n);
    cout << ans << endl;
    
    return 0;
}

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

C++: #include <iostream>
using namespace std;
typedef long long int lli;

lli fact(lli a){
  if(a==0)
    return 1;
  else
    return a*fact(a-1);
}

int main(){
  lli c;
  cin >> c;
  cout << fact(c) << endl;
}

C++: #include <iostream>

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

int main(void)
{
	int n;
	std::cin >> n;
	std::cout << func(n) << std::endl;
	return 0;
}

C++: #include <cstdio>

using namespace std;

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

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

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

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

C++: #include <iostream>

using namespace std;

int main(void) {
	int in,i;

	cin >> in;
	for(i=in;i>1;i--) {
		in*=i-1;
	}
	cout << in << endl;

	return 0;
}

C++: #include<iostream>
#include<iomanip>
#include<vector>
#include<queue>
#include<list>
#include<stack>
#include<algorithm>
#include<cmath>
#include<memory>

using namespace std;

long long fact( long long n )
{
  if ( n == 1 ) return 1;

  return n * fact( n - 1 );
  
}

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

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

C++: main(i){printf("%d\n",rand());}

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

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

C++: #include <iostream>
#include <iomanip>
#include <list>
#include <map>
#include <algorithm>
#include <stack>
#include <string>
#include <vector>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>

using namespace std;


int main(){
	unsigned int out;
	int n;
	while(cin >> n){
		out = 1;
		for(int i = 0; i <= n; i++){
			if(i){
				out *= i;
			}
		}

		cout << out << endl;
	}

	return 0;
}

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

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

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

using namespace std;

int main()
{
  unsigned int n;
  scanf("%ud",&n);
  int l = n;
  for(int i = 1;i < l;i++){
    n *=(l-i);
  }
  printf("%ud",n);
  return 0;
}

C++: #include<stdio.h>

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

int main()
{
    int n;
    long long f;


    while(scanf("%d",&n)==1)
    {
       if(n<=0)
            printf("no factorial.\n");
        else

        {
            f=factorial(n);
            printf("%lld\n",f);
        }
    }
    return 0;

}

C++: #include<stdio.h>
#include<string.h>
int main()
{
    int n;
    int f[50];
    int i, j, s, c;
    while (scanf ("%d", &n)??EOF)
    {
        memset(f,0,sizeof(f));
        f[0]=1;
        for (i=2; i<=n; i++)
        {
            c=0;
            for (j=0; j<50; j++)
            {
                s=f[j]*i+c;
                f[j]=s%10;
                c=s/10;
            }
        }
        for (i=49; i>=0; i--) if (f[i]!=0) break;
        for (j=i; j>=0; j--) printf ("%d", f[j]);
        printf ("\n");
    }
    return 0;
}

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

int main(){
    unsigned int num;
    unsigned long long factorial=1;
    cin >> num;
    for(;num > 0; num--){
        factorial *= num;
    }
    cout << factorial;
    return 0;
}

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

typedef long long ll;

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

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

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

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

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

int main(){
  int f=1;
  int i;

  cin >> i;

  for(; i>1; i--){
      f*=i;
  }

  cout << f << "\n";

  return 0;
}

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

int main() {
	int n;
	while(cin >> n){
		long long ans = 1;
		for(int i = 1; i <= n; ++i)
			ans *= i;
		cout << ans << endl;
	}
	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
     {
         factorial=1;

         for(count=1;count<=n;++count)
     { factorial*=count;}
      printf("%llu\n",factorial);
      }

      }
      return 0;
       }

C++: #include <cstdio>

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

C++:  #include <string>
 #include <vector>
 #include <algorithm>
 #include <iostream>
 #include <cstdio>
 #include <cstdlib>
 #include <cmath>
 #include <queue>
 #include <map>
 #define INF 100000000
 
 using namespace std;
 typedef long long ll;
 
 int num[21]={0};
 
 long long int kai(int n){
 if(num[n]!=0)return num[n];
 else{
 num[n]=n*kai(n-1);
 return num[n];
 }
 }
 
 int main(){
 int n;
 num[0]=num[1]=1;
 cin>>n;
 cout<<kai(n)<<endl;
 }

C++: #include <iostream>

using namespace std;

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

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