fork download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main(){
  5. ios_base::sync_with_stdio(0); cin.tie(0);
  6. int a,b; cin >> a >> b;
  7. int ans = 1;
  8. for(int i=min(a,b);i>1;i--) ans *= i;
  9. cout << ans;
  10. return 0;
  11. }
Success #stdin #stdout 0.01s 5264KB
stdin
4 3
stdout
6