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 <iostream>
#include <stdio.h>
#include <math.h>
#include <string>
using namespace std;

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

	return 0;
}

C++: /* AOJ 0019 Factorial */

#include <iostream>

using namespace std;

int
main()
{
    int n, i;
    long factorial = 1;

    cin >> n;

    for (i = 1; i <= n; i++)
        factorial *= i;

    cout << factorial << endl;

    return 0;
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cstring>
#include <map>
#include <queue>
#include <stack>
#include <set>
#include <functional>
#include <sstream>
using namespace std;

#define REP(i,a,n) for(int i=(a);i<(int)(n);i++)
#define rep(i,n) REP(i,0,n)
#define pb push_back
#define mp make_pair
#define all(x) x.begin(),x.end()

long long fact(long long n){
	return n==1LL ? 1LL : fact(n-1)*n;
}
int main(){
	long long n; scanf("%lld",&n);
	printf("%lld\n",fact(n));
	return 0;
}

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

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

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

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

using namespace std;

int main()
{

  int n,i,temp;
  cin >> n;
  if ((n!=0)&&(n!=1)){
    temp = n;
    
    for(i=1;i<temp;i++){
      n = n * (temp-i);
    }
  }else{
    n=1;
  }
  
  cout <<n<<endl;

  return 0;
}

C++: #include <iostream>

int main(){
	int n,a=1;
	std::cin>>n;
	while(n!=0){
		a=a*n;
		n--;
	}
	std::cout<<a;
	return 0;
}

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

int main()
{
    unsigned long long n,m;
    
    cin>>n;if(n==0)n=1;m=n-1;
    while(m>0)
        n*=m--;
    cout<<n<<endl;
    return 0;
}

C++: #include <cstdio>

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

int main(){
	int n;
	scanf("%d",&n);
	printf("%d\n",rec(n));
return 0;
}

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

int main(){
	int n;
	long long ans = 1;
	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;
	int ans = 1;
	cin >> n;
	while(n){
		ans *= n;
		n--;
	}
	cout << ans << endl;
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;

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

int main()
{
	string str = "";

	while (getline (cin, str )){
		long long res;
		long long n;
		stringstream ssn(str);
		ssn >> n;
		res = factorial(n);
		cout << res << endl;	
	} // end while
		
	return 0;
}

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

int factorial(int number) {
	if (number == 1) {
		return 1;
	}
	return number * factorial(number - 1);
}

int main(int argc, char *argv[]) {
	int rcv;
	fscanf(stdin, "%d", &rcv);
	
	printf("%d\n", factorial(rcv));
	return 0;
}

C++: 
#include<stdio.h>

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

C++: #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <functional>
#include <complex>

using namespace std;

const double PI=3.14159265;

int main()
{
	int n;
	unsigned long res=1;

	cin>>n;

	for(int i=2;i<=n;i++) res*=i;

	cout<<res<<endl;

	return 0;
}

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

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

C++: #include <iostream>

using namespace std;

void solve()
{
	int n;
	cin >> n;
	unsigned long long int sum = 1;
	for(int i = 1; i <= n; ++i)
	{
		sum *= i;
	}
	cout << sum << endl;
}

int main()
{
	solve();
	return(0);
}

C++: #include<cstdio>

int main(){
	int n,a = 1;
	scanf("%d", &n);
	while(n){
		a += n;
		n--;
	}
	return 0;
}

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

C++:  
 #include<iostream>
 #include<stdio.h>
 #include<string>
 #include<math.h>
 #include<iomanip>
 #include<algorithm>
 #include<string.h>
 #include<cctype>
 #include<map>
 #include<set>
 #include<vector>
 #include<sstream>
 #include<stack>
 
 using namespace std;
  
 int main()
 {
   long long int n;
   long long result=1;
   cin>>n
   while(n--)
   {
     result*=n;    
   }
   cout<<result<<endl;
   //while(1);      
   return 0;    
 }

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

C++: #include <stdio.h>
int main()
{
	unsigned long long int x,z,i,fac=1;
	scanf("%llu",&x);
	for(i=1;i<=x;i++)
	{
		fac=fac*i;
	}
	printf("%d\n",fac);
}

C++:  
 #include<iostream>
 #include<stdio.h>
 #include<string>
 #include<math.h>
 #include<iomanip>
 #include<algorithm>
 #include<string.h>
 #include<cctype>
 #include<map>
 #include<set>
 #include<vector>
 #include<sstream>
 #include<stack>
 
 using namespace std;
  
 int main()
 {
   long long int n;
   long long result=1;
   cin>>n;
   while(n>1)
   {
     result*=n;    
   }
   cout<<result<<endl;
   //while(1);      
   return 0;    
 }

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