Go: package main

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

var sc = bufio.NewScanner(os.Stdin)
func readInt() int64 {
    sc.Scan()
    n, _ := strconv.Atoi(sc.Text())
    return int64(n)
}


func main() {
    var ans int64 = 1
    var n int64 = readInt()
    var i int64
    for i = 1; i <= n; i++ {
        ans *= i
    }
    fmt.Println(ans)
}

C++: #include <iostream>

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

int main() {
	int n;
	std::cin >> n;
	std::cout << fractorial(n) << std::endl;
	return 0;
}

C++: #include <stdio.h>
typedef long long LL;

int main() {
	LL F[21]; 
	F[0] = 1;
	for(int i = 1; i <= 20; ++i) F[i] = F[i - 1] * i;
	int n;
	while(~scanf("%d", &n)) {
		printf("%lld\n", F[n]);
	}
	return 0;
}

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

int main(void) {
  long long int n; cin >> n;
  cout << (int)tgamma(n+1) << endl;
  return 0;
}

C++: #include <cmath>
#include <iostream>
using namespace std;
int n;
int main() {
	cin >> n;
	cout << (long long)tgamma((long double)(n)) << endl;
}

C++: #include <iostream>
using namespace std;
long long fact(long long n){
  return n<=1?1:n*fact(n-1);
}
int main(){
  long long n;

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

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

int fact(int number) {
    long r=0;
    for(int i=number; i>=1; i--)
{
r = r*i;
}
return r;
}
 
int main() {

int num;
long result =0;

cin >> num;

result = fact(num);

cout<<result;

    
}

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

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

C++: #include<iostream>
#include<stdio.h>

using namespace std;

long long factorial(int n) {

	return (n > 0 ? n*factorial(n - 1) : 1);

}

int main() {
	int  n;
	scanf("%d", &n);
	
	printf("%lld \n", factorial(n));

	return 0;
}

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

long fact(long);

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

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

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

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

C++: #include<iostream>
using namespace std;
int fact(int n)
{
	int prod = 1;
	for (int i = 0; i <= n; i++)
	{
		prod = prod * i;
	}
	return prod;
}
int main()
{
	int x;
	while (1){
		cin >> x;
		if (x >= 1 && x <= 20){
			break;
		}
		else{
			continue;
		}
	}
	cout << fact(x) << endl;
	return 0;
}

C++: #include<iostream>
int input=0;

int factorial(int n)
{
  return (n == 1 || n == 0) ? 1 : factorial(n - 1) * n;
}

int main()
{
	std::cin>>input;
	do
	{	
		factorial(input);
		std::cin>>input;
	}while(input<=20&&input>=0);


	return 0;
}

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

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

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

C++: #include <stdio.h>

int main(){

	long int a, r=0;

	scanf("%ld",&a);

	r = a;

	for(int i=a-1; i>0; i--){
		r = r * i;
	}

	printf("%ld\n", r);
}

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

C++: #include <iostream>

using namespace std;

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

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

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

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

C++: #include <stdio.h>

int kai(long i){
		if(i==1||i==0){
			return 1;
		}
		return i*kai(i-1);
	}
int main(){

	long n;
	scanf("%d",&n);

	printf("%d\n",kai(n));
	return 0;

}

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

	return 0;
}

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

long long ans=1;

long long factorial(int n){   // 再起関数
  if(n==1){
    return ans;
  }else{
    ans = n*factorial(n-1);
  }
}

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

  if(n<0){
    cout << "計算できません。" << endl;
  }else if(n==0 || n==1){
    cout << 1 << endl;
  }else{
    cout << factorial(n) << endl; // 再起

  return 0;
}

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

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

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

#define ll (long long)
#define REP(i,n) for(int i = 0;i<(int)n;i++)
#define FOR(i,a,b) for(int i = (a);i < (b);i++)
#define RFOR(i,a,b) for(int i = (a);i>(b);i--)


using namespace std;

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

C++: #include <iostream>
using namespace std;
 
// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0019

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

C++: import java.util.Scanner;

class Main
{
	public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		
		System.out.println(fact(sc.nextInt()));
	}
	private static long fact(long n)
	{
		if (n == 1) return 1;
		return fact(n - 1) * n;
	}
}

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

int main() {
	int n,ans = 1;
	cin >> n;
	if (n <= 20 && n >= 1) {
		for (int a = 1; a <= n; a++) {
			ans = ans*a;
		}
		cout << ans << endl;
	}
}

C++: #include <iostream>

using namespace std;

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

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

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

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

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

C++: #include <cstdio>
#include <iostream>
#include <math.h>

using namespace std;

int kaizyou(int n,int sum);

int n;
int ans=1;

int main(){
	cin >> n;

	kaizyou(n,ans);
	cout << ans << endl;
}

int kaizyou(int n,int sum){
	if(n > 1){
		ans = sum * n;
		kaizyou(n - 1,ans);
	}

}

C++: // 2011/06/17 Tazoe

#include <iostream>
using namespace std;

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

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

	cout << fac << endl;

	return 0;
}