Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(nextString())
	if err != nil {
		fmt.Printf("strconv.Atoi failed: %v\n", err)
	}
	return n
}

func main() {
	scanner.Split(bufio.ScanWords)

	n := nextInt()
	f := 1
	for i := 1; i <= n; i++ {
		f *= i
	}
	fmt.Println(f)
}

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

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

	return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
        unsigned long n, ans = 1;

        cin >> n;
        for (unsigned long i = n; i > 0; i--) {
                ans *= i;
        }
        cout << ans << endl;

        return 0;
}

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

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

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

using namespace std;


int main(void){

	int n;
	cin >> n;

	unsigned long long int 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 a,b;
	std::cin>>a;
	b=1;
	for(int i=0 ;i<a ; i++)   b *= a -i ;
	std::cout<<b<<endl;
}

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

int main()
{
	int n;
	const int max = 100;
	int num[max];
	int a[max];
	cin >> n;
	for(int i = 1; i < max; i++){
		num[i] = 0; a[i] = 0;
	}
	num[1] = 1;
	a[1] = 1;
	for(int i = 1; i <= n; i++){
		int digit = max - 1;
		for(;num[digit] == 0;digit--);
		for(int j = digit; j >= 1; j--){
			num[j + 2] += (a[j] * i) / 100;
			num[j + 1] += ((a[j] * i) % 100) / 10;
			num[j] = ((a[j] * i) % 100) % 10;
		}
		for(int t = 1; (t <= digit + 2) && (t < max); t++){
			num[t + 1] += num[t] / 10;
			num[t] = num[t] % 10;
		}
		for(int m = 1; m <= digit + 2; m++)
			a[m] = num[m];
	}
	int digit = max - 1;
	for(;num[digit] == 0;digit--);
	for(int k = digit; digit >= 1; digit--)
		cout << num[digit];
	cout << endl;
	return 0;
}

C++: #include <iostream>

int main(){
	
	long long int n,a=1;
	std::cin>>n;
	if(n<=20&&n>0){
	while(n!=0){
		a=a*n;
		n--;
	}
	
	std::cout<<a<<std::endl;
}
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
  long long n,ans=1;
  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, y=1;

	cin>>n;

	if(n<=20){
		for(int i=1;i<=n;i++){
			y=y*i;
		}
		cout<<y<<endl;
	}
	else
		cout<<endl;

	return 0;
}

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;
}