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 <algorithm>
#include <cstdio>

using namespace std;

double fact(double x);

int main(void) {
	double n;
	while(1) {
		cin >> n;
		if(cin.eof())		break;
		
		printf("%.0f\n", fact(n));
	}
	
	return 0;
}

double fact(double x) {
	if(x == 0) {
		return 1;
	}
	return x * fact(x - 1);
}

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

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

	return 0;

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

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

C++: #include<iostream>

using namespace std;

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

C++: #include <iostream>
#include<math.h>
#include<iomanip>
#include<vector>
#include<algorithm>
#include<functional>
using namespace std;

int main()
{
    int  a=0,b=0,i=0;
    cin >> a;
    b=1;
    for(i=0;i<a;i++){
        b=b*(i+1);

    }

    cout << b << endl;



    //cout << endl;

return 0;

}

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

C++: //include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>
#include <complex>
#include <math.h>
using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<long, long> PLL;
typedef long long LL;
//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(long i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

const long double EPS = 1e-12;
const double INF = 1e12;


int main(){
	int n;
	cin>>n;
	LL res=1;
	REP(i,n)res*=(i+1);
	cout<<res<<endl;
	return 0;
}

C++: #include <iostream>

using namespace std;

long long fact(int n);

int main ()
{
	int n;

	cin >> n;

	cout << fact(n) << endl;

	return 0;
}

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

	return (n * fact(n - 1));
}

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

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

int fact(int number) {
    long r=0;
    for(int i=number; i>=1; i--)
{
r = r*i;
}
return r;
}
 
int Main() {

int num=0;
long result =0;

cin >> num;

result = fact(num);

cout<<result;

    
}

C++: #include <stdio.h>
#include <iostream>

using namespace std;

int main() {
	int a;
	int seki[20] = {1};
	int l;

	cin >> a;

	for (int i = 1; i <= a; i++) {
		for (int j = 0; j < 20; j++) {
			seki[j] *= i;
		}

		for (int j = 0; j < 20; j++) {
			if (seki[j] >= 10) {
				seki[j+1] += seki[j] / 10;
				seki[j] = seki[j] % 10;
			}
		}
	}

	for (int i = 19; i >= 0; i--) {
		if(seki[i] != 0) {
			l = i;
			break;
		}
	}

	for (int k = l; k >= 0; k--) {
		cout << seki[k];
	}

	cout << endl;

	return 0;
}

C++: #include <stdio.h>

long long nl[21];

long long nkai(int n){
	if(nl[n] != 0){
		return nl[n];
	}
	nl[n] = n * nkai(n - 1);
	return nl[n];
}

int main(void){
	int n = 0;
	for(int i=0; i<21; ++i){
		nl[i] = 0;
	}
	nl[0] = nl[1] = 1;

	scanf("%d", &n);
	printf("%lld\n", nkai(n));
	return 0;
}

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


int main(){
  long long ans =1;
  int n;
  scanf("%d", &n);

  for(int i=n;i>1;--i)
    ans*=i;
  printf("%lld\n",ans);

  return EXIT_SUCCESS;
}

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


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

  vector<int64_t> a(21);

  a[0] = 1;
  for(int64_t i=0; i<n; i++){
    a[i+1] = a[i] * (i+1);
  }

  cout << a[n] << endl;

}

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;   
  }
  if(n == 0)cout << 0 << endl;
  else cout << ans << endl;
}

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

int main(){

int n;
long long x;
long long sum=1;

cin >> n;

for(x=1; x<=n; x++)
{
 sum = sum * x;         
}    

cout << sum << endl;

return 0;

}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<map>
#include<string>
#include<cmath>
#include<numeric>
using namespace std;


int main(void) {

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

C++: #include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
using namespace std;
#define f(i,n) for(i=1; i<=n;i++)
int main(){
    int s=1,n,i,a,b,k;
    char c;
    scanf("%d", &n);
    f(i,n)
        s=s*i;                   
    printf("%d", s);
    cout<<endl;
    return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES

#include "bits/stdc++.h"
#define REP(i,a,b) for(int i=a;i<b;++i)
#define rep(i,n) REP(i,0,n)
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define ALL(a) begin(a),end(a)
#define ifnot(a) if(not (a))
#define dump(x)  cerr << #x << " = " << (x) << endl
using namespace std;

// #define int ll
#ifdef _MSC_VER
const bool test = true;
#else 
const bool test = false;
#endif

int dx[] = { 0,1,0,-1 };
int dy[] = { 1,0,-1,0 };
#define INF (1 << 28)
ull mod = (int)1e9 + 7;
//.....................
const int MAX = (int)2e5 + 5;

ll factorial(ll n) {
	if (n == 0) return 1;
	return n * factorial(n-1);
}

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

C++: #include <iostream>

int main()
{
    int n;
    std::cin >> n;
    int s = 1;
    for(std::size_t i = 2; i <= n; ++i){
        s *= i;
    }
    std::cout << s << std::endl;
    return 0;
}

C++: #include <bits/stdc++.h>
#include <vector>
using namespace std;
long long f(long long a){
	if(a == 0 || a == 1)
		return 1;
	else
		return a * f(a-1);
}
long long n;
int main(){
	cin >> n;
	cout << f(n) << "\n";
	
	return 0;
}

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

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

	int64_t a = 1;
	int x = n;
	for (int i = 0; i < n; i++) {
		a *= x;
		x--;
		//cout << i << endl;
	}

	cout << a << endl;
}

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

using namespace std;

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

	uint64_t f = 1;
	for (int i = 1; i <= n; ++i)
		f *= i;

	cout << f << endl;

	return 0;
}