number_theory.hpp 227 B

12345678910111213141516
  1. #pragma once
  2. namespace nt
  3. {
  4. const int mod = 1000000007;
  5. long long fib(int n)
  6. {
  7. return n <= 1 ? n : fib(n - 1) + fib(n - 2);
  8. }
  9. long long factorial(int n)
  10. {
  11. return n <= 1 ? 1 : n * factorial(n - 1);
  12. }
  13. } // namespace nt