Closed FrankKair closed 6 years ago
Uses modules math/big and BigInteger (Go and Java respectively) to perform multiplications and exponentiations.
math/big
BigInteger
Go
Java
We use a "%" / remainder to keep track only of the last digits of the big number.
Real time: 0.693 s User time: 0.209 s Sys. time: 0.283 s CPU share: 70.99 %
Real time: 0.649 s User time: 0.868 s Sys. time: 0.084 s CPU share: 146.66 %
How the solution works
Uses modules
math/big
andBigInteger
(Go
andJava
respectively) to perform multiplications and exponentiations.We use a "%" / remainder to keep track only of the last digits of the big number.
Performance
Go
Java