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;

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

int main(){

	int n;

	cin >> n;

	cout << f(n);

	return 0;
}

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

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

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

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


int main(void){


    int n,fact = 1;


    cin >> n;

    for(int i = 5;i > 0;i--){
        fact *= i;
    }

    cout << fact << endl;
    return 0;
}

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

int fact(ll a){
  if(a==0)
    return 1;
  else
    return a*fact(a-1);
}

int main(){
  ll c;
  cin >> c;
  cout << fact(c) << endl;
}

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

int main(){
  int a[21],b;
  a[1]=1;
  for(int i=2;i<20;i++)a[i]=a[i-1]*i;
  cin>>b;
  cout<<a[b]<< endl;
  return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<string>
#include<map>
#include<algorithm>
#include<queue>
#include <functional>
using namespace std;
int saiki(int n){
  int m;
  if(n == 0){
    return 1;
  }
  m = saiki(n-1);
  return n*m;
}

int main(){
  int n,ans;
  cin >> n;
  ans = saiki(n);
  cout << ans << endl;
}

C++: #include <iostream>

using namespace std;

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

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

ulong factorial(int n){
	ulong s = 1;
	while (n){
		s *= n--;
	}
	return s;
}

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

C++: #include <stdio.h>

int factorial(int n)
{
  return n>1 ? n*factorial(n-1) : 1;
}

int main(void)
{
  int n;
  scanf("%d", &n);

  printf("%d\n", factorial(n));

  return 0;
}

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

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

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

C++: #include<iostream>
using namespace std;
int n,a,ans;
int !(int x){
if(x<1){return 1;}
if(x>=1){
a=!(x-1)*x;
return a;}}

int solve(){
cin>>n;
ans=!(n);
cout<<ans<<endl;}

C++: #include <stdio.h>

long long int ans[22] ;

void init ( ) ;

int main ( )
{
	long long int s ;
	init ( ) ;
	while ( scanf ( "%lld" , &s ) == 1 ) {
		printf ( "%lld\n" , ans[s] ) ;
	}
	return 0 ;
}

void init ( )
{
	ans[0] = 0 ;
	ans[1] = 1 ;
	for ( long long int i = 2 ; i <= 20 ; i++ ) {
		ans[i] = ans[i-1] * i ;
	}
}

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

int main()
{
	int n;
	
	while(cin >> n, n != EOF){
		int total=1;
	
		for(int i = 1; i <= n; i++){
			total *= i;
		}
	
		cout << total << endl;
	}
	return (0);
}

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

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

C++: #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<ctime>
#include<cctype>
#include<climits>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<memory>
#include<functional>

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;

typedef vector<int> vi;
typedef vector<long long> vl;
typedef vector<double> vd;
typedef pair<int, int> pii;
typedef pair<long, long> pll;
typedef long long ll;

int dy[] = { 0, 0, 1, -1, 0 };
int dx[] = { 1, -1, 0, 0, 0 };

long long int f(int n){
	int sum;

	if(n==0||n==1){
		return 1;
	}else{
			return n*f(n-1);
	}
}

int main(){
	ios::sync_with_stdio(false);

	int n;

	scanf("%d", &n);

	printf("%lld\n", f(n));
}

C++: #include <iostream>
#include<string>
#include<cmath>
#include<algorithm>
#include<cctype>
#include<queue>
#include<stack>
#include<stdio.h>
#include<vector>
#include<set>
#include<map>
#include<iomanip>
#define rep(i,n) for(int i=0;i<n;i++)
typedef int long long ll;

using namespace std;
int main(){

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

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


unsigned long long F[20] = {1, 1};

unsigned long long DeQuy(int N)
{
	unsigned long long Temp = 0;
	if (F[N])
		Temp = F[N];
	else
		Temp = N * F[N - 1];
	return Temp;
}

int main()
{
	int N = 0;
	while (cin >> N)
		cout << DeQuy(N) << endl;
	return 0;
}

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

int main()
{
	long long n;

	cin >> n;

	for (long long i = n - 1; i > 0; i--)
		n *= i;

	cout << n << endl;

	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
signed main(){
  long long a,b=1;
  cin>>a;
  for(int i=1;i<=a;i++){
    b=b*i;
  }
  cout<<b<<"\n";
}

C++: #include <iostream>

using namespace std;

unsigned long long t[21] = {0, 1, 2, 6, 24, 120,720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800, 87178291200, 1307674368000, 20922789888000, 355687428096000, 6402373705728000, 121645100408832000, 2432902008176640000};
int main(void){
    int n;
    cin >> n;
    cout << t[n] << endl;
    return 0;
}

C++: #include<iostream>

using namesapce std;

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

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

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

C++: #include <iostream>
#include <stdio.h>
using namespace std;
int main(){
    int n;
    double x=1;
    cin >> n;
    for (int i=1;i<=n;i++){
        x*=i ;
    }
    // cout << x << endl;
    printf("%.0f",x);
}

C++: #include <iostream>

using namespace std;

void factorial(int);

int main() {

	int n;

	cin >> n;
	factorial(n);

	return 0;

}

void factorial(int n) {

	int i;
	double x=1;

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

	cout << x << endl;

}

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

int fact(int x) {
if(x == 1) return 1;
else return x * fact(x-1);
}

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

C++: #include<stdio.h>

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

int main()
{
	int n;
	scanf("%d",&n);
	printf("%d\n",calc(n));
	return 0;
}

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

C++: #include<iostream>

using namespace std;

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

	return 0;
}

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

int main(){
	int n, a = 1;

	cin >> n;

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

	cout << a << endl;

	return 0;
}