fork download
  1. #include<iostream>
  2. #include<math.h>
  3. using namespace std;
  4. const int MOD = 1e9+7;
  5. int power(int n)
  6. {
  7. if(n == 0)
  8. return 1;
  9. return (1ll*(power(n-1)%MOD)*n)%MOD;
  10. }
  11. int main()
  12. {
  13. int n;
  14. cin >> n;
  15. cout << power(n);
  16. }
  17.  
Success #stdin #stdout 0.01s 5280KB
stdin
Standard input is empty
stdout
88340501