Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(nextString())
	if err != nil {
		fmt.Printf("strconv.Atoi failed: %v\n", err)
	}
	return n
}

func main() {
	scanner.Split(bufio.ScanWords)

	n := nextInt()
	f := 1
	for i := 1; i <= n; i++ {
		f *= i
	}
	fmt.Println(f)
}

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

C++: 
#include <iostream>
using namespace std;
int main(){
    double ans[20];
    int i,n;
    cin>>n;
    for(i=0;i<=n;i++){
        if(i==0){
            ans[0]=1;
        }else{
            ans[i]=ans[i-1]*i;
        }
    }
    cout<<ans[n]<<endl;
    return 0;
}

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

//const static double	de_PI	= 3.14159265358979323846;
//const static int	de_MOD	= 1000000007;
//const static int	de_MAX	= 999999999;
//const static int	de_MIN = -999999999;

int main(void) {

	//std::ifstream in("123.txt");	std::cin.rdbuf(in.rdbuf());

	int n = 0;
	std::cin >> n;

	unsigned long long pro = 1;
	for (int i = n; i >= 1; i--) {
		pro *= i;
	}

	std::cout << pro << std::endl;

}

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

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

C++: #include <sstream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <iostream>
#include <utility>
#include <set>
#include <cctype>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cmath>
using namespace std;
#define INF 1000000000
typedef long long ll;
ll memo[25];

ll dfs(int n) {
    if (memo[n] > 0) return memo[n];
    if (n == 0 || n == 1) return 1;
    else return memo[n] = n * dfs(n-1);
}

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

C++: #include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<set>
#include<string>
#include<functional>
#include<queue>
#include<stack>
#include<math.h>
#define INF 999999

using namespace std;

typedef long long ll;

ll d[22];

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

	d[1] = 1;
	for (int i = 2; i <= n; i++) {
		d[i] = d[i - 1] * i;
	}
	cout << d[n] << endl;
	
	return 0;
}

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

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

  while(cin >> n){

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

  }
 
    cout << ans << endl;
  }

}

C++: #include <iostream>
using namespace std;
factorial(int n){
  return (--n) ? factorial(n):1;
}

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

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

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

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


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

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

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

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

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

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

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

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

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


    return 0;
}

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

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


int main()
{
    long long num;

    cin >> num;

    cout << factorial(num);

    return 0;
}

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

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

typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
#define ALL(a)  (a).begin(),(a).end()
#define REP(i,n) for(int i=0;i<(n);++i)
const double EPS = 1e-10;
const double PI  = acos(-1.0);
#define dump(x) cerr << "  (L" << __LINE__ << ") " << #x << " = " << (x) << endl;
#define dumpv(x) cerr << "  (L" << __LINE__ << ") " << #x << " = "; REP(q,(x).size()) cerr << (x)[q] << " "; cerr << endl;
template<typename T1, typename T2>
ostream& operator<<(ostream& s, const pair<T1, T2>& d) {return s << "(" << d.first << "," << d.second << ")";}

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

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

C++: #include<iostream>

using namespace std;

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

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