Go: package main

import (
    "os"
    "fmt"
    "bufio"
    "strconv"
)

var sc = bufio.NewScanner(os.Stdin)
func readInt() int64 {
    sc.Scan()
    n, _ := strconv.Atoi(sc.Text())
    return int64(n)
}


func main() {
    var ans int64 = 1
    var n int64 = readInt()
    var i int64
    for i = 1; i <= n; i++ {
        ans *= i
    }
    fmt.Println(ans)
}

C++: #include<iostream>
#include <stdio.h>
using namespace std;
 
int main(){
	int a;
	cin>>a;
	if(a==1){
	cout<<1<<endl;}
	if(a==2){
	cout<<2<<endl;}
	if(a==3){
	cout<<6<<endl;}
	if(a==4){
	cout<<24<<endl;}
	if(a==5){
	cout<<120<<endl;}
	if(a==6){
	cout<<720<<endl;}
	if(a==7){
	cout<<5040<<endl;}
	if(a==8){
	cout<<40320<<endl;}
	if(a==9){
	cout<<362160<<endl;}
	if(a==10){
	cout<<3621600<<endl;}
	if(a==11){
	cout<<39916800<<endl;}
	if(a==12){
	cout<<479001600<<endl;}
	if(a==13){
	cout<<6227020800<<endl;}
	if(a==14){
	cout<<87178291200<<endl;}
	if(a==15){
	cout<<1307674368000<<endl;}
	if(a==16){
	cout<<20922789888000<<endl;}
	if(a==17){
	cout<<355687428096000<<endl;}
	if(a==18){
	cout<<6402373705728000<<endl;}
	if(a==19){
	cout<<121645100408832000<<endl;}
	if(a==20){
	cout<<2432902008176640000<<endl;}
	return 0;}

C++: #include <iostream>

using namespace std;

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

C++: #include<stdio.h>
long long facto(long n);
int main()
{
    long n;
    long long x;
    scanf("%ld",&n);
    x= facto(n);
    printf("%ul\n",x);
    return 0;
}
long long facto(long n)
{
    if(n!=1)
     return n*facto(n-1);
}

C++: #include <iostream>

using namespace std;

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

	cin>>n;

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

	cout<<"Factor of "<<n<<": "<<factor_n<<endl;

	system ("PAUSE");
	return 0;
}

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

int main(){
	int n, i, f = 1;
	cin >> n;

	for( i=1;i<=n;i++ ){
		f*=i;
	}
	cout << f << endl;
	return 0;
}

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

int main()
{

    long long fucker=1,siam;
    scanf("%lld",&siam);
    for(int i=siam;i>0;i--)
        fucker*=i;
    printf("%lld\n",fucker);
}

C++: import java.util.Scanner;
 
public class Main {
	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		long x = 1;
		for (int i = 2; i <= n; i++) {
			x = x * i;
		}
		System.out.println(x);
	}
}

C++: #include<iostream>

using namespace std;

int facctorialMethod(int k);

int main(){
    int number;
    cin>>number;
    cout<<facctorialMethod(number)<<endl;
}

int facctorialMethod(int k){
    int sum = 1;
    for (int i = 1; i <= k; ++i)
    {
        sum *= i;
    }
    return sum;
}

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

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

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

int 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 <stdio.h>
long long int f(int n){
if(n==1)return 1;
else return f(n-1)*n;
}
int main(){
int n;
scanf("%d",&n);
printf("%lld\n",f(n));
}

C++: #include <bits/stdc++.h>
using namespace std;
/*{{{*/  //template
#define rep(i,n) for(int i=0;i<n;i++)
constexpr int INF = numeric_limits<int>::max()/2;
constexpr long long LINF = numeric_limits<long long>::max()/3;
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define all(v) (v).begin(),(v).end()
#define sz(x) (int)(x).size()
#define debug(x) cerr<<#x<<":"<<x<<endl
#define debug2(x,y) cerr<<#x<<","<<#y":"<<x<<","<<y<<endl
//struct fin{ fin(){ cin.tie(0); ios::sync_with_stdio(false); } } fin_;
struct Double{ double d; explicit Double(double x) : d(x){} };
ostream& operator<<(ostream& os,const Double x){ os << fixed << setprecision(20) << x.d; return os; }
template<typename T> ostream& operator<<(ostream& os,const vector<T>& vec){ os << "["; for(const auto& v : vec){ os << v << ","; } os << "]"; return os; }
template<typename T,typename U> ostream& operator<<(ostream& os,const pair<T,U>& p){ os << "(" << p.first << ","<< p.second <<")"; return os; }
template<typename T> ostream& operator<<(ostream& os,const set<T>& st){ os<<"{"; for(T v:st) os<<v<<","; os <<"}"; return os; }
template<typename T,typename U> inline void chmax(T &x,U y){ if(y>x) x = y; }
template<typename T,typename U> inline void chmin(T &x,U y){ if(y<x) x = y; }
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
ll gcd(ll a,ll b){ if(b==0) return a; else return gcd(b,a%b); }
//constexpr double eps = 1e-14; 
constexpr double eps = 1e-10; 
constexpr ll mod = 1e9+7;
const int dx[]={1,0,-1,0} ,dy[] = {0,1,0,-1};
/*}}}*/

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

C++: import java.util.Scanner;

public class main {
       public static void main(String[] args) {
              Scanner scn = new Scanner(System.in);
              int n = scn.nextInt();
              long x = 1;
              for (int i = 2; i <= n; i++) {
                       x = x * i;
		}
		System.out.println(x);
	}
}

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

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

C++: #include <iostream>

using namespace std;

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

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

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

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

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

	cout << factorial(n) << endl;

	return 0;
}

C++: #include <iostream>
using namespace std;
factorial(int n){
  return ((--n) ? factorial(n):1);
}
int main(void){
  int n; cin >> n;
  cout << factorial(n) << endl;
  return 0;
}

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

#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for (int i = x; i < n; i++)
#define OP(m) cout << m << endl;
typedef long long ll;
typedef unsigned long long ull;

int main()
{
    ull sum = 1;
    int n;
    cin >> n;
    for (int i = 1; i <= n; i++)
    {
        sum *= i;
    }
    OP(sum)
    return 0;
}

C++: #include <iostream>
#include <cstdlib>
#include <windows.h>
using namespace std;

int main()
{
    long long n;
    
    do
    {
    cout<< "Enter value : " ;
    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>

using namespace std;

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

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

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

int main(){
	
	int a,b,c,d;
	
	cin >> a;
	
	for(b=1; b<=a; b++){
		c = 1;
		for(d=b; d>=1; d--){
			c *= d;
		}
	}
	
	cout << c << endl;
	
	return 0;
}

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

C++: #include <stdio.h>

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

int main(void)
{
  int n;
  scanf("%d", &n);

  printf("%llu\n", factorial(n));

  return 0;
}

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