Go: package main

import (
        "fmt"
)

func main() {
        var n int
        fmt.Scanf("%d", &n)
        fmt.Println(fact(n))
}

func fact(n int) (f uint64) {
        if n < 2 {
                return uint64(1)
        } else {
                return fact(n-1) * uint64(n)
        }
}

C++: #include<iostream>

long long calc(int n){

	if (n == 1)return 1;

	return n*calc(n - 1);

}

int main(){

	int n;
	std::cin >> n;

	std::cout << calc(n) << std::endl;

	return 0;
}

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

int main(int argc, char **argv)
{
 int n, tmp;
 cin >> n;
 tmp = 1;
 while(n > 1){
  tmp *= n;
  n--;
 }
 cout << tmp << endl;
 return 0;
}

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

int main() {
	int n;
	long long d=1;
	cin >> n;
	for (int i = 0; i < n; i++){
		d *= (i + 1);
	}
	cout << d;
	char c;
	cin >> c;
}

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

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

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

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

int f(int n){
	return (n == 0 ? 1 : n * f(n-1));
}
int main(){
	int n;
	cin >> n;
	cout << f(n) << endl;
}

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

C++: #include<iostream> //header file
 
using namespace std;
 
int main()
 
{
 
    long long n,fact=1; 
 
    cout<<" Enter Number:  ";
 
    cin>>n;
 
    for(int i=1;i<=n;i++)
 
    {
 
        fact=fact*i; 
 
    }
 
     cout<<fact;
 
     return 0;
 
}

C++: #include <iostream>

using namespace std;

int f(int n){

if (n==1) return 1;
if (n==2) return 2;

return n*f(n-1);}


int main(){
 
cout<< "enter n:";
int n;
cin >>n;
cout<<f(n)<<endl;
return 0;
}

C++: 
#include<stdio.h>

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

C++: #include <iostream>
#include<math.h>
#include<iomanip>
#include<vector>
#include<algorithm>
#include<functional>
using namespace std;

int main()
{
    int  a=0,b=0,i=0;
    cin >> a;
    b=1;
    for(i=0;i<a;i++){
        b=b*(i+1);

    }#include <iostream>
#include<math.h>
#include<iomanip>
#include<vector>
#include<algorithm>
#include<functional>
using namespace std;

int main()
{
    int  a=0,b=0,i=0;
    cin >> a;
    b=1;
    for(i=0;i<a;i++){
        b=b*(i+1);
    }

    cout << b << endl;



    //cout << endl;

return 0;

}


    cout << b << endl;



    //cout << endl;

return 0;

}

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

int main()
{

	int i, num, total=1;
	
	cout << "Enter an integer : " << endl;
	cin >> num;
	
	for(i=1;i<=num;i++)
	total *=i;
	
	cout << total;
		
	return 0;
	
	}

C++: #include <iostream>
#include <string>
#include <stack>
#include <math.h>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <vector>

using namespace std;

long long f(long long m) {
	if (m == 0) return 1;
	else return m*f(m - 1);
}




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

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;
	long long int ans=1;
	while(n){
		ans*=n;
		n--;
	}
	cout << ans << endl;

}

C++: #include<iostream>
#include<sstream>
#include<fstream>
#include<cstdio>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<deque>
#include<map>
#include<set>
#include<algorithm>
#include<cmath>
#include<cstdlib>
#include<string>
using namespace std;

long long fac(int n){
	long long ret = 1;
	for(int x=2;x<=n;++x)ret *= x;
	return ret;
}

int main(){
	int n;
	while(scanf("%d",&n)==1){
		cout<<fac(n)<<endl;
	}
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
 
#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 IINF INT_MAX
#define LLINF LLONG_MAX
 
typedef long long ll;
typedef pair<int, int> ii;
 
int main(){

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

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

C++: #include <iostream>
using namespace std;
int main( void )
{
	int n;
	cin >> n;

	int f = 1;
	for ( int i = 2; i <= n; i++ )
	{
		f *= i;
	}

	cout << f << endl;

}

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

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

int main(){
	int input;
	cin >> input;
	cout << factorial(input) << endl;
	return 0;
}

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

using namespace std;

#define N 10005   
int main(){
	int i,j,len;
	int n;
	while(scanf("%d",&n) != EOF) {  
		if(n == 0 || n == 1) {
			printf("1\n");
			continue;
		}
		long s[N]={1, 1};
		len = 1;
		for(i = 2;i <= n; i ++){
			for(j = 0; j < len; j ++)
				s[j] = s[j] * i;
			for(j = 0;j < len - 1; j ++) {
				s[j + 1] += s[j] / 10000;
				s[j] = s[j] % 10000;
			}
			if(s[j] > 10000 ) {
				s[j + 1] = s[j] / 10000;
				s[j] = s[j] % 10000;
				len ++;       
			}
		}
		printf("%d",s[len - 1]);
		for(j = len - 2; j >= 0; j --)
			printf("%04d", s[j]);
		printf("\n");
	}   
	return 0;
}

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

long kaijou(long);
long n;

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

	return 0;
}

long kaijou(long i){
	if(i == 0){
		return 1;
	} else {
		return i * kaijou(i-1);
	}
}