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>
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 << '\n';
	
	return 0;
}

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

int main(){
  long long int f=1;
  int i;

  cin >> i;

  for(; i>1; i--){
      f*=i;
  }

  cout << f << "\n";

  return 0;
}

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

int main()
{
	long long int x;
	cin >> x;
	
	for (int i = x-1; i > 0; --i){
		x *= i;
	}

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

C++: #include <iostream>

using namespace std;

int fact(int n);

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

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

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

int main(){
	double n,ans = 1;
	for(cin>>n;n != 0;n--){
	ans *= n;
}
	printf("%.f\n",ans );
	return 0;
}

C++: #include<stdio.h>

int main(){

int n;
long p=1;

scanf("%d",&n);
for(int i=1;i<=n;i++)
p=p*i;

printf("%ld\n",p);
return 0;

}

C++: /*Filename: aoj0019.cpp
 *Author: Mushiyo
 */

#include <iostream>

using namespace std;

long long factorial(int n){
	long long result = 1;

	for(int i = 1; i <= n; ++i){
		result *= i;
	}

	return result;
}

int main(){
	int n = 0;

    while(cin >> n){
        cout << factorial(n) << 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||20<n)return 0;
  cout<< factorial(n);
}

C++: #include <bits/stdc++.h>
using namespace std;
/* {{{ */
/*-------------------------------*/
struct Fast {Fast(){std::cin.tie(0);ios::sync_with_stdio(false);}} fast;

#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define RFOR(i, a, b) for(int i = (b) - 1; i >= (a); i--)
#define REP(i, n) for(int i = 0; i < (n); i++)
#define rep(i, n) for(int i = 0; i < (n); i++)
#define RREP(i, n) for(int i = (n) - 1; i >= 0; i--)
#define rrep(i, n) for(int i = (n) - 1; i >= 0; i--)
 
#define all(i) (i).begin(),(i).end()
#define rall(i) (i).begin(),(i).end(),greater<int>()
#define CLEAR(ary, i) memset((ary), (i), sizeof(ary))
#define PB push_back
#define pb push_back
#define mp make_pair
#define FST first
#define SEC second
#define fst first
#define sec second

#define int long long

const int INF = 999999999;
const int MOD = 1e9 + 7;
const double PI = acos(-1);
const int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0};

inline int in(){int x;std::cin>>x;return x;}

typedef long long ll;
typedef pair<int, int> pint;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
typedef vector<long long> llv;
typedef vector<pint> vpint;
typedef queue<int> qint;
typedef stack<int> si;
typedef deque<int> dint;

template <typename T> void print(T x) { std::cout << x << '\n'; }
/*-------------------------------*/
/* }}} */

int fact(int n)
{
  if (n == 0) return 1;

  return n * fact(n - 1);
}

signed main()
{
  int a = in();

  cout << fact(a) << '\n';

  return (0);
}

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

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

int main ()
{
    int n;
    cin >> n;
    long long res = 1;

    while (n--) {
        res *= (n + 1);
    }

    cout << res << endl;

    return 0;
}

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

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

int main(){
	unsigned int n;
	std::cin >> n;
	std::cout << factorial(n) << std::endl;
	return 0;
}

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

int main()
{
    int n;
    int ans = 1;
    time_t start = clock();
    cin >> n;
    for(int c = n; c > 1; c--)
    {
        ans *=c;
    }
    cout << ans << endl;
    return EXIT_SUCCESS;
}

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

C++: #include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<set>
#include<string>
#include<functional>
#include<queue>
#include<stack>
#include<math.h>
#define INF 999999

using namespace std;

typedef long long ll;

int d[22];

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

	d[1] = 1;
	for (int i = 2; i <= n; i++) {
		d[i] = d[i - 1] * i;
	}
	cout << d[n] << endl;
	
	return 0;
}

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

C++: #include <iostream> 
#include <cstdio>
#include <algorithm>
using namespace std;
int main(){
	int n,ans=1;
	cin>>n;
	for(int i=n;i>0;i--){
		ans*=i;
	}
	cout<<ans<<endl;
    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 << endl;
  return 0;
}

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

int main(){
  int f=1;
  int i;

  cin >> i;

  if( i>=1 && i<=20 ) {
    while(i>0){
      f*=i;
      i--;
    }
    cout << f << "\n";
  }

  return 0;
}

C++: #include <iostream>

using namespace std;

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

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

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

C++: #include <iostream>
using namespace std;
int main(){
    int n;
	cin >> n;
    long int x = 1;
    for(int i=0; i<n; ++i){
		x = x*(i+1);
    }
    printf("%d",&x);
	return 0;
}