Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int binpow (int a, int n) { //без рекурсии
- int res = 1;
- while (n) {
- if (n & 1)
- res *= a;
- a *= a;
- n >>= 1;
- }
- return res;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement