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>
#include <cstdlib>
#include <windows.h>
using namespace std;

int main()
{
    long long n;
    
    do
    {
    cin >> n;
    
    }while(n>20);
    
    long long 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;
long long f(int n)
{
	return(n?n*f(n-1):1);
}
int main()
{
	int n;
	cin >> n;
	cout << f(n) << endl;
	
	return 0;
}

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

C++: #include<stdio.h>
#include<algorithm>
using namespace std;
int main(){
int n;
scanf("%d",&n);
unsigned long long int ans=1;
for(;n>0;n--){
ans=ans*n;
}
printf("%lld\n",ans);
return 0;
}

C++: #include<bits/stdc++.h>

using namespace std;

int main ()
{
    long long x,y;
    y=1;

    cin>>x;

    if(1<= x <= 20)
    {
        for(int i = x; i>0; i--)
        {
            y*=i;
        }
        cout<<y<<endl;
    }

    return 0;
}

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

C++: #include <iostream>

int main(void)
{
  int n = 0;
  std::cin >> n;
  
  unsigned int fact = 1;
  
  for (int i = 1; i <= n; i++) {
    fact *= i;
  }
  
  std::cout << fact << std::endl;
  
  return 0;
}

C++: #include <iostream>

using namespace std;

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

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

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

int main(){
  int n;
  cin>>n;
  if(n<1||n<20)break;
  cout<< factorial(n)<<endl;
}

C++: #include<stdio.h>
#include <string>
#include <iostream>
using namespace std;


int factorial_recursive(int n);

int main(void)
{
  int n;
   int result1;


cin>>n;

//if(0<n&&n<21) ;
//else return 0;

	result1 = factorial_recursive(n);

	cout<<result1<<endl;

}
int factorial_recursive(int n) {
		if (n > 0) {
        return factorial_recursive(n - 1) * n;
    } else {
        return 1;
    }
}

C++: #include<stdio.h>
#include<iostream>
#include<math.h>
#include<algorithm>
#include<string>
#define pi 3.14159
using namespace std;

long int fact(long int n) {
	long int m;
	if(n == 1) return 1;
	else {
		m =n * fact(n - 1);
		cout << m <<endl;
	}
}

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

	

	return 0;
}

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

int main(void)
{
  int a,b,i;
  cin >> a;
  for(i=a;i>0;i--)
  {
    b*=i;
  }
  cout << b;
  return 0;
}

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

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

C++: #include "iostream"
#include "cmath"

int main(int argc, char const *argv[])
{
  int n;
  double factorial=1;
  std::cin >> n;
  for (int i = 1; i <= std::abs(n); ++i)
    factorial *= i;
  if (n<0) std::cout << -1*factorial << std::endl;
  else std::cout << factorial << std::endl;
}

C++: #include <iostream>

using namespace std;

int main() {
	int n;
	unsigned long long int re = 1;
	
	cin >> n;
	while(n >= 2) {
		re *= n;
		n--;
	}
	
	cout << re << endl;
	
	return 0;
	
}#include <iostream>

using namespace std;

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

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

C++: /*
NOTE :
*min_element(.begin(),.end())
*max_element(.begin(),.end())
stack push pop top
queue push pop front
priority_queue<> pq
 push()  pop() size()  top()
map<>
 find() begin() end() insert(map<>::value_type())
pair<>
sort(.begin(), .end())
sort(arr, arr+N)
sort(a, a+N, greater<int>())
binary_search(vc.begin(), vc.end(), x)  //binary_search???true, false?????????
vector<int>::iterator lit = lower_bound(vc.begin(), vc.end(), x);
  lower_bound?????????????????????"??\???"????????????????????????????????????????????¬???????????????
vector<int>::iterator uit = upper_bound(vc.begin(), vc.end(), x);
  upper_bound????????????????????????"?¶???????"?????????????????????????????????????????¬???????????????
*/
#include <iostream>
#include <cstdio>
#include <climits>
#include <cmath>
#include <cassert>
#include <sstream>
#include <algorithm>
#include <valarray>
#include <utility>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <map>
#include <set>

#define MAX 100
#define INF 1<<20
#define LLINF 10e12 // 1<<31 // 2^31
#define REP(i,n) for(int i=0;i<n;i++)
#define REP2(i,a,n) for(int i=(a);i<(n);i++)
#define SET(a,c) memset(a,c,sizeof a)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define FOREACH(i,c) for(auto (i) : (c))
#define BIT(i,j) ((i)>>(j))&1
#define ALL(o) (o).begin(), (o).end()
#define ERASE(o) (o).erase(unique(ALL((o))), (o).end());

using namespace std;
typedef long long ll;
typedef valarray<int> array_t;
/////
int f(int n)
{
  if(n==0) return 1;
  else return n*f(n-1);
}

int main()
{
  cin.tie(0);
  ios::sync_with_stdio(false);
  // FROM HERE
  int n; cin >> n;
  cout << f(n) << endl;
  return 0;
}

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

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

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

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>
#include<complex>
#include<iomanip>

#define EPS (1e-10)
using namespace std;
#define PI (3.1415926535)

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

int main(){
	int n;
	cin >> n;
	if(n == 20){
		cout << f(19)*2 << '0' <<  endl;
	}else{
		cout << f(n) << endl;
	}

	return 0;
}

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

C++: #include <iostream>
using namespace std;
int main( void )
{
	while ( !cin.eof() )
	{
		int n;
		cin >> n;
		if ( cin.eof() )
			break;

		long long f = 1;
		for ( int i = 2; i <= n; i++ )
		{
			f *= i;
		}

		cout << f << endl;
	}

}

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

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

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

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

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

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

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

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

int main(int argc, char *argv[]){
	long long int n;
	cin>>n;
	cout<<fact(n)<<endl;
    return 0;
}

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