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 fact(int);

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

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

C++: #include <iostream>
#include <cstring>
using namespace std;
#define N 300
int a[N+1];
int main()
{
    int n; cin >> n;
    memset(a, 0, sizeof(a));
    a[0] = 1;
    for (int i=2; i<=n; ++i) {
        for (int j=0; j<N; ++j) a[j] *= i;
        for (int j=0; j<N; ++j) {
            a[j+1] += a[j] / 10;
            a[j] %= 10;
        }
    }
    int k=N;
    while (a[k] == 0) k--;
    for (int i=k; i>=0; --i) cout << a[i]; cout << endl;
    return 0;
}

C++: #include <cstdio>

int main(int argc, char *argv[]) {
	int rcv;
	fscanf(stdin, "%d", &rcv);
	unsigned long long a = 1ULL;
	for (int i = 2; i <= rcv; i++) {
		a *= i;
	}
	printf("%lld\n", a);
	return 0;
}

C++: int factorial(int n) {
    int answer = 1;

    for (int i = n; i != 0; i--) {
            answer *= i;
    }

    std::cout << answer << std::endl;
}

C++: #include<stdio.h>

int main(void)
{
	int n,i;
	long long int sum;

	sum=1;

	scanf("%d",&n);

	for(i=1;i<=n;i++){
		sum*=1;
	}
	
	printf("%lld\n",sum);

	return 0;
}

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

using namespace std;

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

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

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

int factorial(int n){
	int s = 1;
	while (n){
		s *= n--;
	}
	return s;
}

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

C++: #include <iostream>

using namespace std;

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

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

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

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

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

int main() {
int n,sum=1;
cin>>n;
for(int k=1;k<=n;k++){
	sum=sum*k;
}
cout<<sum<<endl;

	return 0;
}

C++: #include <iostream>

using namespace std;

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

	return 0;
}

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


int factorial_loop(long long n);

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


cin>>n;

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

	result1 =factorial_loop(n);

	cout<<result1;
	return 0;

}
int factorial_loop(long long n) {
    long long result = 1;
    long long k;

    for(k = 1; k <= n; k++) {
        result *= k;
		cout<<k<<" , "<<result<<endl;
    }
    return result;
}

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

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

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

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

int factorial(int x) {

  if(x != 1)
    return x * factorial(x-1);
  else if(x == 1)
    return 1;
}

int main() {
  int a;
  cin >> a;
  cout << factorial(a);
}

C++: #include<iostream>

using namespace std;

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

C++: #include <iostream>

using namespace std;

long long int 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(void)
{
	int n, i, s = i;
	
	scanf("%d", &n);
	for (i = 1; i <= n; i++){
		s *= i;
	}
	printf("%d\n", s);
	return (0);
}

C++: #include<iostream>
#include<stdio.h>
using namespace std;
int factorial(int D) {
	return ( D > 0 ? D*factorial(D - 1) : 1);
}
int main() {
	int n;
	cin >> n;
	cout << factorial(n) << endl;
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <functional>
#include <cstdlib>
#include <sstream>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <complex>
#include <vector>
#include <cstdio>
#include <cmath>
#include <time.h>
#define all(c) ((c).begin(),(c).end())
#define rall(c) (c).rbegin(),(c).rend()
//#define sort(v,n) sort(v,v+n)
//#define vsort(v) sort(v.begin(),v.end())
//#define vvsort(v) sort(v.begin(),v.end(),greater<int>())
#define ll long long
#define pb(a) push_back(a)
#define fi first
#define se second
#define inf 999999999
using namespace std;
const ll MOD = 1e9 + 7;
const double PI = acos(-1.0);
//---------------------------------------------------------------------------------------------//


inline ll solve(int a) {
	if (a == 1)return 1;
	return a*solve(a - 1);
}

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

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

int main(){
	int n;
	int pro =1;
	vector<int> array;
	cin >> n;
	for(int i = n; i > 0; i--){
			array.push_back(i);
	}
	for(int i = 0; i < array.size(); i++){
		pro *= array[i];
	}
	cout << pro << endl;
	return 0;
}

C++: #include <iostream>

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

C++: 
//  0019.cpp

#include <cstdio>
#include <cmath>

using namespace std;


int main(){
    float n;

    scanf("%f",&n);

    printf("%d\n",(int)pow(n,n));


    return 0;
}

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

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

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

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

C++: #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class t>
using table = vector<vector<t>>;
const ld eps=1e-9;

//// < "d:\d_download\visual studio 2015\projects\programing_contest_c++\debug\a.txt" > "d:\d_download\visual studio 2015\projects\programing_contest_c++\debug\b.answer"
int main() {
	int N; cin >> N;
	long long int ans = 1;
	while (1) {
		ans *= N;
		N--;
	}
	cout << ans << endl;
	return 0;
}

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

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

    cout << x << endl;
    
    return 0;
    
}

C++: #include<stdio.h>

int main(void){
	long data,i,ans=1;
	
	scanf("%d",&data);
	for(i=data;i>0;i--)
		ans*=i;
	printf("%d\n",ans);

	return 0;
}

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

using namespace std;

int main(int argc, char const* argv[])
{
	unsigned long long n;
	int i;

	cin >> n;

	for( i = n,n = 1;i >= 1;i-- ) n *= i;

	cout << n << endl;

	return 0;
}