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<stdio.h>

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

int main()
{
    int n;
    long f;


    while(scanf("%d",&n)==1)
    {
        if(n<=0)
            printf("no factorial\n");
        else

        {
            f=factorial(n);
            printf("%ld\n",f);
        }
    }
    return 0;

}

C++: //============================================================================
// Name        : 0019.cpp
// Author      : 
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
using namespace std;

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

C++: #include <stdio.h>

long long int ans[22] ;

void init ( ) ;

int main ( )
{
	long long int s ;
	init ( ) ;
	while ( scanf ( "%I64d" , &s ) == 1 ) {
		printf ( "%I64d" , 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++: nclude<iostream>
using namespace std;

int main(){
  int n,i;
long long asn;

  while(cin >> n){

  ans=1;
  for(i=0;i<n;i++){
    ans=ans*(n-i);

  }
 
    cout << ans << endl;
  }

}

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;

int 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>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <string>
#include <math.h>
#include <functional>
#include <algorithm>

typedef long long Int;
#define REP(i,n) for(int i = 0 ; i < n ; ++i)
using namespace std;

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

int main(){
	int a;
	cin >> a;
	cout << F(a) << endl;
	return 0;
}

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

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

C++: #include <cstdio>
#include <cmath>
int main()
{
        long long n,i,fac;
        scanf("%lld",&i);
        fac=1;
        for(;i>1;i--)
                {
                        fac=fac*i;
                }

        printf("%lld\n",fac);

        return 0;

}

C++: #include <stdio.h>

int main(void){
	int f = 1;
	int a = 0;
	scanf("%d",&a);
	while(a){
	f *= a;
	a--;
	}
	printf("%d\n",f);
	return 0;
}

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

using namespace std;
typedef unsigned long long ull;

int main()
{

	int n;
	ull ans=1;

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

	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 *= i+1;
	}
	printf("%d\n", Fraction);
	return 0;
}

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

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

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++: nclude<iostream>
using namespace std;

int main(){
  int n,i,ans;

  while(cin >> n){

  ans=1;
  for(i=0;i<n;i++){
    ans=ans*(n-i);

  }
 
    cout << ans << endl;
  }

}

C++: #include <stdio.h>

long long int fact(long long int n){
  return (n==0)? 1 : n*fact(n-1);
}

int main(){
  long long int n;
  scanf("%lld", &n);
  printf("%lld\n", fact(n));
}

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

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

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

C++: /****************************************************************************************
   *  Md. Abdulla Al Mamun (Nayon)
   *  ID: 1306001
   *  Session: 2013-2014
   *  Department of Computer Science and Engineering
   *  Begum Rokeya University, Rangpur (BRUR)
   *
   *  Project Name:			factorial n
   *  File Created:			Monday, 2015-10-26-22.20.20
   *  Current File:			D:\My Codes\C and C++\Code-Blocks Projects\factorial n\main.cpp
   *  Language:				English (U.S.)
   *  Encoding:				windows-1252
*****************************************************************************************/
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <math.h>
#include <algorithm>
#include <iostream>
#include <vector>
#include <string>
#include <queue>
#include <stack>
#include <ios>
#include <set>
#include <map>

using namespace std;

#define PI acos(-1.0)
#define EPS 1e-9
#define INF 1 << 28
#define all(x) (x).begin(), (x).end()
#define pb() push_back()
#define ppb pop_back
#define mp(a, b) make_pair(a, b)
#define endl '\n'
#define MAX 100000

typedef pair<int, int> pii;

//#define isValid(a, b) ((a >= 0 && a < b) ? 1 : 0)
//int dr[]  =  {0, -1, -1, -1,  0,  1, 1, 1};
//int dc[]  =  {1,  1,  0, -1, -1, -1, 0, 1};

int main()
{
	//freopen("in.txt", "r", stdin);
	ios_base::sync_with_stdio(false); cin.tie(NULL);
    unsigned long long fact = 1, n;
    cin >> n;
    if(n == 0)
        cout << 1 << endl;
    else{
        for(unsigned long long i = 1; i <= n; i++)
            fact *= i;
        cout << fact << endl;
    }
	return 0;
}

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

ll memo[MAX+1];
ll factorial(int n) {
  if(n == 0) return memo[n] = 1;
  else if(n == 1) return memo[n] = 1;
  else if(memo[n] != 0) return memo[n];
  return memo[n] = n*factorial(n-1);
}

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

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

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

C++: #include <stdio.h>
 
int main()
{
        int n, result;
 
        scanf("%d", &n);
 
        result = 1;
 
        while(n>0)
                result *= (n--);
 
        printf("%d\n", result);

        return 0;
}

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

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

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

return 0;
}