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 "bits/stdc++.h"
using namespace std;

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

C++: #include<iostream>
using namespace std;
int main(){
long i,j,k,c,n,f[21]={0};
f[1]=j=1;
cin>>n;
for(k=1;k<=n;k++){
c=0;
for(i=1;i<=j+1;i++){
f[i]=f[i]*k+c;c=f[i]/10;
if(c){
f[i]%=10;if(i+1>j)j++;
}
}
}
while(j>0)cout<<f[j--];
cout<<endl;
return 0;
}

C++: #include<stdio.h>
#include<iostream>
using namespace std;
int ke(int x)
{
    if(x == 1)return 1;
    else return x*ke(x-1);
}
int main()
{
    int a;
    cin >> a;
    printf("%d\n",ke(a));
    return 0;
}

C++: #include <cstdio>

int main()
{
		int n;
			scanf("%d\n", &n);
				long long m = n;
					while(--n) m *= n;
						printf("%lld\n", m);
							return 0;
}

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

using namespace std;

int kaizyou(int n,int sum);

int n;
int ans=1;

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

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

}

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

C++: #include<iostream>
using namespace std;
int main(){
  int in;
  long long int out=1;
  cin>>in;
  while(in){
    out*=in;
    in--;
  }
  cout<< out<<endl;


}

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

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

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

using namespace std;

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

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

#define REP(i, s, n) for (int i = s; i < n; ++i)
#define rep(i, n) REP(i, 0, n)
#define SORT(c) sort((c).begin(), (c).end())
#define IINF INT_MAX
#define LLINF LLONG_MAX
#define DEBUG false


long long 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 <iostream>
//#include <fstream.h>
//#include <cstring>
using namespace std;

long int factorial(int n) {
  int i,x=1;
  for(i=1;i<=n;i++) {
    x*=i;
  }
  return x;
}

int main() {
  
  int n;

  cin >> n;

  cout << factorial(n) << "\n";

  return 0;
}

C++: #include<cstdio>

int main(){
	long long n,a = 1;
	scanf("%ld", &n);
	while(n){
		a *= n;
		n--;
	}
	printf("%ld\n", a);
	return 0;
}

C++: #include <iostream>
#include <cmath>
using namespace std;
int main() {
  int a;
  cin >> a;
  out << tgamma(a+1) << endl;
  return 0;
}

C++: #include<iostream>

using namespace std;

int main()
{
  long long int n;
  cin >> n;
  int i = n;
  while(i-- != 1) n *= i;
  cout << n << endl;;
  
}

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

C++: #include <iostream>

using namespace std;

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

	return factorial(n - 1) * n;
}

int main()
{
	int n;

	cin >> n;

	cout << factorial(n) << endl;

	return 0;
}

C++: #include <stdio.h>
#include <iostream>

int main(void)
{
long long a;
int n;

scanf("%d", &n);

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

std::cout << a << std::endl;

return (0);
}

C++: #include<iostream>

long long calc(int n){

	if (n == 1)return 1;

	return n*calc(n - 1);

}

int main(){

	int n;
	std::cin >> n;

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

	return 0;
}

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

int main(int argc, char **argv)
{
 int n, tmp;
 cin >> n;
 tmp = 1;
 while(n > 1){
  tmp *= n;
  n--;
 }
 cout << tmp << endl;
 return 0;
}

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

int main() {
	int n;
	long long d=1;
	cin >> n;
	for (int i = 0; i < n; i++){
		d *= (i + 1);
	}
	cout << d;
	char c;
	cin >> c;
}

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

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

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

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

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

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

C++: #include<iostream> //header file
 
using namespace std;
 
int main()
 
{
 
    long long n,fact=1; 
 
    cout<<" Enter Number:  ";
 
    cin>>n;
 
    for(int i=1;i<=n;i++)
 
    {
 
        fact=fact*i; 
 
    }
 
     cout<<fact;
 
     return 0;
 
}

C++: #include <iostream>

using namespace std;

int f(int n){

if (n==1) return 1;
if (n==2) return 2;

return n*f(n-1);}


int main(){
 
cout<< "enter n:";
int n;
cin >>n;
cout<<f(n)<<endl;
return 0;
}

C++: 
#include<stdio.h>

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

C++: #include <iostream>
#include<math.h>
#include<iomanip>
#include<vector>
#include<algorithm>
#include<functional>
using namespace std;

int main()
{
    int  a=0,b=0,i=0;
    cin >> a;
    b=1;
    for(i=0;i<a;i++){
        b=b*(i+1);

    }#include <iostream>
#include<math.h>
#include<iomanip>
#include<vector>
#include<algorithm>
#include<functional>
using namespace std;

int main()
{
    int  a=0,b=0,i=0;
    cin >> a;
    b=1;
    for(i=0;i<a;i++){
        b=b*(i+1);
    }

    cout << b << endl;



    //cout << endl;

return 0;

}


    cout << b << endl;



    //cout << endl;

return 0;

}

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

int main()
{

	int i, num, total=1;
	
	cout << "Enter an integer : " << endl;
	cin >> num;
	
	for(i=1;i<=num;i++)
	total *=i;
	
	cout << total;
		
	return 0;
	
	}

C++: #include <iostream>
#include <string>
#include <stack>
#include <math.h>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <vector>

using namespace std;

long long f(long long m) {
	if (m == 0) return 1;
	else return m*f(m - 1);
}




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