Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func read() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	sc.Split(bufio.ScanLines)
	n, _ := strconv.Atoi(read())
	sum := 1
	for i := n; i > 0; i-- {
		sum *= i

	}
	fmt.Println(sum)
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
#include <list>
using namespace std;
 
int main()
{
   int n;
   cin>>n;
   long long result=1;
   for(int i=2;i<=n;i++){
     result*=i;
   }
   cout<<result<<endl;
   return 0;
}

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

C++: #include<bits/stdc++.h>
using namespace std;
int n;
long long dfs(long long  i){
  if(i==1)
    return 1;
  else if(i==0)
    return 0;
  return i*dfs(i-1);
}
  int main(){  
  cin>>n;
  cout<<dfs(n)<<endl;
  return 0;
  
}

C++: #include<bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n; i++)
#define INF 1000000
using namespace std;
int main(){
    int n;
    cin >> n;
    long long ans = 1;
    while(1){
        if(n == 1) break;
        //cout << ans << endl;
        ans *= n;
        n--;
    }
    cout << ans << endl;
    return 0;
}

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

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

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

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

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

	return 0;
}

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

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

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

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

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

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

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;
  if(n == 20) cout << kaijo(19)*2 << "0" << endl;
  else        cout << kaijo(n) << endl;
  
  return 0;
}

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

C++: #include <cstdio>
#include <cstdlib>
#include <algorithm>

using namespace std;

int a;
long long int hasil; 

int main()
{
	
	hasil=1; 
	scanf("%lld",&a);
	for(int loop=a;loop>=1;loop--)
	{
		hasil=hasil*loop;
	}
	printf("%lld\n",hasil);
	return 0; 
}

C++: #include<iostream>

using namespace std;

int main()

{

    long long n,
	factorial=1;

    
    cin>>n;


    if (n<=20){
        for(int a=1;a<=n;a++)

    {

        factorial=factorial*a;

    }
	}
    
	
		
    cout<<factorial<<endl;

    return 0;

}

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

int main() {
	// your code goes here
	int n;
	long long int ans=1;
	cin >> n;
	while(n>1){
		ans*=n;
		--n;
	}
	cout << ans << endl; 
	return 0;
}