fork download
  1. #include <iostream>
  2.  
  3. constexpr unsigned long long power_function(const unsigned long long prime, const unsigned long long iterations)
  4. {
  5. return iterations == 0 ? 1 : power_function(prime, iterations / 2) * ((iterations % 2) ? 1 : prime);
  6. }
  7.  
  8. static constexpr unsigned long long prime = power_function(-363, 1'000'000);
  9.  
  10. int main() {
  11. std::cout << prime << std::endl;
  12. }
  13.  
Success #stdin #stdout 0s 3412KB
stdin
Standard input is empty
stdout
18062568803210969061