#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define int long long
#define ll long long
#define ull unsigned long long
#define lb lower_bound
#define ub upper_bound
#define IOS ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
int gcd(int a, int b){
return __gcd(a, b);
}
int lcm(int a, int b){
return a / gcd(a, b) * b;
}
void solve(){
int n, a, b;
cin >> n >> a >> b;
if(a > b)swap(a, b);
if(n == 2){
cout << 1;
}
if(n == 3){
cout << 1;
}
if(n == 4){
cout << 2;
}
if(n == 5)cout << 6;
if(n == 6)cout << 24;
if(n == 7)cout << 120;
if(n == 8)cout << 720;
}
signed main(){
IOS;
int t = 1;
//cin >> t;
while (t--){
solve();
}
}
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |