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

int main(){
    int i,n;
    unsigned long long f=1;
    scanf("%d",&n);
    for(i=2;i<=n;i++){
        f*=i;
    }
    printf("%lld\n",f);
}

C++: #include <iostream>

using namespace std;

int main(){
	long long int list[21];
	list[0]=1;
	int n;
	cin >> n;
	for(int i=1;i<=n;i++)
		list[i]=list[i-1]*i;
	cout << list[n] << endl;
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>	// require sort next_permutation count __gcd reverse etc.
#include <cstdlib>	// require abs exit atof atoi 
#include <cstdio>		// require scanf printf
#include <functional>
#include <numeric>	// require accumulate
#include <cmath>		// require fabs
#include <climits>
#include <limits>
#include <cfloat>
#include <iomanip>	// require setw
#include <sstream>	// require stringstream 
#include <cstring>	// require memset
#include <cctype>		// require tolower, toupper
#include <fstream>	// require freopen
#include <ctime>		// require srand
#define rep(i,n) for(int i=0;i<(n);i++)
#define ALL(A) A.begin(), A.end()

using namespace std;

typedef long long ll;
typedef pair<int, int> P;
ll f[22];

int main()
{
//	cut here before submit 
//	freopen ("testcase.dat", "r", stdin );
	memset (f, 0LL, sizeof (f ) );
	f[0] = 1LL;
	f[1] = 1LL;
	for (int i = 2; i <= 20; i++ ){
		f[i] = (ll)i*f[i-1];
	} // end for
/*
	rep (i, 21 ){
		cout << f[i] << endl;
	} // end rep
*/
	string str = "";
	while (getline (cin, str ) ){
		stringstream ss (str );
		int n;
		ss >> n;
		cout << f[n] << endl;
	} // end loop
		
	return 0;
}

C++: #include <iostream>

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

int main()
{
    unsigned n;
    std::cin >> n;
    std::cout << fact(n) << std::endl;
}

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;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <cmath>
#include <stack>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
using namespace std;

void factorial(int n){
	int fact[10] = {0};
	fact[0] = 1;
	for(int i=1; i<=n; i++){
		REP(j, 10){
			fact[j] *= i;
		}
		REP(j, 9){
			fact[j+1] += fact[j] / 10000;
			fact[j] -= (fact[j] / 10000) * 10000;
		}
	}
	int i;
	for(i=9; i >= 0; i--) {
		if (fact[i] != 0) {
			printf("%d", fact[i]);
			i--;
			break;
		}
	}
	while (i >= 0) {
		printf("%04d", fact[i]);
		i--;
	}
	cout << endl;
}

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

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

using namespace std;

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

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

using namespace std;
typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<ll> VL;
typedef vector<VL> VVL;
typedef pair<int, int> PII;

#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
#define IN(a, b, x) (a<=x&&x<b)
#define MP make_pair
#define PB push_back
#define MOD 1000000007
#define INF (1LL<<30)
#define LLINF (1LL<<60)
#define PI 3.14159265359
#define EPS 1e-12
//#define int ll

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

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

C++: //0019 Factorial

//nツつェツ禿シツ療債つウツづェツづゥ(ツつスツつセツつオ0<=n<=20)nツづ個階ツ湘ヲツづーツ出ツ療債つケツづヲ

//20!ツづ絞ntツづ可つィツつウツづ慊づィツづ慊つケツづア

#include<iostream>
using namespace std;
int main(void)
{
	long long n;
	cin >> n;
	long long x = 1;
	while(n)
	{
		x *= n;
		n--;
	}
	cout << x << endl;
	return 0;
}

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

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

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <set>
#include <map>
#include <list>
#include <iterator>
#include <queue>
#include <stack>
#include <deque>
#include <sstream>
#include <algorithm>
#include <numeric>
#include <string>
#include <cmath>
#include <complex>
#include <functional>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cassert>
#include <cstdlib>
#include <cctype>

#define REP(i,m,n) for(int i=m;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define rp(i,c) rep(i,(int)c.size())
#define fr(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)
#define mp make_pair
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define rall(u) (u).rbegin(),(u).rend()
#define dbg(x) cerr<<#x<<" = "<<(x)<<endl
#define v_delete(a,b) (a).erase(remove((a).begin(), (a).end(), b), (a).end())
#define v_unique(a) (a).erase(unique((a).begin(), (a).end()), (a).end())
#define VV(T) vector<vector< T > >
#define init(a,b) memset((a), (b), sizeof((a)))
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pi;
const int inf=1<<28;
const double INF=1e10,EPS=1e-9;


template<class T>int SIZE(T a){return a.size();}
template<class T>string IntToString(T num){string res;stringstream ss;ss<<num;return ss.str();}
template<class T>T StringToInt(string str){T res=0;for(int i=0;i<SIZE(str);i++)res=(res*10+str[i]-'0');return res;}
template<class T>T gcd(T a,T b){if(b==0)return a;return gcd(b,a%b);}
template<class T>T lcm(T a,T b){return a/gcd(a,b)*b;}

template <class T> void input(T& a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }
template <class T> void input(T* a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }
typedef pair<int,int> pii;

inline bool IN(int x, int y, int w, int h)
{
    return 0 <= x && x < w && 0 <= y && y < h;
}


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

}

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

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

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

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

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>
#include<stdio.h>
using namespace std;
int factorial(int D) {
	return D > 0 ? D*factorial(D - 1) : 1;
}
int main() {
	int n;
	cin >> n;
	cout << factorial(n) << endl;
	return 0;
}

C++: #include <iostream>

using namespace std;

int main(){
  unsigned long int n = 1,m;

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

  cout << n << endl;

  return 0;
}

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

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

C++: #include <iostream>
#include <cmath>
using namespace std;
int main() {
  int a;
  cin >> a;
  cout << tgamma(a) << endl;
  return 0;
}