Go: package main

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

var sc = bufio.NewScanner(os.Stdin)
func readInt() int64 {
    sc.Scan()
    n, _ := strconv.Atoi(sc.Text())
    return int64(n)
}


func main() {
    var ans int64 = 1
    var n int64 = readInt()
    var i int64
    for i = 1; i <= n; i++ {
        ans *= i
    }
    fmt.Println(ans)
}

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

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

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

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

C++: main()printf("2432902008176640000\n");return 0;

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

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

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <set>
#include <map>
#include <list>
#include <iterator>
#include <queue>
#include <stack>
#include <deque>
#include <sstream>
#include <algorithm>
#include <numeric>
#include <string>
#include <cmath>
#include <complex>
#include <functional>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cassert>
#include <cstdlib>
#include <cctype>

#define REP(i,m,n) for(int i=m;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define rp(i,c) rep(i,(int)c.size())
#define fr(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)
#define mp make_pair
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define rall(u) (u).rbegin(),(u).rend()
#define dbg(x) cerr<<#x<<" = "<<(x)<<endl
#define v_delete(a,b) (a).erase(remove((a).begin(), (a).end(), b), (a).end())
#define v_unique(a) (a).erase(unique((a).begin(), (a).end()), (a).end())
#define VV(T) vector<vector< T > >
#define init(a,b) memset((a), (b), sizeof((a)))
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pi;
const int inf=1<<28;
const double INF=1e10,EPS=1e-9;


template<class T>int SIZE(T a){return a.size();}
template<class T>string IntToString(T num){string res;stringstream ss;ss<<num;return ss.str();}
template<class T>T StringToInt(string str){T res=0;for(int i=0;i<SIZE(str);i++)res=(res*10+str[i]-'0');return res;}
template<class T>T gcd(T a,T b){if(b==0)return a;return gcd(b,a%b);}
template<class T>T lcm(T a,T b){return a/gcd(a,b)*b;}

template <class T> void input(T& a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }
template <class T> void input(T* a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }
typedef pair<int,int> pii;

inline bool IN(int x, int y, int w, int h)
{
    return 0 <= x && x < w && 0 <= y && y < h;
}


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

}

C++: #include<cstdio>
int main(){
    int n;
    long long ans=1;
    scanf("%d",&n);
    for(int i=1;i<=n;i++){
        ans*=i;
    }
    printf("%lld\n",ans);
}

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

long long factorial(long long n){   // 再帰関数
  if(n==1){
    return 1;
  }else{
    return n*=factorial(n-1);
  }
}

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

  if(n>=1 && n<=20){
    cout << factorial(n) << endl; // 再帰

  else{
    cout << "計算できません。" << endl;
  }

  return 0;
}

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