FrankKair / polyglot-euler

📜 Project Euler solutions in various programming languages
MIT License
74 stars 14 forks source link

Go Java 097 #68

Closed FrankKair closed 6 years ago

FrankKair commented 6 years ago

How the solution works

Uses modules math/big and BigInteger (Go and Java respectively) to perform multiplications and exponentiations.

We use a "%" / remainder to keep track only of the last digits of the big number.

Performance

Go

Real time: 0.693 s
User time: 0.209 s
Sys. time: 0.283 s
CPU share: 70.99 %

Java

Real time: 0.649 s
User time: 0.868 s
Sys. time: 0.084 s
CPU share: 146.66 %