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++: #include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <sstream>
#include <complex>
#include <ctime>
#include <cassert>
#include <functional>
#include <list>
#include <bitset>
#include <cfenv>
#include <numeric>
#include <utility>
#include <cstdio>
#include <fstream>
#include <deque>
#include <limits>
#include <climits>
using namespace std;
typedef pair<int, int> ii;

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

    long long 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 long long ll;

int main() {
    int n;
    ll ret = 1;
    cin >> n;
    for (int i = 1; i <= n; i++) {
        ret *= i;
    }

    cout << ret << endl;
    return 0;
}

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

int main()
{
    int i,rslt=1, n;
    cin>>n;

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


    }
    cout<<rslt<<endl;
    return 0;
}

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

int main()
{
	int i;
	int j;
	long long mul;
	bool stop=false;

	do
	{cin>>i;
	if(i>0 && i<=20)
	{
		mul=1;
	for (j=i;j>1;j--)
	{
		mul*=j;
	}

	cout<<mul<<endl;
	}
	if (i==0)
		cout<<"1"<<endl;
	}while(stop==false);

	return 0;
}

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

C++: #include <iostream>

using namespace std;

long long factorial(int n)
{
	if(n == 1) { return 1LL; }

	return n * factorial(n - 1);
}

int main()
{
	int n;

	cin >> n;

	cout << factorial(n) << endl;

	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int fun(int n){
if(n<=0)return 0;
if(n==1)return 1;
long int ret=n*fun(n-1);
return ret;
}
int main()
{
    long int n,answer;
    cin>>n;
    answer=fun(n);

    cout<<answer<<endl;

    return 0;
}

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

}

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

using namespace std;

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

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

using namespace std;


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

int main(){

	int n;
	cin>>n;
	cout<<fuc(n)<<endl;


	return 0;
}

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

C++: #include <cstdio>

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

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

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

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

C++: #include <iostream>
using namespace std;
long long fact(int n){
  if(n==2) return 2;
  return fact(n-1)*n;
}
 
int main(void){
  int n;
  cin >> n;
  cout << fact(n) << endl;
}

C++: //NoorBaizura bt Mohd Zin
// 1111168

#include <iostream>

using namespace std;

int main()
{
    long long x;
    int count=1;
    
    cin >> x;
    
    for (int i=1; i<=x; i++)
        count *= i;
        
    cout << count;
    
//    system ("pause");
    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 factorial_loop(int n);

int main(void)
{
  int n;
   int result1, result2;


cin>>n;
if(0<n&&n<21) ;
else return 0;
	result1 = factorial_recursive(n);
    result2 = factorial_loop(n);

	cout<<result1<<endl;

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

/**
 * 階乗を計算する(ループ)
 * @param[in] n 整数 
 * @return 階乗
 */
int factorial_loop(int n) {
    int result = 1;
    int k;

    for(k = 1; k <= n; k++) {
        result *= k;
    }
    return result;
}

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

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

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <cassert>

using namespace std;


#define all(c) ((c).begin()), ((c).end())
#define debug(c) cerr << "> " << #c << " = " << (c) << endl;
#define iter(c) __typeof((c).begin())
#define present(c, e) ((c).find((e)) != (c).end())
#define cpresent(c, e) (find(all(c), (e)) != (c).end())
#define tr(i, c) for (iter(c) i = (c).begin(); i != (c).end(); i++)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, a, b) for (int i = (int)(a); i <= (int)(b); i++)

#define mp make_pair
#define fst first
#define snd second
#define pb push_back


const double EPS = 1e-10;


typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef complex<double> P;

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

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

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

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

	return 0;
}

C++: import scala.io.StdIn._
object Main extends App { println((1 to readInt()).map(_.toLong).product) }

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

int fact(int n){
  if(n==0||n==1) return 1;
  return n * fact(n-1);
}

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

C++: #include<iostream>

using namespace std;

int fac(int n)
{
    int res = 1;
    for(int i = n; i > 0; --i)
        res = res * i;
    return res;
}

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

    cout << fac(n) << endl;

    return 0;
}

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

unsigned long long fac(unsigned long long n)
{
    return n == 1 ? 1 : n * fac(n-1);
}

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

C++: #include<stdio.h>

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

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

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <cmath>
#include <algorithm>
#include <string>
#define shosu(x) fixed<<setprecision(x)
using namespace std;
typedef pair<int,int> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,P> pip;
typedef long long ll;
const int inf=(1<<31)-1;
const double pi=acos(-1);

int n,ans=1;

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