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++: #include<cstdio>
using namespace std;

long long int ans[] = {1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800, 87178291200, 1307674368000, 20922789888000, 355687428096000, 6402373705728000, 121645100408832000, 2432902008176640000};

int main(){
  int a;
  scanf("%d", &a);
  printf("%lld\n", ans[a - 1]);
  return 0;
}

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

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

C++: #include<iostream>

int fac(int x) {
	if (x == 1) return 1;
	return x * fac(x - 1);
}

int main() {
	int input;
	while (std::cin >> input) {
		std::cout << fac(input) << std::endl;
	}
	return 0;
}

C++: /*
    ????????°??§???????????¨????????????
*/

#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <limits.h>
#include <float.h>
#include <iostream>
#include <algorithm>
#include <string>
#include <iterator>
#include <vector>
#include <map>
#include <utility>
#define LLU unsigned long long int
#define LL long long int
#define LD long double
using namespace std;
#define Lfmax DBL_MAX
#define LLUmax ULLONG_MAX
#define LLmax LLONG_MAX
#define dmax INT_MAX
#define vd vector<int>
#define vLL vector<long long int>
#define vLLU vector<unsigned long long int> 
#define pb push_back
#define mp make_pair
#define fi first
#define sec second
#define debug printf("asd\n")
#define debugd(a) printf("--%d\n",a)
#define debugdd(a,b) printf("--%d %d\n",a,b)
#define debugarr(a,b) for(int i=0 ; i<b ; i++)printf("%d ",a[i]);printf("\n")
#define newline printf("\n")
#define forin(a,b,c) for(int a=b ; a<c ; a++)
#define forde(a,b,c) for(int a=b ; a>=c ; a--)


inline void scd(int &a){scanf("%d",&a);}
inline void scdd(int &a,int &b){scanf("%d %d",&a,&b);}
inline void sctd(int &a,int &b,int &c){scanf("%d %d %d",&a,&b,&c);}
inline void scdlld(LL &a,LL &b){scanf("%I64d %I64d",&a,&b);}
inline void sclld(LL &a){scanf("%I64d",&a);}

#define scarrd(a,b) for(int index=0 ; index<b ; index++)scanf("%d",&a[index])
#define prdlld(a,b) printf("%I64d %I64d",a,b)
#define prdd(a,b) printf("%d %d",a,b)
#define prd(a) printf("%d",a)
#define prarr(a,b) for(int i=0 ; i<b ; i++)printf("%d ",a[i])
#define iniarr(a,b) for(int i=0 ; i<b ;i++)a[i]=0
#define arr(a,b) int *a=(int *)malloc(b*sizeof(int))
#define llarr(a,b) long long int *a=(long long int *)malloc(b*sizeof(long long int))
#define st(a,b) char *a=(char *)malloc(b*sizeof(char))
#define grav 9.8
#define pi 3.14159265

LL fc[200000];

LL fact(LL a)
{
	if(fc[a]>0)
	return fc[a];
	
	if(a<=1)
	return 1;
	
	fc[a]=a*fact(a-1);
	
	return fc[a];
	
	
}

int main()
{
	iniarr(fc,200000);
	LL n;
	sclld(n);
	printf("%lld\n",fact(n));
	return 0;
}

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

C++: #include<iostream>
main(){long long n,i;std::cin>>n;for(i=n;--n;)i*=n;std::cout<<i<<"\n";}

C++: #include <bits/stdc++.h>
#include <vector>
using namespace std;
int f(int a){
	if(a == 0 || a == 1)
		return 1;
	else
		return a * f(a-1);
}
int n;
int main(){
	cin >> n;
	cout << f(n);
	
	return 0;
}

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

C++: #include <cstdio>
#include <cmath>
#include <algorithm>
using namespace std;

int main() {
    int n;
    long long sum;
    scanf("%d", &n);
    sum = n;
    for (int i = n-1; i >= 2; i--) {
        sum *= i;
    }
    printf("%lld\n", sum);
    return 0;
}

C++: #include<iostream>

using namespace std;

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

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

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

C++: #include <algorithm>
#include <cmath>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <cassert>
#include <functional>

using namespace std;

#define LOG(...) printf(__VA_ARGS__)
//#define LOG(...)
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);++i)
#define REP(i,n) for(int i=0;i<(int)(n);++i)
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define RSORT(c) sort((c).rbegin(),(c).rend())
#define CLR(a) memset((a), 0 ,sizeof(a))

typedef long long ll;
typedef unsigned long long ull;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vb> vvb;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

const int dx[] = { -1, 0, 1, 0 }; const int dy[] = { 0, 1, 0, -1 };


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

C++: #include <iostream>

using namespace std;

int main(int argc, char *argv[]) {
  int n;
  long result;
  cin >> n;
  result = n;

  for (int i = 1; i < n; i++)
    result *= i;

  cout << result << endl;
  return 0;
}

C++: #include <cstdio>

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

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

C++: #include<iostream>
main(){long long n,i;std::cin>>n;for(i=n;--n;)i*=n;std::cout<<i<<"\n";}

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

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <stack>
#include <string>
#include <map>
#include <functional>
#include <cmath>
#include <cstdio>
using namespace std;

int ans = 1;

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

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

C++: #include<iostream>

using namespace std;

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

int main(){

	int n;

	cin >> n;

	cout << f(n) << endl;

	return 0;
}

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

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

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

C++: #include <iostream>
//#include <fstream.h>
//#include <cstring>
using namespace std;

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

int main() {
  
  int n;

  cin >> n;

  cout << factorial(n);

  return 0;
}

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

unsigned long long fac(unsigned long long n)
{
    return n == 1 ? 1 : n * fac(n-1);
}

int main()
{
    unsigned long long n;
    cin >> n;
    cout << fac(n);
    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 << endl;
}