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++: /*
NOTE :
*min_element(.begin(),.end())
*max_element(.begin(),.end())
stack push pop top
queue push pop front
priority_queue<> pq
 push()  pop() size()  top()
map<>
 find() begin() end() insert(map<>::value_type())
pair<>
sort(.begin(), .end())
sort(arr, arr+N)
sort(a, a+N, greater<int>())
binary_search(vc.begin(), vc.end(), x)  //binary_search???true, false?????????
vector<int>::iterator lit = lower_bound(vc.begin(), vc.end(), x);
  lower_bound?????????????????????"??\???"????????????????????????????????????????????¬???????????????
vector<int>::iterator uit = upper_bound(vc.begin(), vc.end(), x);
  upper_bound????????????????????????"?¶???????"?????????????????????????????????????????¬???????????????
*/
#include <iostream>
#include <cstdio>
#include <climits>
#include <cmath>
#include <cassert>
#include <sstream>
#include <algorithm>
#include <valarray>
#include <utility>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <map>
#include <set>

#define MAX 100
#define INF 1<<20
#define LLINF 10e12 // 1<<31 // 2^31
#define REP(i,n) for(int i=0;i<n;i++)
#define REP2(i,a,n) for(int i=(a);i<(n);i++)
#define SET(a,c) memset(a,c,sizeof a)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define FOREACH(i,c) for(auto (i) : (c))
#define BIT(i,j) ((i)>>(j))&1
#define ALL(o) (o).begin(), (o).end()
#define ERASE(o) (o).erase(unique(ALL((o))), (o).end());

using namespace std;
typedef long long ll;
typedef valarray<int> array_t;
/////
ll f(ll n)
{
  if(n==0) return 1;
  else return n*f(n-1);
}

int main()
{
  cin.tie(0);
  ios::sync_with_stdio(false);
  // FROM HERE
  ll n;
  cin >> n;
  cout << f(n) << endl;
  return 0;
}

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

using namespace std;

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

C++: #include <iostream>
using namespace std;
int main() {
	int n; cin >> n;
	int fac = 1;
	while (--n) {
		fac *= (n+1);
	}
	cout << fac << endl;
}

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

using namespace std;


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

cin >> n;

while(n>1)	ans*=n--;

cout << ans << endl;

	return 0;
}

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

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\n" , 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 <iostream>
using namespace std;

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

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

unsigned long factorial(int n) {
  int i,x=1;
  for(i=1;i<=n;i++) {
    x*=i;
  }
  return x;
}

int main() {
  
  int n;

  cin >> n;

  cout << factorial(n) << "\n";

  return 0;
}

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

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin>>n;
    int fact=1;
    for(int i=2; i<=n; i++) fact*=i;
    cout<<fact<<'\n';
    return 0;
}

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

using namespace std;

/*-------------------------------*/
#define FOR(i, a, b) for(int i = (a); i < (b); i++)  //a~(b - 1)?????§

typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
/*-------------------------------*/

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

int main(void)
{
  int i;

  cin >> i;
  cout << fact(i) << endl;

  return 0;
}

C++: #include <iostream>

int main(void)
{
  int n = 0;
  std::cin >> n;
  
  int fact = 1;
  
  for (int i = 1; i <= n; i++) {
    fact *= i;
  }
  
  std::cout << fact << std::endl;
  
  return 0;
}

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

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

C++: #include <bits/stdc++.h>
#include <iostream>
#include <numeric>
using namespace std;
int main(){
    ios::sync_with_stdio(false), cin.tie(0);
    long long n;
    cin>>n;
    long long x=1;
    for(long long i=1;i<=n;i++){
        x*=i;
    }
    cout<<x<<endl;
	return 0;
}

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

C++: #include <iostream>

using namespace std;

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

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

C++: #include <iostream>

using namespace std;

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

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

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

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

int main(){
	int n;
	int ans = 1;
	cin >> n;
	while(n){
		ans *= n;
		n--;
	}
	cout << ans << endl;
}

C++: /*
NOTE :
*min_element(.begin(),.end())
*max_element(.begin(),.end())
stack push pop top
queue push pop front
priority_queue<> pq
 push()  pop() size()  top()
map<>
 find() begin() end() insert(map<>::value_type())
pair<>
sort(.begin(), .end())
sort(arr, arr+N)
sort(a, a+N, greater<int>())
binary_search(vc.begin(), vc.end(), x)  //binary_search???true, false?????????
vector<int>::iterator lit = lower_bound(vc.begin(), vc.end(), x);
  lower_bound?????????????????????"??\???"????????????????????????????????????????????¬???????????????
vector<int>::iterator uit = upper_bound(vc.begin(), vc.end(), x);
  upper_bound????????????????????????"?¶???????"?????????????????????????????????????????¬???????????????
*/
#include <iostream>
#include <cstdio>
#include <climits>
#include <cmath>
#include <cassert>
#include <sstream>
#include <algorithm>
#include <valarray>
#include <utility>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <map>
#include <set>

#define MAX 100
#define INF 1<<20
#define LLINF 10e12 // 1<<31 // 2^31
#define REP(i,n) for(int i=0;i<n;i++)
#define REP2(i,a,n) for(int i=(a);i<(n);i++)
#define SET(a,c) memset(a,c,sizeof a)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define FOREACH(i,c) for(auto (i) : (c))
#define BIT(i,j) ((i)>>(j))&1
#define ALL(o) (o).begin(), (o).end()
#define ERASE(o) (o).erase(unique(ALL((o))), (o).end());

using namespace std;
typedef long long ll;
typedef valarray<int> array_t;
/////
int f(int n)
{
  if(n==0) return 1;
  else return n*f(n-1);
}

int main()
{
  cin.tie(0);
  ios::sync_with_stdio(false);
  // FROM HERE
  int n;
  while(cin >> n) cout << f(n) << endl;
  return 0;
}

C++: #include <stdio.h>
/*
2432902008176640000
121645100408832000
6402373705728000
355687428096000
20922789888000
  */
long long fact(long long n){ return n>0 ? fact(n-1)*n : 1LL; }
int main(){
  puts("2432902008176640000"); 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("%ld\n", sum);
	
	return (0);
}

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

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

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


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