We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Why when I applied the Russian Peasant Exponentiation algorithm on paper for a=8, b=2, k=10, I get c = 60*(2576^2 - 3840^2) - 32*2576*3840*2, which is absolutely a negative number?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Russian Peasant Exponentiation
You are viewing a single comment's thread. Return to all comments →
Why when I applied the Russian Peasant Exponentiation algorithm on paper for a=8, b=2, k=10, I get c = 60*(2576^2 - 3840^2) - 32*2576*3840*2, which is absolutely a negative number?