aboutsummaryrefslogtreecommitdiff
path: root/contests/filtrationContest/B/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contests/filtrationContest/B/main.cpp')
-rw-r--r--contests/filtrationContest/B/main.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/contests/filtrationContest/B/main.cpp b/contests/filtrationContest/B/main.cpp
new file mode 100644
index 0000000..39d6257
--- /dev/null
+++ b/contests/filtrationContest/B/main.cpp
@@ -0,0 +1,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';
+}