I hereby claim:
- I am aivve on github.
- I am aiwe (https://keybase.io/aiwe) on keybase.
- I have a public key ASDPT6rXYbRuZqDnlqzvuxv1cZpZz3NcQi204rgH1DhOGgo
To claim this, I am signing this object:
// https://www.rookieslab.com/posts/fast-power-algorithm-exponentiation-by-squaring-cpp-python-implementation | |
#define MOD 1000000007 | |
uint64_t fast_power(uint64_t base, uint64_t power) { | |
uint64_t result = 1; | |
while (power > 0) { | |
if (power % 2 == 1) { // Can also use (power & 1) to make code even faster | |
result = (result*base) % MOD; | |
} |
I hereby claim:
To claim this, I am signing this object: