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

int fac(int x){
    if(x>1){
        return x*fac(x-1);
    }
    return 1;
}

int main(){
    int n;
    scanf("%d", &n);
    printf("%d", fac(n));
    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;
	long long int ans=1;
	cin>>n;
	fd(n,0){
		ans*=i;
	}
	cout<<ans<<endl;
}

C++: #include<stdio.h>
#include<iostream>
#include<math.h>
#include<algorithm>
#include<string>
#define pi 3.14159
using namespace std;

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

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

	

	return 0;
}

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

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

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

C++: #include <iostream>

using namespace std;

int main() {
    int n;
    unsigned long long int f = 1;
    cin >> n;
    for (int i = 1; i <= n; ++i) {
        f *= i;
    }
    cout << f << endl;
    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>
#include<cstdio>
#include<cstring>
using namespace std;
long long f(int n)
{
    if(n==1)return 1;
    else return n*f(n-1);
}
int main()
{
    int n;
    while(cin>>n)
        cout<<f(n)<<endl;

    return 0;
}

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

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

C++: #include<iostream>

int main()
{
	int n;

	int s=1;

	std::cin >> n;

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

	std::cout << s << '\n';
}

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,sum=1;
	cin >> n;
	while (n > 1 ){
		sum *= n;
		n--;
	}

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

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

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

C++: #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cassert>
#include <iostream>
#include <sstream>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <utility>
#include <numeric>
#include <algorithm>
#include <bitset>
#include <complex>
#include <fstream>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for(int i = x; i < n; i++)
template<class T> T RoundOff(T a){ return int(a+.5-(a<0)); }
template<class T, class C> void chmax(T& a, C b){ if(a < b) a = b; }
template<class T, class C> void chmin(T& a, C b){ if(b < a) a = b; }
template<class T, class C> pair<T, C> mp(T a, C b){ return make_pair(a, b); }

template<class T> T factorial(T n){ return n ? n * factorial(n-1) : 1; }

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

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

int main(){

long long int ans=1,n;

 cin >> n;

 for(int i=1;i<=n;i++) ans = ans * i;

 cout << ans << endl;
}

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

int main(){
	int n, i;
	long long f = 1;
	cin >> n;

	for( i=1;i<=n;i++ ){
		f*=i;
	}
	cout << f << endl;
	return 0;
}

C++: //include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <queue>
#include <iterator>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef unsigned long long ULL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

int gcd(int a, int b){
   int tmp;
   while(a%b==0){
      tmp=a%b;
      a=b;
      b=tmp;
   }
}

int lcm(int a,int b){
   return a*b/gcd(a,b);
}

bool prime_number(int n){
   if(n < 2){
      return false;
   }
   else if(n == 2){
      return true;
   }
   if(n % 2 == 0){
      return false;
   }
   for(int i=3;i<=n/i;i+=2){
      if(n % i == 0) return false;
      return true;
   }
}

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

C++: #include <cstdio>

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

C++: #include<stdio.h>

int main(void){
	double ans=1;
	int n,i;
	scanf("%d",&n);
	for(i=1;i<=n;i++)ans=ans*i;
	
	printf("%0.01f\n",ans);
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;
 
 ll num[21]={0};
 
 long long int kai(ll 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;
 }