fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // Input
  6. int n; cin >> n;
  7.  
  8. // Process -> Output
  9. long long res = 1;
  10. for (int i = 2; i <= n; ++i)
  11. res *= i;
  12. cout << res;
  13.  
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0.01s 5324KB
stdin
10
stdout
3628800