Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(nextString())
	if err != nil {
		fmt.Printf("strconv.Atoi failed: %v\n", err)
	}
	return n
}

func main() {
	scanner.Split(bufio.ScanWords)

	n := nextInt()
	f := 1
	for i := 1; i <= n; i++ {
		f *= i
	}
	fmt.Println(f)
}

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

using ULLint = unsigned long long int;

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

C++: #include <cstdio>
using namespace std;
int main(){
    int n;unsigned long ans=1;
    scanf("%d", &n);
    while(n!=1){ans*=n;--n;}
    printf("%lu\n",ans);
    return 0;
}

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

int main(){
  long long a[21],b;
  a[1]=1;
  for(int i=2;i<20;i++)a[i]=a[i-1]*i;
  cin>>b;
  cout<<a[b]<< endl;
  return 0;
}

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 <bits/stdc++.h>
using namespace std;
 
int main() {
	long long int n, sum=1;
	cin>>n;
	for(int i=0;i<n;i++){
		sum=sum*(n-i);
	}
	cout<<sum<<endl;
}

C++: #include<bits/stdc++.h>
using namespace std;
signed main(void){
	long long a=1,b;
	cin>>b;
	for(long long i=1;i<=b;i++)
		a*=i;
	cout<<a<<endl; 
}

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

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

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

double 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;
  return 0;
}

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

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

int main(void){
	int n,ans;
	scanf("%d",&n);
	ans=fact(n);
	printf("%d\n",ans);

return 0;
}

C++: #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define all(a)  (a).begin(),(a).end()
#define vi vector<int>
#define pb push_back
#define INF 999999999



//??????
ll factmemo[/*num*/]={1};
ll fact(int n){
    if(factmemo[n]!=0)return factmemo[n];
    return factmemo[n] = n*fact(n-1);
}

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

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int  a,b=1,i;
    cin>>a;
           for(i=2;i<=a;i++)
    {       b=i*b;


    }

    printf("%lld\n",b);

    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>

using namespace std;

int main(){
  unsigned long int n = 1,m;

  cin >> m;
  
  for(int i = 1;i <= m;i++){
    n *= i;
  }

  cout << n ;

  return 0;
}

C++: #include <stdio.h>

int i, n;
long long res;

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

C++: #include<bits/stdc++.h>
using namespace std;
long long int serch(long long int n)
{
    if(n==1)return n;
    return n*serch(n-1);
}
int main()
{
    long long int n;
    cin>>n;
    n=serch(n);
    cout<<n<<endl;
}

C++: #include<iostream>
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;


long long i, num, fact=1;



int main()
{
    cin >> num;

    for(i = 1; i <= num; i++)
    {
    	fact = fact * i;
    }

    cout << fact << endl;
    system("pause");
}

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

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

long long n, r = 1;
int main() {
	cin >> n;
	for (long long i = 2; i <= n; ++i) r *= i;
	cout << r << '\n';
}

C++: #include<iostream>

using namespace std;

int calcurate(int cal[20],int i,int krg,int j) {
	if (j == 1) {
		/*for (int i = 1; i <= 20; i++) {
			cout << cal[i] << endl;
		}*/
		return cal[20];
	}
	cal[j] = (cal[j] * i);
	cal[j] += krg;
	if (cal[j] >= 10) {
		int tmp;
		tmp = int(cal[j] / 10);
		cal[j] %= 10;
		krg = tmp;	/*繰り上げ*/

	}
	else {
		krg = 0;
	}
	calcurate(cal, i, krg, j - 1);


}

int main() {
	int n, cal[21] = {0};
	cal[20] = 1;
	cin >> n;
	int krg = 0;
	for (int i = 1; n >= i; i++) {
		int j = 20;
		calcurate(cal, i, krg, j);


	}
	int x = 1;
	while (true) {
		if (cal[x] != 0) {
			break;
		}
		x += 1;
	}
	for (int i = x; i <= 20; i++) {
		cout << cal[i];
	}
	cout << endl;


}

C++: #include <bits/stdc++.h>
#define _ ios_base::sync_with_stdio(0);cin.tie(0);

using namespace std;
double f[23];
int main() { _
int n,i;
f[0]=1.;
for(i=1;i<23;++i)f[i]=f[i-1]*(double)i;
while(~scanf("%d",&n))printf("%.0lf\n",f[n]);
    return 0;
}

C++: #include <iostream>

using namespace std;

int main(void){

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

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

C++: #define _USE_MATH_DEFINES

#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
#include <cmath>
#include <algorithm>
#include <utility>
#include <vector>
#include <numeric>

using namespace std;

long long func(int n)
{
	return (n > 1) ? n * func(n - 1) : 1;
}
int main()
{
	int n;
	cin >> n;

	cout << func(n) << endl;
}

C++: #include<functional>
#include<algorithm>
#include<iostream>
#include<utility>
#include<string>
#include<vector>
#include<cmath>
#include<stack>
#include<queue>
#include<deque>
#include<map>
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,x,n) for(int i=x;i<n;i++)
#define pf push_front
#define pb push_back
#define int long long
using namespace std;
const int INF=1000000007;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

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



signed main(){
  int n;
  cin>>n;
  cout<<f(n)<<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",sum);
    return 0;
}

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

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

  return 0;
}

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

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

using namespace std;

unsigned long factorial(unsigned long n)
{
	unsigned long result = 1;
	for (unsigned long i = n; i > 0; --i) {
		result *= i;
	}
	return result;
}

int main()
{
	unsigned long value = 0;
	cin >> value;
	cout << factorial(value) << endl;

	return 0;
}

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