fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. unsigned long long m, n;
  6. cin >> m >> n;
  7.  
  8. long long factorial = 1;
  9. for (int i = m; i < n; i++) {
  10. factorial *= i;
  11. }
  12.  
  13. cout << factorial;
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 5320KB
stdin
3 8
stdout
2520