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 <stdio.h>

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

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

}

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

using namespace std;

int main() {
  while(!feof(stdin)) {
    int n;
    double sum=1;
    scanf("%d", &n);
    if (feof(stdin)) break;
    for(int i=1;i<=n;i++)
      sum*=i;
    printf("%.0f\n", sum);
  }
}

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

int Kaijo(int n) {
	int m;
	if (n == 0)
		return 1;
	m = Kaijo(n - 1);
	return m*n;
}

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

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