Go: package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)

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

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

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

C++: #include<bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n; i++)
#define INF 1000000
using namespace std;
int main(){
    int n;
    cin >> n;
    long long ans = 1;
    while(1){
        if(n == 1) break;
        //cout << ans << endl;
        ans *= n;
        n--;
    }
    cout << ans << endl;
    return 0;
}

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

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

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

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

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

	return 0;
}

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

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

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

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

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",P);
    return 0;
}

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

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

int kaijo(int n) {
  int ans = 1;
  for(int i = n; i > 0; i--) {
    ans *= i;
  }
  return ans;
}

int main(void) {
  int n;
  cin >> n;
  if(n == 20) cout << kaijo(19)*2 << "0" << endl;
  else        cout << kaijo(n) << endl;
  
  return 0;
}

C++: #include <iostream>
using namespace std;
long long int fact(int x) {
if(x == 1) return 1;
else return x * fact(x-1);
}
  
int main() {
long long int n; cin >> n;
cout << fact(n) << endl;
return 0;
}

C++: #include <cstdio>
#include <cstdlib>
#include <algorithm>

using namespace std;

int a;
long long int hasil; 

int main()
{
	
	hasil=1; 
	scanf("%lld",&a);
	for(int loop=a;loop>=1;loop--)
	{
		hasil=hasil*loop;
	}
	printf("%lld\n",hasil);
	return 0; 
}

C++: #include<iostream>

using namespace std;

int main()

{

    long long n,
	factorial=1;

    
    cin>>n;


    if (n<=20){
        for(int a=1;a<=n;a++)

    {

        factorial=factorial*a;

    }
	}
    
	
		
    cout<<factorial<<endl;

    return 0;

}

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

int main() {
	// your code goes here
	int n;
	long long int ans=1;
	cin >> n;
	while(n>1){
		ans*=n;
		--n;
	}
	cout << ans << endl; 
	return 0;
}