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 <iostream>

using namespace std;

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

C++: #include<stdio.h>

int kaijo(int);


int main()
{
	int n;
	scanf("%d", &n);
	printf("%d\n", kaijo(n));
}

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

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

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

C++: #include <iostream>

using namespace std;

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

C++: #include <cstdio>

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

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

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

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

int main()
{
    int n,f=1,i;
    scanf("%d",&n);
    for(i=2;i<=n;i++)
        f=f*i;
    if(n==0)
           printf("0\n");
    else
           printf("%d\n",f);
    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)

long fact(int n);

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

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

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

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

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

C++: #include<stdio.h>
int main()
{

    int n,i,fact=1;
    scanf("%d",&n);
    i=1;
    while (i<=n)
    {
        fact=fact*i;
        i++;
    }
    printf("%d",fact);
    return 0;
}

C++: #include<iostream>
using namespase std;
int main(){
int n;

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

C++: #include<stdio.h>

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

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

unsigned long Factorial(unsigned long n){
    if(n!=1){
        return n*Factorial(n-1);
    }else{
        return 1;
    }
}

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

    cout << Factorial(n);
return 0;
}

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

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

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

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

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

using namespace std;
typedef long long ll;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) for(int i=0;i<(n);++i)
#define foreach(itr,c) for(__typeof(c.begin()) itr=c.begin(); itr!=c.end(); itr++)
#define dbg(x) cout << #x"="<< (x) << endl
#define mp(a,b) make_pair((a),(b))
#define pb(a) push_back(a) 
#define in(x) cin >> x;
#define all(x) (x).begin(), (x).end()
#define INF 2147483600
#define fi first
#define se second
using namespace std;

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

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

__int64 fact(int num);
int input_int();

int main()
{
	cout << fact(input_int()) << endl;
	return (0);
}

__int64 fact(int num) { return ((num == 1) ? 1 : fact(num - 1) * num); }

int input_int()
{
	int in;
	cin >> in;
	return (in);
}

C++: #include <iostream>

int main()
{
    int n;
    std::cin >> n;
    unsigned long long int s = 1;
    for(std::size_t i = 2; i <= n; ++i){
        s *= i;
    }
    std::cout << s << std::endl;
    return 0;
}

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

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

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

int main(void)
{
	int n;
	long long sum = 1;

	scanf("%d",&n);
	for(int f1 = 1; f1 <= n; f1++){
		sum *= f1;
	}

	printf("%lld\n", sum);
	return 0;
}

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

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

    cin>>n;
    for(int i=1;i<=n;i++)ans*=i;
    cout<<ans<<endl;

    return 0;
}

C++: #include<iostream>

using namespace std;

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

int main(){

	int n;

	cin >> n;

	cout << f(n);

	return 0;
}

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

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

C++: #include<iostream>
using namespace std;
int main(){
long i,j,k,c,n,f[21]={0};
f[1]=j=1;
cin>>n;
for(k=1;k<=n;k++){
c=0;
for(i=1;i<=j+1;i++){
f[i]=f[i]*k+c;c=f[i]/10;
if(c){
f[i]%=10;if(i+1>j)j++;
}
}
}
while(j>0)cout<<f[j--];
cout<<endl;
return 0;
}

C++: #include<stdio.h>
#include<iostream>
using namespace std;
int ke(int x)
{
    if(x == 1)return 1;
    else return x*ke(x-1);
}
int main()
{
    int a;
    cin >> a;
    printf("%d\n",ke(a));
    return 0;
}

C++: #include <cstdio>

int main()
{
		int n;
			scanf("%d\n", &n);
				long long m = n;
					while(--n) m *= n;
						printf("%lld\n", m);
							return 0;
}

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

using namespace std;

int kaizyou(int n,int sum);

int n;
int ans=1;

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

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

}

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

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


}

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

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

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

using namespace std;

long long f(int n)
{
  if (n == 0) return 1;
  return f(n - 1) * n;
}
int main()
{
  int n;
  scanf("%d", &n);
  printf("%lld\n", f(n));
  return 0;
}