Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(nextString())
	if err != nil {
		fmt.Printf("strconv.Atoi failed: %v\n", err)
	}
	return n
}

func main() {
	scanner.Split(bufio.ScanWords)

	n := nextInt()
	f := 1
	for i := 1; i <= n; i++ {
		f *= i
	}
	fmt.Println(f)
}

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

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

using namespace std;

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

int main(){

	long long n;
	scanf("%lld",&n);
	printf("%lld\n",func(n));

    return 0;
}

C++: //14
#include<iostream>

using namespace std;

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

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

int main()
{
	int x, ans = 1;
	
	scanf("%d", &x);
	
	for (int i = 1; i <= x; i++){
		ans *= i;
	}
	
	printf("%d\n", ans);
	
	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<stdio.h>
#include<iostream>
using namespace std;
int ke(long long int x)
{
    if(x == 1)return 1;
    else return x*ke(x-1);
}
int main()
{
    long long int a,b;
    cin >> a;
    cin >> b;
    b = ke(a);
    printf("%lld\n",b);
    return 0;
}

C++: import java.util.Scanner;
 
public class main {
	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		long x = 1;
		for (int i = 2; i <= n; i++) {
			x = x * i;
		}
		System.out.println(x);
	}
}

C++: #include<iostream> 

using namespace std;

int func(int x) {
	return x <= 1 ? 1 : x * func(x - 1);
}

int main() {
	int n;

	cin >> n;

	cout << func(n);

	return 0;
}

C++: //↓template↓

#include "bits/stdc++.h"
using namespace std;
#define Would
#define you
#define all(n)  n.begin(),n.end()
const long long INF = 1e18;
const long long MOD = 1e9 + 7;
const double pi = acos(-1);
const int SIZE = 1 << 17;
int dx[] = { 1,0,-1,0 }, dy[] = { 0,1,0,-1 }, alp[30];
long long fac[200005], finv[200005], inv[200005];
vector<long long>dij;
struct edge { long long to, cost; };
vector<vector<edge> >G;

long long mod_pow(long long a, long long b) {
	long long res = 1, mul = a;
	for (int i = 0; i < 31; ++i) {
		if (b >> i & 1) {
			res *= mul;
			res %= MOD;
		}
		mul = (mul * mul) % MOD;
	}

	return res;
}

void addedge(int from, int to, int cost) {
	G[from].push_back({ to,cost });
	G[to].push_back({ from,cost });
}

//↑template↑

long long upperfloor(long long n) {
	long long ans = 1;
	while (n) {
		ans *= n;
		--n;
	}
	return ans;
}

int main() {
	int n;
	cin >> n;
	cout << upperfloor(n) << endl;
}

C++: #include <iostream>

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

using namespace std;

int main(){
	long long int n;
	cin >> n;
	cout << factorial(n) << '\n' ;
}

C++: #include <bits/stdc++.h>
#include <numeric>
#define REP(i, s, n) for (int i = s; i < n; ++i)
#define rep(i, n) REP(i, 0, n)
#define SORT(c) sort((c).begin(), (c).end())
#define SORT_INV(c) sort((c).begin(), (c).end(), greater<int>())

#define IINF INT_MAX
#define LLINF LLONG_MAX
#define DEBUG false
#define LL long long
#define Dev 1000000007

// sort(a.begin(), a.end(), std::greater<int>());
using namespace std;

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

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

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

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

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

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

class BigInt {
    static const int base = 10;
    public:
    deque<int> digits;
    BigInt() {
    }
    BigInt(int n) {
        for (;n; n /= base)
            digits.push_back(n % base);
    }
    BigInt operator +(const BigInt x) const {
        BigInt res;

        // add
        auto di = digits.begin(), xi = x.digits.begin(), end = digits.end();
        for (; di != end && xi != x.digits.end(); di++, xi++)
            res.digits.push_back(*di + *xi);

        // set rest
        if (di == end) {
            di = xi;
            end = x.digits.end();
        }
        for (; di != end; di++)
            res.digits.push_back(*di);

        res.normalize();

        return res;
    }
    void operator *=(const int x) {
        for (auto &a : digits)
            a *= x;
        normalize();
    }
    void normalize() {
        int carry = 0;
        for (int i = 0; i < size(); i++) {
            digits[i] += carry;
            carry = digits[i] / base;
            digits[i] %= base;
        }
        if (carry)
            digits.push_back(carry);
    }
    int size() const {
        return digits.size();
    }
    istream &read(istream &is) {
        digits.clear();
        cin.ignore();

        int s;
        while (s = cin.get(), isdigit(s))
            digits.push_front(s - '0');
        is.putback(s);

        return is;
    }
    ostream &write(ostream &os) const {
        for (auto di = digits.rbegin(); di != digits.rend(); di++)
            os << *di;
        return os;
    }
};

istream &operator>>(istream &is, BigInt &b) { return b.read(is); }
ostream &operator<<(ostream &os, const BigInt &b) { return b.write(os); }

int main()
{
    int n;
    BigInt factorial(1);
    cin >> n;

    for (; n; n--)
        factorial *= n;

    cout << factorial << endl;

    return 0;
}

C++: #include <cmath>
#include <iostream>
#include <string>
#include <cstdlib>
#include <cstdio>
#include <algorithm>
#include <sstream>

using namespace std;

int fact(int n){
    if(n==1||n==0) return 1;
    return n*fact(n-1);
}
int main(){
    int n;
    cin >> n;
    cout << fact(n) << endl;
    return 0;
}

C++: #include<iostream>

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

int main()
{
	int x;
	std::cin >> x;
	std::cout << fact( x ) << std::endl;

 	return 0;
}

C++: #include <iostream>
using namespace std;
int main()
{
    int n,sum=1;
    cin>>n;
    for(int a=1;a<=n;a++)
    {

       sum=sum*a;
    }
    cout<<sum<<endl;
    return 0;
}

C++: #include<iostream>
#include<queue>
#include<string>
#include<stack>
#include<cstdio>
#include<algorithm>

using namespace std;

int main(void)
{
  int i;
  int n;
  int sum=1;

  cin>>n;

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

  cout<<sum<<endl;

}

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

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