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 <bits/stdc++.h>
using namespace std;

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

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

int main(){
  int f=1;
  int i;

  cin >> i;

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

  cout << f << "\n";

  return 0;
}

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

int main() {
	int n;
	while(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 main()
{
    int n, count;
   unsigned long long int factorial=1;
   while(scanf("%d",&n)==1)
{
     if ( n== 0)
     printf("1\n");
     else
     {
         factorial=1;

         for(count=1;count<=n;++count)
     { factorial*=count;}
      printf("%llu\n",factorial);
      }

      }
      return 0;
       }

C++: #include <cstdio>

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

C++:  #include <string>
 #include <vector>
 #include <algorithm>
 #include <iostream>
 #include <cstdio>
 #include <cstdlib>
 #include <cmath>
 #include <queue>
 #include <map>
 #define INF 100000000
 
 using namespace std;
 typedef long long ll;
 
 int num[21]={0};
 
 long long int kai(int n){
 if(num[n]!=0)return num[n];
 else{
 num[n]=n*kai(n-1);
 return num[n];
 }
 }
 
 int main(){
 int n;
 num[0]=num[1]=1;
 cin>>n;
 cout<<kai(n)<<endl;
 }

C++: #include <iostream>

using namespace std;

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

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

C++: #include <algorithm>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <cctype>
#include <iostream>
#include <set>
#include <string>
#include <queue>
#include <map>
using namespace std;
int size(string x){
	string::size_type size=x.size();
	return size;
}
#define fu(l,k) for(int i=l;i<k;i++)
#define fd(l,k) for(int i=l;i>k;i--)
#define fi first
#define se second
typedef  vector<string> vs;
typedef  vector<int> vi;
double pi(){
	return M_PI;
}
typedef set<int> set_i;
typedef set<string> set_s;
int main(){
	int n,ans=1;
	cin>>n;
	fd(n,0){
		ans*=i;
	}
	cout<<ans<<endl;
}

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

long long factoria(long long t)
{
	if (t == 0 || t == 1) return 1;
	return t*factoria(t - 1);
}

int main()
{
	long long a,ans;
	cin >> a;
	ans = factoria(a);
	cout << ans ;
	return 0;
}

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

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

C++: #include <iostream>

using namespace std;

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

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

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

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

C++: #include <iostream>

using namespace std;

int main(void) {
    int N;
    cin >> N;

    long long p = 1;

    for(int i = 1; i <= N; i++) {
        p *= i;
    }
    cout << p << endl;
    return 0;
}

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

using namespace std;

int main(){
    int a,tot = 1;
    cin >> a;
    while(a >= 1){
        tot *= a;
        a -= 1;
    }
    cout << tot << endl;
    return 0;
}

C++: #include <iostream>

using namespace std;
int main(void)
{
    int n;
    cin >> n;
    long long int res = 1;
    for(int i=1;i<=n;i++)
        res *= (long long int)i;
    cout << res << endl;
    return 0;
}

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

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

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

C++: #include <iostream>

using namespace std;

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

int main() {
    int num;
    
    cin >> num;
    
    if(1 <= num && num <= 20)
        cout << fact(num) << endl;
    
    return 0;
}

C++: #include <iostream>
//#include <fstream.h>
//#include <cstring>
using namespace std;

long int factorial(int n) {
  int i,x=1;
  for(i=1;i<=n;i++) {
    x*=i;
  }
  return x;
}

int main() {
  
  int n;

  cin >> n;

  cout << factorial(n) << "\n";

  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i=0; i<(n); ++i)
long long dp[21];
int main(void){
    dp[0] = 1;
    for(int i=1; i<21; ++i) dp[i] = i*dp[i-1];
    int n;
    cin >> n;
    cout << dp[n] << endl;
}

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

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

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

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

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

C++: #include <iostream>
using namespace std;
int main(void){
    // Here your code !
    int n;
    long long int a=1;
    cin>>n;
    
    for(int i=1;i<=n;i++){
        a=a*i;
    }
    cout<<a<<endl;
    return 0;
}

C++: #include <iostream>
#include <vector>
#include <utility>
#include <string>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <string.h>
#include <deque>
#define REP(i,j,n) for(int i=j;i<n;i++)
#define SORT(x) sort(x.begin(),x.end())

using namespace std;



int main() {
	int n;
	long long sum = 1;
	cin >> n;
	while (n > 1 ){
		sum *= n;
		n--;
	}

	cout << sum << endl;
	return 0;
}

C++: //NoorBaizura bt Mohd Zin
// 1111168

#include <iostream>

using namespace std;

int main()
{
    int x,count=1;
    
    cin >> x;
    
    for (int i=1; i<=x; i++)
    {
        count *= i;
    }
    
    cout << count;
    
//    system ("pause");
    return 0;
    
}

C++: #include<iostream>
int main(){
	int n;
	std::cin>>n;
	int a=1;
	if(n<=12){
		for(int i=1;i<=n;i++){
			a*=i;
		}
		std::cout<<a<<std::endl;
	}
	else if(n==13)std::cout<<355687428096000/16/15/14/13<<std::endl;
	else if(n==14)std::cout<<355687428096000/16/15/14<<std::endl;
	else if(n==15)std::cout<<355687428096000/16/15<<std::endl;
	else if(n==16)std::cout<<355687428096000/16<<std::endl;
	else if(n==17)std::cout<<355687428096000<<std::endl;
	else if(n==18)std::cout<<355687428096000*18<<std::endl;
	else if(n==19)std::cout<<355687428096000*18*19<<std::endl;
	else if(n==20)std::cout<<355687428096000*18*19*20<<std::endl;
	

	return 0;
}

C++: #include<iostream>

using namespace std;

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

int main(){
  int n=0;
  cin>>n;

  unsigned long long int ans=1;
  ans=factorial(n);

  cout<<ans;
}

C++: #include <stdio.h>

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

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

using namespace std;

int main(){
	int n;

	while (cin >> n){

		double ans = 1;

		while (n){
			ans *= n;
			n--;
		}

		printf("%.0f\n", ans);
	}

	return 0;
}