fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int Num; cin>>Num;
  7. int Num1; cin>>Num1;
  8. int count=1;
  9. for(int i=1;i<=min(Num,Num1);i++)
  10. {
  11. count*=i;
  12. }
  13. cout<<count<<endl;
  14. return 0;
  15. }
Success #stdin #stdout 0.01s 5404KB
stdin
4 3
stdout
6