aboutsummaryrefslogtreecommitdiff
path: root/contests/filtrationContest/B/main.cpp
blob: 39d625750856589829be7a51d283e2fd9c242360 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include<bits/stdc++.h>

using namespace std;

long long fact(long long mn) {
  long long ans = 1;
  for(int i = 1; i <= mn; i++) {
    ans *= i;
  }
  return ans;
}

int main () {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
  long long n, m;
  cin >> n >> m;
  cout << fact(min(n, m)) << '\n';
}