Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Overflow Multiplication
Fshl0
Feb 12th, 2021
232
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 mul
(
ll a, ll b, ll m
)
{
ll res
=
0
;
a
%
=
m
;
while
(
b
>
0
)
{
if
(
b
%
2
)
res
=
(
res
+
a
)
%
m
;
a
=
(
a
*
2
)
%
m
;
b
/
=
2
;
}
return
res
%
m
;
}
Advertisement
Add Comment
Please,
Sign In
to add comment
Public Pastes
FREE BTC GUIDE 5
JavaScript | 1 sec ago | 0.07 KB
✅ MAKE $12OO IN 10 MIN 6
JavaScript | 1 min ago | 0.07 KB
Make $200 in 15 minutes S
JavaScript | 2 min ago | 0.07 KB
✅ MAKE $12OO IN 10 MIN T
JavaScript | 2 min ago | 0.07 KB
FREE BTC GUIDE J
JavaScript | 4 min ago | 0.07 KB
✅ MAKE $12OO IN 10 MIN D
JavaScript | 5 min ago | 0.07 KB
Make $200 in 15 minutes T
JavaScript | 7 min ago | 0.07 KB
Make 1500$ in 20 MIN [Method] L
JavaScript | 8 min ago | 0.07 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!