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++: #define _USE_MATH_DEFINES
#include <iostream>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <queue>
#include <stack>

using namespace std;

int fact(int n)
{
	return n<=1 ? 1 : n*fact(n-1);
}

int main()
{
	int n;
	scanf("%d",&n);
	cout << fact(n) << endl;
}

C++: #include <iostream>
#include <algorithm>
#include <cctype>
#include <cstdio>
#include <math.h>
using namespace std;

int main() {
	
	int m=1,n;
	cin>>n;
	if(n<13){
		for(int i=1;i<=n;i++)m=m*i;
		cout<<m<<endl;
	}
	if(n==13)cout<<"6227020800"<<endl;
	if(n==14)cout<<"87178291200"<<endl;
	if(n==15)cout<<"1307674368000"<<endl;
	if(n==16)cout<<"20922789888000"<<endl;
	if(n==17)cout<<"355687428096000"<<endl;
	if(n==18)cout<<"6402373705728000"<<endl;
	if(n==19)cout<<"121645100408832000"<<endl;
	if(n==20)cout<<"2432902008176640000"<<endl;
	return 0;
}

C++: void main(){printf("%d\n",120);}

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

int main(){
  int n, i;

  cin >> n;

  for(i = n - 1;i >= 1;i--){
    n = n * i;
  }

  cout << n << endl;

  return 0;
}

C++: #include <stdio.h>

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

int main() {
	long n;
	
	scanf("%d", &n);

	printf("%ld\n", factorial(n));

	return 0;
}

C++: #include <fstream>
#include <iostream>
#include <cmath>
#include <vector>
#include <queue>
#include <utility>
#include <algorithm>
using namespace std;

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

C++: #include <stdio.h>

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

  scanf("%d", &n);
  for(i=2; i<=n; i++){
    a*=(long)i;
  }
  printf("%ld\n", a);

  return 0;
}

C++: #include<stdio.h>
void main()
{
int a,b=1;
clrscr();
printf("Please enter any number to find its factorial\n");
scanf("%d",&a);
while(a>1)
{
b=b*a;
a--;
}
printf("factorial is %d",b);
getch();
}

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

C++: #include <stdio.h>
typedef unsigned long long LL;
int main(){
    unsigned int num;
    LL factorial=1;
   scanf("%d", &num);
    for(;num > 0; num--){
        factorial *= num;
    }
printf("%lld", factorial);
    return 0;
}

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

int main () {
    int n, a=1,i;
    cin >> n:
    for(i=n;i>1;i--) {
        a *= n;
    }
    cout << a << endl;
}

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

using namespace std;

int main(){
int n;
string fac[21] = {"1","1","2","6","24","120","720","5040","40320","362880","3628800","39916800","479001600","6227020800","87178291200","1307674368000"
			,"20922789888000","355687428096000","6402373705728000","121645100408832000","2432902008176640000"};

cin >> n;
cout << fac[n] << endl;

return 0;
}

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

C++: #include <iostream>

using namespace std;

int main() {
	int n, 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 y;
    long long int x = 1;
    cin >> y;

    while(y != 1)
    {
        x = x*y;
        y--;
    }
    cout << x << endl;
}

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



main(){

  long long int n,i;
  long  long int out;

  

  cin >> n;
  out = 1;
  for(i=n;i>0;i--){
    
    out *= i;

  }

  cout << out << endl;

  return 0;
  
}

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

int main() {
	int n,ans = 1;
	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 Factorial(int x)
{
    if(x == 1)
    {
        return x;
    }
    else
    {
        x = x*Factorial(x-1);
    }

}

int main()
{
    int y;

    cin >> y;

    cout << Factorial(y) << endl;
}

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

using namespace std;

int main()
{

  int n,i;
  string out;
  cin >> n;

  switch(n){
    case 1:
      out = "1";
      break;
    case 2:
      out = "2";
      break;
    case 3:
      out = "6";
      break;
    case 4:
      out = "24";
      break;
    case 5:
      out = "120";
      break;
    case 6:
      out = "720";
      break;
    case 7:
      out = "5040";
      break;
    case 8:
      out = "40320";
      break;
    case 9:
      out = "362880";
      break;
    case 10:
      out = "3628800";
      break;
    case 11:
      out = "39916800";
      break;
    case 12:
      out = "479001600";
      break;
    case 13:
      out = "6227020800";
      break;
    case 14:
      out = "87178291200";
      break;
    case 15:
      out = "1307674368000";
      break;
    case 16:
      out = "20922789888000";
      break;
    case 17:
      out = "355687428096000";
      break;
    case 18:
      out = "6402373705728000";
      break;
    case 19:
      out = "121645100408832000";
      break;
    case 20:
      out = "2432902008176640000";
      break;
  }
  cout << out <<endl;
  return 0;
}

C++: #include<iostream>
#include<queue>
#include<string>
#include<stack>
#include<cstdio>
#include<algorithm>

using namespace std;

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

  cin>>n;

  for(i=1;i<=n;i++)
    {
      sum*=i;
    }

  cout<<sum<<endl;

}

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

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

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

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

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

C++: #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;++i)
#define rrep(i,n) for(int i=n-1;i>=0;--i)
#define yesno(flg) if(flg){cout<<"YES"<<endl;}else{cout<<"NO"<<endl;}
#define MAX_N 1002
#define i197 1000000007

using namespace std;
typedef long long ll;
typedef pair<ll,ll> P1;
typedef pair<int,int> Pi;
typedef pair<double,Pi> Pdi;
typedef pair<ll,int>Pli;
typedef pair<P1,ll> P2;
typedef pair<string,string> Ps;
const ll INF=1000000000000000001;
struct edge{int to,cost;};
int dy[]={0, 0, 1, -1};
int dx[]={1, -1, 0, 0};
struct Road{double cost;int a,b;};
struct pos{
	// 1 変数を入れる;
	int x,y,sx,sy,cost;
};

int main() {

	int n;
	cin>>n;

	ll a=1;
	for(int i=2; i<n+1; i++)a*=i;
	cout<<a<<endl;
	return 0;
}

C++: #include <stdio.h>
long long fact(long long n){ return n>0 ? fact(n-1)*n : 1LL; }
int main(){
  long long n;
  scanf("%lld",&n);
  printf("%lld\n",fact(n));
  return 0;
}

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

int main(void){
    ll n, x=1;
    cin >> n;
    for(ll i=n; i>=1; i--){
        x*=i;
    }
    cout << x << "\n";
}

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

int main(){
int n;
while(cin >> n){
for(int i=1;n<1;n--)
i *= n;
cout << i;
}
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) << endl;
}