Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static long pow(final long b, final long e)
- {
- long base = b;
- long exp = e;
- long result = 1;
- while (exp != 0)
- {
- if ((exp & 1) == 1)
- result *= base;
- exp >>= 1;
- base *= base;
- }
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement