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++: /*
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;
}

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

#define loop(i,a,b) for(int i=a ;i < b ; i++)
#define rep(i,a) loop(i,0,a)
using namespace std;

int main(void){
	int a;
	while(cin>>a){
	
	long long int sum=1;
	loop(i,1,a+1)sum*=i;
	cout<<sum<<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;
	return 0;
}

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

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

int main(){

    Int n;

    cin >> n;

    cout << fact(n) << endl;

    return 0;
}

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

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

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

C++: nclude<iostream>
using namespace std;
int function(int n){
  if(n > 1)
    return n * function(n-1);
  else
    return 1;
}

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

C++: #include <iostream>

using namespace std;

int fact(long long n);

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

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

C++: // 失敗するからこそ そこから立ち向かって行く強さがあってそんな強さが本当の強さだと私は思うから
#ifdef DAIJOBU
#include "/home/v-o_o-v/deb.h"
#define deb(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#include <bits/stdc++.h>
#define deb(x...)
#endif 

using namespace std;

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);

	int n;
	cin >> n;
	long long a[n + 1];
	a[0] = 1;
	for(int i = 1; i <= n; i++)a[i] = a[i - 1] * i;
	cout << a[n] << '\n';
	return 0;
}
// Write Here

C++: #include<iostream>

using namespace std;

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

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

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

C++: #include<stdio.h>
#include <string>
#include <iostream>
#include <vector>
#include <sstream>
#include<math.h>
#include <algorithm>
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 <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
#define rep2(i,x,n) for(int i=x; i<(n); i++)
#define ALL(n) begin(n),end(n)
#define INF ((1<<30)-1)
#define LINF (1LL<<60)
#define EPS (1e-10)
typedef long long Int;
typedef pair<Int, Int> P;
struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star;
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n; cin>>n;
    Int ans=1;
    for(int i=1; i<=n; i++) ans*=i;
    cout<<ans<<endl;
    return 0;
}