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
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#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>

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 long long LL;
typedef unsigned long long ULL;

//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(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

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

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

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

int main() {
  int n;

  cin >> n;

  cout << factrial(n) << endl;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <utility>
#include <iomanip>
#include <functional>
#include <queue>
#include <stack>
#include <cmath>
#define INF 100000000
#define MOD 1000000007
using namespace std;


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

C++: 
 #include <string>
 #include <vector>
 #include <algorithm>
 #include <iostream>
 #include <cstdio>
 #include <cstdlib>
 #include <cmath>
 #include <queue>
 #include <map>
 #define INF 100000000
 
 using namespace std;
 typedef long long ll;
 
 int num[21]={0};
 
 long long int kai(int n){
 if(num[n]!=0)return num[n];
 else{
 num[n]=n*kai(n-1);
 return num[n];
 }
 }
 
 int main(){
 int n;
 num[0]=num[1]=1;
 cin>>n;
 cout<<kai(n)<<endl;
 }

C++: #include <stdio.h>
int main()
{
	int n;
	char a[21][50] = 
	{"1","1","2","6","24","120","720","5040","40320","362880","3628800",
		"39916800","479001600","6227020800","87178291200","1307674368000","20922789888000","355687428096000","6402373705728000","121645100408832000","2432902008176640000"
	};
	while(scanf("%d",&n) != EOF){
		printf("%s\n",a[n]);
	}
	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", nkai(n));
	return 0;
}

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

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

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

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

using namespace std;

long long f(int n)
{
  if (n == 0) return 1;
  return f(n - 1) * n;
}
int main()
{
  int n;
  scanf("%d", &n);
  printf("lld", f(n));
  return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <sstream>
#include <stdio.h>
#include <vector>
#include <stack>
#include <queue>
#include <algorithm>
#include <math.h>
#include <utility>
#include <string>
#include <ctype.h>
#include <cstring>
#include <cstdio>
#include <sstream>
#include <functional>

using namespace std;

#define FOR(i,k,n) for(int i = (k); i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define INF 114514810
#define ll long long
//#define scanf scanf_s

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

C++: #include<iostream>
#include <stdio.h>
using namespace std;
 
int main(){
	int a;
	cin>>a;
	if(a==1){
	cout<<1<<endl;}
	if(a==2){
	cout<<2<<endl;}
	if(a==3){
	cout<<6<<endl;}
	if(a==4){
	cout<<24<<endl;}
	if(a==5){
	cout<<120<<endl;}
	if(a==6){
	cout<<720<<endl;}
	if(a==7){
	cout<<5040<<endl;}
	if(a==8){
	cout<<40320<<endl;}
	if(a==9){
	cout<<362160<<endl;}
	if(a==10){
	cout<<3621600<<endl;}
	if(a==11){
	cout<<39916800<<endl;}
	if(a==12){
	cout<<479001600<<endl;}
	if(a==13){
	cout<<6227020800<<endl;}
	if(a==14){
	cout<<87178291200<<endl;}
	if(a==15){
	cout<<1307674368000<<endl;}
	if(a==16){
	cout<<20922789888000<<endl;}
	if(a==17){
	cout<<355687428096000<<endl;}
	if(a==18){
	cout<<6402373705728000<<endl;}
	if(a==19){
	cout<<121645100408832000<<endl;}
	if(a==20){
	cout<<2432902008176640000<<endl;}
	return 0;}

C++: #include <iostream>

using namespace std;

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

C++: #include<stdio.h>
long long facto(long n);
int main()
{
    long n;
    long long x;
    scanf("%ld",&n);
    x= facto(n);
    printf("%ul\n",x);
    return 0;
}
long long facto(long n)
{
    if(n!=1)
     return n*facto(n-1);
}

C++: #include <iostream>

using namespace std;

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

	cin>>n;

	for (int i=n;i>=1;i--){
		factor_n=factor_n*i;
	
	}

	cout<<"Factor of "<<n<<": "<<factor_n<<endl;

	system ("PAUSE");
	return 0;
}

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

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

	for( i=1;i<=n;i++ ){
		f*=i;
	}
	cout << f << endl;
	return 0;
}

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

int main()
{

    long long fucker=1,siam;
    scanf("%lld",&siam);
    for(int i=siam;i>0;i--)
        fucker*=i;
    printf("%lld\n",fucker);
}

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 facctorialMethod(int k);

int main(){
    int number;
    cin>>number;
    cout<<facctorialMethod(number)<<endl;
}

int facctorialMethod(int k){
    int sum = 1;
    for (int i = 1; i <= k; ++i)
    {
        sum *= i;
    }
    return sum;
}

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

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

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

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

int main(){

  int n;

  cin>>n;
  cout<<f(n)<<endl;

  return 0;
}

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