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 <bits/stdc++.h>

#define rep(i, n) for (int i = 0; i < int(n); i++)
#define rrep(i, n) for (int i = int(n) - 1; i >= 0; i--)
#define reps(i, n) for (int i = 1; i <= int(n); i++)
#define rreps(i, n) for (int i = int(n); i >= 1; i--)
#define repc(i, n) for (int i = 0; i <= int(n); i++)
#define rrepc(i, n) for (int i = int(n); i >= 0; i--)
#define repi(i, a, b) for (int i = int(a); i < int(b); i++)
#define repic(i, a, b) for (int i = int(a); i <= int(b); i++)
#define each(x, y) for (auto &x : y)
#define all(a) (a).begin(), (a).end()
#define bit(b) (1ll << (b))

using namespace std;

using i32 = int;
using i64 = long long;
using u64 = unsigned long long;
using f80 = long double;
using vi32 = vector<i32>;
using vi64 = vector<i64>;
using vu64 = vector<u64>;
using vf80 = vector<f80>;
using vstr = vector<string>;

inline void yes() { cout << "Yes" << '\n'; exit(0); }
inline void no() { cout << "No" << '\n'; exit(0); }
inline i64 gcd(i64 a, i64 b) { if (min(a, b) == 0) return max(a, b); if (a % b == 0) return b; return gcd(b, a % b); }
inline i64 lcm(i64 a, i64 b) { return a / gcd(a, b) * b; }
inline u64 xorshift() { static u64 x = 88172645463325252ull; x = x ^ (x << 7); return x = x ^ (x >> 9); }
void solve(); int main() { ios::sync_with_stdio(0); cin.tie(0); cout << fixed << setprecision(16); solve(); return 0; }
template <typename T> class pqasc : public priority_queue<T, vector<T>, greater<T>> {};
template <typename T> class pqdesc : public priority_queue<T, vector<T>, less<T>> {};
template <typename T> inline void amax(T &x, T y) { if (x < y) x = y; }
template <typename T> inline void amin(T &x, T y) { if (x > y) x = y; }
template <typename T> inline T power(T x, i64 n, T e = 1) { T r = e; while (n > 0) { if (n & 1) r *= x; x *= x; n >>= 1; } return r; }
template <typename T> istream& operator>>(istream &is, vector<T> &v) { each(x, v) is >> x; return is; }
template <typename T> ostream& operator<<(ostream &os, vector<T> &v) { rep(i, v.size()) { if (i) os << ' '; os << v[i]; } return os; }
template <typename T, typename S> istream& operator>>(istream &is, pair<T, S> &p) { is >> p.first >> p.second; return is; }
template <typename T, typename S> ostream& operator<<(ostream &os, pair<T, S> &p) { os << p.first << ' ' << p.second; return os; }

void solve() {
  i64 n; cin >> n;
  i64 ans = 1;
  reps(i, n) ans *= i;
  cout << ans << '\n';
}

C++: #define _USE_MATH_DEFINES
 
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <vector>
#include <math.h>

using namespace std;

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

int main(){
	unsigned long long i;
	
	cin >> i;
	cout << fact(i) << endl;

	return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<cmath>
#include<string>
#include<tuple>
#include<utility>
#include<stack>
#include<queue>
#include<deque>
#include<set>
#include<iomanip>
#include<map>
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
const int INF = 1e9 + 7;
int dx[8] = { 1,0,-1,0,1,1,-1,-1 };
int dy[8] = { 0,1,0,-1,1,-1,1,-1 };

ll solve(ll n) {
	if (n == 1) {
		return 1;
	}
	return n * solve(n - 1);
}


int main() {

	ll n;
	while (cin >> n) {

		cout << solve(n) << 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=x*(n - i);
	}
	cout << x <<endl;
	return 0;

}

C++: #include <bits/stdc++.h>
#define rep(i,l,n) for(int i=l;i<n;i++)
using namespace std;

int main(){
	int n;
	long long int ans=1;
	cin>>n;
	rep(i,1,n+1){
		ans*=i;
	}
	cout<<ans<<endl;
}

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

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

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

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

C++: #include <iostream>

using namespace std;

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

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

using namespace std;

int main()
{
	int n;
	long ans = 1;

	string s[] = {
"0", 
"1", 
"2", 
"6", 
"24", 
"120", 
"720", 
"5040", 
"40320", 
"362880", 
"3628800", 
"39916800", 
"479001600", 
"6227020800", 
"87178291200", 
"1307674368000", 
"20922789888000", 
"355687428096000", 
"6402373705728000", 
"121645100408832000", 
"2432902008176640000", 
};

	while (cin >> n) {
		cout << s[n] << endl;
	}
	return 0;
}

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

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

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


int main(void){


    int n,fact = 1;

    cin >> n;

    for(int i = n;i > 0;i--){
        fact *= i;
    }

    cout << fact << endl;
    return 0;
}

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

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

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

C++: #include <iostream>

using namespace std;

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

C++: /*
AizuOnline A0019
Factorial
*/
#include <stdio.h>

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



main()
{
long int n;

scanf("%ld",&n);

  printf("%lu\n",fact(n));

return(0);
}

C++: # include <iostream>
# include <algorithm>
# include <vector>
# include <string>
# include <set>
# include <map>
# include <cmath>
# include <iomanip>
# include <functional>
# include <utility>
# include <stack>
# include <queue>
# include <list>
# include <bitset>
# include <complex>
# include <numeric>
using namespace std;
using LL = long long;
using ULL = unsigned long long;
constexpr long long MOD = 1000000000 + 7;
constexpr int INF = 2000000000;
constexpr int HINF = INF / 2;
constexpr double DINF = 100000000000000000.0;
constexpr long long LINF = 9223372036854775807;
constexpr long long HLINF = 4500000000000000000;
const double PI = acos(-1);

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

C++: #include<stdio.h>
#include<math.h>
#include<stdlib.h>
int main()
{
    long long num = 1;
    for(int i = 1 ;i <= num ;i++)
    {
       num = num * i;
    }
    printf("%I64d",num);
    
    return 0;

}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <set>
#include <cmath>
#include <algorithm>
using namespace std;

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

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

C++: #include<iostream>
#include<math.h>
#include <iomanip>
using namespace std;
int main() {
	int n=5;
	int x=1;
	cin >> n;
	while (true) {
		if (n == 0) {
			break;
		}
		x *= n;
		n = n--;
	}
	cout << x;
	return 0;

}

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

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

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

C++: #include <iostream>

using namespace std;

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

long long Fact(int n){
  long long fact=1;
  for( int i=1;i<=n;i++ ){
    fact*=i;
  }
  return fact;
}