Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
binary exponentiation
fooker
Nov 19th, 2022
231
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
C++
0.19 KB
| None
|
0
0
raw
download
clone
embed
print
report
ll binaryexponentiation
(
ll x, ll y, ll m
)
{
assert
(
y
>=
0
)
;
ll res
=
1
;
x
%
=
m
;
while
(
y
>
0
)
{
if
(
y
%
2
==
1
)
res
=
res
*
x
%
m
;
x
=
x
*
x
%
m
;
y
/
=
2
;
}
return
res
;
}
Advertisement
Add Comment
Please,
Sign In
to add comment
Public Pastes
Monetizing Method
JavaScript | 1 hour ago | 0.39 KB
Crypto Exploit
Make | 1 hour ago | 0.39 KB
INSTAT ASH METD
JavaScript | 1 hour ago | 0.07 KB
Free Money Method
PHP | 1 hour ago | 0.39 KB
free money glitch
HTML 5 | 1 hour ago | 0.39 KB
Free Crypto MethodGuide
BrainFuck | 1 hour ago | 0.39 KB
Quick Mney Metd 2025
HTML 5 | 1 hour ago | 0.39 KB
Crypto Exploit
Smarty | 1 hour ago | 0.39 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!