Go: package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)

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

C++: //Factorial
#include<bits/stdc++.h>
using namespace std;

typedef long long int ll;

ll stair(ll x){
  if(x==1)return 1;
  else return stair(x-1)*x;
}

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

C++: #include <iostream>

using namespace std;
using LL = long long;

int main() {
    int n;
    cin >> n;
    LL ans = 1;

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

    cout << ans << endl;
}

C++: #include <iostream>

using namespace std;

int main()
{
    int y;
    int x = 1;
    cin >> y;

    while(y != 1)
    {
        x = x*y;
        y--;
    }
    cout << x << endl;
}

C++: #include<iostream>

using namespace std;

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

C++: #include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>

#define ll long long int

using namespace std;
typedef pair<int, int> P;

string str;

int main()
{
  int n;
  ll ans=1;
  int i;
  cin>>n;

  for(i=n;i>1;i--)
    ans*=i;
  cout<<ans<<endl;

}

C++: #include <iostream>

using namespace std;

int main()
{
    int y;
    unsigned int x = 1;
    cin >> y;

    while(y != 1)
    {
        x = x*y;
        y--;
    }
    cout << x << endl;
}

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

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

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

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

using namespace std;

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

	scanf("%lld",&n);
	for(int i = 2; i <= n; i++){
		ans *= i;
	}
	printf("%lld\n",ans);

	return 0;
}

C++: #include <stdio.h>

long long int ans[22] ;

void init ( ) ;

int main ( )
{
	long long int s ;
	init ( ) ;
	while ( scanf ( "%lld" , &s ) == 1 ) {
		printf ( "%lld" , ans[s] ) ;
	}
	return 0 ;
}

void init ( )
{
	ans[0] = 0 ;
	ans[1] = 1 ;
	for ( long long int i = 2 ; i <= 20 ; i++ ) {
		ans[i] = ans[i-1] * i ;
	}
}

C++: #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<ctime>
#include<cctype>
#include<climits>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<memory>
#include<functional>

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;

typedef vector<int> vi;
typedef vector<long long> vl;
typedef vector<double> vd;
typedef pair<int, int> pii;
typedef pair<long, long> pll;
typedef long long ll;

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

long long int f(int n){
	int sum;

	if(n==0||n==1){
		return 1;
	}else{
			return n*f(n-1);
	}
}

int main(){
	ios::sync_with_stdio(false);

	int n;

	scanf("%d", &n);

	printf("%lld", f(n));
}

C++: #include<stdio.h>
#include <string>
#include <iostream>
using namespace std;


int factorial_recursive(int n);

int main(void)
{
  int n;
   int result1;


cin>>n;

//if(0<n&&n<21) ;
//else return 0;

	result1 = factorial_recursive(n);

	cout<<result1<<endl;
	return 0;

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

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) << "\n";
	
	return 0;
}

C++: #include<iostream>

using namespace std;

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

C++: #include<iostream>
#include<cstdlib>
#include<stdio.h>
using namespace std;

int main()
{
 long long int a[25]={1};
 a[0]=0;
 a[1]=1;
 for (int i=2;i<25;i++)
 {
     a[i]=a[i-1]*i;
 }

 int n;

 while (cin >> n)
 {
 cout << a[n] << "\n";
 }

 return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <cassert>
#include <algorithm>
#include <functional>
#include <vector>
#include <string>
#include <cstring>
#include <stack>
#include <queue>
#include <map>
#include <bitset>
#include <sstream>
#include <istream>
#include <cmath>
#include <cstdio>

using namespace std;

#define vci vector<int>
#define vcs vector<string>
#define pb push_back
#define sz size()
#define mapci map<char, int>
#define mapsi map<string, int>
#define all(x) x.begin(), x.end()

#define fora(i, a, b) for (int i=(int)a; i<(int)b; i++)
#define ford(i, a, b) for (int i=(int)a-1; i>=b; i--)
#define foraf(i, a, b, c) for (int i=(int)a; i<(int)b; i += c)
#define fordf(i, a, b, c) for (int i=(int)a-1; i>=b; i -= c)

#define vcitr vector<int>::iterator
#define vcsitr vector<string>::iterator
#define mapcitr map<char, int>::iterator
#define mapsitr map<string, int>::iterator

typedef long long ll;

int iINF = 2147483647;
ll lINF = 9223372036854775807;

template <class T> inline void dbg(T t) { cout << t << endl; }

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

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

C++: #include<stdio.h>

int n,output=1;

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

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 <iostream>
using namespace std;

int main(){
	
	int a,b,c,d;
	
	cin >> a;
	
	for(b=1; b<=a; b++){
		c = 1;
		for(d=b; d>=1; d--){
			c *= d;
		}
	}
	
	cout << c << '\n';
	
	return 0;
}

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

int main(){
  long long int f=1;
  int i;

  cin >> i;

  for(; i>1; i--){
      f*=i;
  }

  cout << f << "\n";

  return 0;
}

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

int main()
{
	long long int x;
	cin >> x;
	
	for (int i = x-1; i > 0; --i){
		x *= i;
	}

	cout << x << endl;

	return 0;
}

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

#define loop(i,a,b) for(int i=a ;i < b ; i++)
#define rep(i,a) loop(i,0,a)
using namespace std;

int main(void){
	int a;
	int sum=1;
	while(cin>>a){
	
	loop(i,1,a+1)sum*=i;
	cout<<sum<<endl;
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

int fact(int n);

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

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

C++: //0019
#include <bits/stdc++.h>
using namespace std;

int main(){
	double n,ans = 1;
	for(cin>>n;n != 0;n--){
	ans *= n;
}
	printf("%.f\n",ans );
	return 0;
}

C++: #include<stdio.h>

int main(){

int n;
long p=1;

scanf("%d",&n);
for(int i=1;i<=n;i++)
p=p*i;

printf("%ld\n",p);
return 0;

}

C++: /*Filename: aoj0019.cpp
 *Author: Mushiyo
 */

#include <iostream>

using namespace std;

long long factorial(int n){
	long long result = 1;

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

	return result;
}

int main(){
	int n = 0;

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

	return 0;
}

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

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

int main(){
  int n;
  cin>>n;
  if(n<1||20<n)return 0;
  cout<< factorial(n);
}